UNPKG

977 BTypeScriptView Raw
1import type { DateArg } from "./types.js";
2/**
3 * @name isSameMinute
4 * @category Minute Helpers
5 * @summary Are the given dates in the same minute (and hour and day)?
6 *
7 * @description
8 * Are the given dates in the same minute (and hour and day)?
9 *
10 * @param laterDate - The first date to check
11 * @param earlierDate - The second date to check
12 *
13 * @returns The dates are in the same minute (and hour and day)
14 *
15 * @example
16 * // Are 4 September 2014 06:30:00 and 4 September 2014 06:30:15 in the same minute?
17 * const result = isSameMinute(
18 * new Date(2014, 8, 4, 6, 30),
19 * new Date(2014, 8, 4, 6, 30, 15)
20 * )
21 * //=> true
22 *
23 * @example
24 * // Are 4 September 2014 06:30:00 and 5 September 2014 06:30:00 in the same minute?
25 * const result = isSameMinute(
26 * new Date(2014, 8, 4, 6, 30),
27 * new Date(2014, 8, 5, 6, 30)
28 * )
29 * //=> false
30 */
31export declare function isSameMinute(
32 laterDate: DateArg<Date> & {},
33 earlierDate: DateArg<Date> & {},
34): boolean;