1 | import type { ContextOptions, DateArg } from "./types.js";
|
2 | /**
|
3 | * The {@link getISOWeekYear} function options.
|
4 | */
|
5 | export interface GetISOWeekYearOptions extends ContextOptions<Date> {}
|
6 | /**
|
7 | * @name getISOWeekYear
|
8 | * @category ISO Week-Numbering Year Helpers
|
9 | * @summary Get the ISO week-numbering year of the given date.
|
10 | *
|
11 | * @description
|
12 | * Get the ISO week-numbering year of the given date,
|
13 | * which always starts 3 days before the year's first Thursday.
|
14 | *
|
15 | * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
|
16 | *
|
17 | * @param date - The given date
|
18 | *
|
19 | * @returns The ISO week-numbering year
|
20 | *
|
21 | * @example
|
22 | * // Which ISO-week numbering year is 2 January 2005?
|
23 | * const result = getISOWeekYear(new Date(2005, 0, 2))
|
24 | * //=> 2004
|
25 | */
|
26 | export declare function getISOWeekYear(
|
27 | date: DateArg<Date> & {},
|
28 | options?: GetISOWeekYearOptions | undefined,
|
29 | ): number;
|