1 | import type { ContextOptions, DateArg } from "./types.js";
|
2 | /**
|
3 | * The {@link isSameYear} function options.
|
4 | */
|
5 | export interface IsSameYearOptions extends ContextOptions<Date> {}
|
6 | /**
|
7 | * @name isSameYear
|
8 | * @category Year Helpers
|
9 | * @summary Are the given dates in the same year?
|
10 | *
|
11 | * @description
|
12 | * Are the given dates in the same year?
|
13 | *
|
14 | * @param laterDate - The first date to check
|
15 | * @param earlierDate - The second date to check
|
16 | * @param options - An object with options
|
17 | *
|
18 | * @returns The dates are in the same year
|
19 | *
|
20 | * @example
|
21 | * // Are 2 September 2014 and 25 September 2014 in the same year?
|
22 | * const result = isSameYear(new Date(2014, 8, 2), new Date(2014, 8, 25))
|
23 | * //=> true
|
24 | */
|
25 | export declare function isSameYear(
|
26 | laterDate: DateArg<Date> & {},
|
27 | earlierDate: DateArg<Date> & {},
|
28 | options?: IsSameYearOptions | undefined,
|
29 | ): boolean;
|