UNPKG

660 BTypeScriptView Raw
1import type { DateArg } from "./types.js";
2/**
3 * @name isBefore
4 * @category Common Helpers
5 * @summary Is the first date before the second one?
6 *
7 * @description
8 * Is the first date before the second one?
9 *
10 * @param date - The date that should be before the other one to return true
11 * @param dateToCompare - The date to compare with
12 *
13 * @returns The first date is before the second date
14 *
15 * @example
16 * // Is 10 July 1989 before 11 February 1987?
17 * const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))
18 * //=> false
19 */
20export declare function isBefore(
21 date: DateArg<Date> & {},
22 dateToCompare: DateArg<Date> & {},
23): boolean;