UNPKG

824 BTypeScriptView Raw
1import type { ContextOptions, DateArg } from "./types.js";
2/**
3 * The {@link getISODay} function options.
4 */
5export interface GetISODayOptions extends ContextOptions<Date> {}
6/**
7 * @name getISODay
8 * @category Weekday Helpers
9 * @summary Get the day of the ISO week of the given date.
10 *
11 * @description
12 * Get the day of the ISO week of the given date,
13 * which is 7 for Sunday, 1 for Monday etc.
14 *
15 * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
16 *
17 * @param date - The given date
18 * @param options - An object with options
19 *
20 * @returns The day of ISO week
21 *
22 * @example
23 * // Which day of the ISO week is 26 February 2012?
24 * const result = getISODay(new Date(2012, 1, 26))
25 * //=> 7
26 */
27export declare function getISODay(
28 date: DateArg<Date> & {},
29 options?: GetISODayOptions,
30): number;