UNPKG

786 BTypeScriptView Raw
1/**
2 * @name isThisMinute
3 * @category Minute Helpers
4 * @summary Is the given date in the same minute as the current date?
5 * @pure false
6 *
7 * @description
8 * Is the given date in the same minute as the current date?
9 *
10 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
11 *
12 * @param date - The date to check
13 *
14 * @returns The date is in this minute
15 *
16 * @example
17 * // If now is 25 September 2014 18:30:15.500,
18 * // is 25 September 2014 18:30:00 in this minute?
19 * const result = isThisMinute(new Date(2014, 8, 25, 18, 30))
20 * //=> true
21 */
22export declare function isThisMinute<DateType extends Date>(
23 date: DateType | number | string,
24): boolean;