UNPKG

1.13 kBTypeScriptView Raw
1import type { ContextOptions, DateArg } from "./types.js";
2/**
3 * The {@link differenceInISOWeekYears} function options.
4 */
5export interface DifferenceInISOWeekYearsOptions extends ContextOptions<Date> {}
6/**
7 * @name differenceInISOWeekYears
8 * @category ISO Week-Numbering Year Helpers
9 * @summary Get the number of full ISO week-numbering years between the given dates.
10 *
11 * @description
12 * Get the number of full ISO week-numbering years between the given dates.
13 *
14 * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
15 *
16 * @param laterDate - The later date
17 * @param earlierDate - The earlier date
18 * @param options - The options
19 *
20 * @returns The number of full ISO week-numbering years
21 *
22 * @example
23 * // How many full ISO week-numbering years are between 1 January 2010 and 1 January 2012?
24 * const result = differenceInISOWeekYears(
25 * new Date(2012, 0, 1),
26 * new Date(2010, 0, 1)
27 * )
28 * // => 1
29 */
30export declare function differenceInISOWeekYears(
31 laterDate: DateArg<Date> & {},
32 earlierDate: DateArg<Date> & {},
33 options?: DifferenceInISOWeekYearsOptions | undefined,
34): number;