UNPKG

998 BTypeScriptView Raw
1/**
2 * @name isSameISOWeekYear
3 * @category ISO Week-Numbering Year Helpers
4 * @summary Are the given dates in the same ISO week-numbering year?
5 *
6 * @description
7 * Are the given dates in the same ISO week-numbering year?
8 *
9 * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
10 *
11 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
12 *
13 * @param dateLeft - The first date to check
14 * @param dateRight - The second date to check
15 *
16 * @returns The dates are in the same ISO week-numbering year
17 *
18 * @example
19 * // Are 29 December 2003 and 2 January 2005 in the same ISO week-numbering year?
20 * const result = isSameISOWeekYear(new Date(2003, 11, 29), new Date(2005, 0, 2))
21 * //=> true
22 */
23export declare function isSameISOWeekYear<DateType extends Date>(
24 dateLeft: DateType | number | string,
25 dateRight: DateType | number | string,
26): boolean;