UNPKG

617 BTypeScriptView Raw
1import type { DateArg } from "./types.js";
2/**
3 * @name isThisSecond
4 * @category Second Helpers
5 * @summary Is the given date in the same second as the current date?
6 * @pure false
7 *
8 * @description
9 * Is the given date in the same second as the current date?
10 *
11 * @param date - The date to check
12 *
13 * @returns The date is in this second
14 *
15 * @example
16 * // If now is 25 September 2014 18:30:15.500,
17 * // is 25 September 2014 18:30:15.000 in this second?
18 * const result = isThisSecond(new Date(2014, 8, 25, 18, 30, 15))
19 * //=> true
20 */
21export declare function isThisSecond(date: DateArg<Date> & {}): boolean;