UNPKG

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