UNPKG

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