1 | import type { ContextOptions, DateArg } from "./types.js";
|
2 | /**
|
3 | * The {@link lastDayOfISOWeek} function options.
|
4 | */
|
5 | export interface LastDayOfISOWeekOptions<DateType extends Date = Date>
|
6 | extends ContextOptions<DateType> {}
|
7 | /**
|
8 | * @name lastDayOfISOWeek
|
9 | * @category ISO Week Helpers
|
10 | * @summary Return the last day of an ISO week for the given date.
|
11 | *
|
12 | * @description
|
13 | * Return the last day of an ISO week for the given date.
|
14 | * The result will be in the local timezone.
|
15 | *
|
16 | * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
|
17 | *
|
18 | * @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).
|
19 | * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
20 | *
|
21 | * @param date - The original date
|
22 | * @param options - An object with options
|
23 | *
|
24 | * @returns The last day of an ISO week
|
25 | *
|
26 | * @example
|
27 | * // The last day of an ISO week for 2 September 2014 11:55:00:
|
28 | * const result = lastDayOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))
|
29 | * //=> Sun Sep 07 2014 00:00:00
|
30 | */
|
31 | export declare function lastDayOfISOWeek<
|
32 | DateType extends Date,
|
33 | ResultDate extends Date = DateType,
|
34 | >(
|
35 | date: DateArg<DateType>,
|
36 | options?: LastDayOfISOWeekOptions<ResultDate> | undefined,
|
37 | ): ResultDate;
|