UNPKG

734 BTypeScriptView Raw
1import type { ContextOptions, DateArg } from "./types.js";
2/**
3 * The {@link isYesterday} function options.
4 */
5export interface IsYesterdayOptions extends ContextOptions<Date> {}
6/**
7 * @name isYesterday
8 * @category Day Helpers
9 * @summary Is the given date yesterday?
10 * @pure false
11 *
12 * @description
13 * Is the given date yesterday?
14 *
15 * @param date - The date to check
16 * @param options - An object with options
17 *
18 * @returns The date is yesterday
19 *
20 * @example
21 * // If today is 6 October 2014, is 5 October 14:00:00 yesterday?
22 * const result = isYesterday(new Date(2014, 9, 5, 14, 0))
23 * //=> true
24 */
25export declare function isYesterday(
26 date: DateArg<Date> & {},
27 options?: IsYesterdayOptions | undefined,
28): boolean;