Leon4gr45 commited on
Commit
cdcab25
·
verified ·
1 Parent(s): d242643

Upload folder using huggingface_hub (part 21)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. node_modules/date-fns/startOfDay.js +36 -0
  2. node_modules/date-fns/startOfDecade.cjs +40 -0
  3. node_modules/date-fns/startOfDecade.d.cts +34 -0
  4. node_modules/date-fns/startOfDecade.d.ts +34 -0
  5. node_modules/date-fns/startOfDecade.js +41 -0
  6. node_modules/date-fns/startOfHour.cjs +35 -0
  7. node_modules/date-fns/startOfHour.d.cts +35 -0
  8. node_modules/date-fns/startOfHour.d.ts +35 -0
  9. node_modules/date-fns/startOfHour.js +36 -0
  10. node_modules/date-fns/startOfISOWeek.cjs +35 -0
  11. node_modules/date-fns/startOfISOWeek.d.cts +37 -0
  12. node_modules/date-fns/startOfISOWeek.d.ts +37 -0
  13. node_modules/date-fns/startOfISOWeek.js +36 -0
  14. node_modules/date-fns/startOfISOWeekYear.cjs +42 -0
  15. node_modules/date-fns/startOfISOWeekYear.d.cts +38 -0
  16. node_modules/date-fns/startOfISOWeekYear.d.ts +38 -0
  17. node_modules/date-fns/startOfISOWeekYear.js +43 -0
  18. node_modules/date-fns/startOfMinute.cjs +35 -0
  19. node_modules/date-fns/startOfMinute.d.cts +35 -0
  20. node_modules/date-fns/startOfMinute.d.ts +35 -0
  21. node_modules/date-fns/startOfMinute.js +36 -0
  22. node_modules/date-fns/startOfMonth.cjs +37 -0
  23. node_modules/date-fns/startOfMonth.d.cts +36 -0
  24. node_modules/date-fns/startOfMonth.d.ts +36 -0
  25. node_modules/date-fns/startOfMonth.js +38 -0
  26. node_modules/date-fns/startOfQuarter.cjs +38 -0
  27. node_modules/date-fns/startOfQuarter.d.cts +35 -0
  28. node_modules/date-fns/startOfQuarter.d.ts +35 -0
  29. node_modules/date-fns/startOfQuarter.js +39 -0
  30. node_modules/date-fns/startOfSecond.cjs +35 -0
  31. node_modules/date-fns/startOfSecond.d.cts +35 -0
  32. node_modules/date-fns/startOfSecond.d.ts +35 -0
  33. node_modules/date-fns/startOfSecond.js +36 -0
  34. node_modules/date-fns/startOfToday.cjs +31 -0
  35. node_modules/date-fns/startOfToday.d.cts +29 -0
  36. node_modules/date-fns/startOfToday.d.ts +29 -0
  37. node_modules/date-fns/startOfToday.js +32 -0
  38. node_modules/date-fns/startOfTomorrow.cjs +40 -0
  39. node_modules/date-fns/startOfTomorrow.d.cts +29 -0
  40. node_modules/date-fns/startOfTomorrow.d.ts +29 -0
  41. node_modules/date-fns/startOfTomorrow.js +41 -0
  42. node_modules/date-fns/startOfWeek.cjs +53 -0
  43. node_modules/date-fns/startOfWeek.d.cts +47 -0
  44. node_modules/date-fns/startOfWeek.d.ts +47 -0
  45. node_modules/date-fns/startOfWeek.js +54 -0
  46. node_modules/date-fns/startOfWeekYear.cjs +64 -0
  47. node_modules/date-fns/startOfWeekYear.d.cts +59 -0
  48. node_modules/date-fns/startOfWeekYear.d.ts +59 -0
  49. node_modules/date-fns/startOfWeekYear.js +65 -0
  50. node_modules/date-fns/startOfYear.cjs +36 -0
node_modules/date-fns/startOfDay.js ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { toDate } from "./toDate.js";
2
+
3
+ /**
4
+ * The {@link startOfDay} function options.
5
+ */
6
+
7
+ /**
8
+ * @name startOfDay
9
+ * @category Day Helpers
10
+ * @summary Return the start of a day for the given date.
11
+ *
12
+ * @description
13
+ * Return the start of a day for the given date.
14
+ * The result will be in the local timezone.
15
+ *
16
+ * @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).
17
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
18
+ *
19
+ * @param date - The original date
20
+ * @param options - The options
21
+ *
22
+ * @returns The start of a day
23
+ *
24
+ * @example
25
+ * // The start of a day for 2 September 2014 11:55:00:
26
+ * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))
27
+ * //=> Tue Sep 02 2014 00:00:00
28
+ */
29
+ export function startOfDay(date, options) {
30
+ const _date = toDate(date, options?.in);
31
+ _date.setHours(0, 0, 0, 0);
32
+ return _date;
33
+ }
34
+
35
+ // Fallback for modularized imports:
36
+ export default startOfDay;
node_modules/date-fns/startOfDecade.cjs ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ exports.startOfDecade = startOfDecade;
3
+ var _index = require("./toDate.cjs");
4
+
5
+ /**
6
+ * The {@link startOfDecade} options.
7
+ */
8
+
9
+ /**
10
+ * @name startOfDecade
11
+ * @category Decade Helpers
12
+ * @summary Return the start of a decade for the given date.
13
+ *
14
+ * @description
15
+ * Return the start of a decade for the given date.
16
+ *
17
+ * @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).
18
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
19
+ *
20
+ * @param date - The original date
21
+ * @param options - An object with options
22
+ *
23
+ * @returns The start of a decade
24
+ *
25
+ * @example
26
+ * // The start of a decade for 21 October 2015 00:00:00:
27
+ * const result = startOfDecade(new Date(2015, 9, 21, 00, 00, 00))
28
+ * //=> Jan 01 2010 00:00:00
29
+ */
30
+ function startOfDecade(date, options) {
31
+ // TODO: Switch to more technical definition in of decades that start with 1
32
+ // end with 0. I.e. 2001-2010 instead of current 2000-2009. It's a breaking
33
+ // change, so it can only be done in 4.0.
34
+ const _date = (0, _index.toDate)(date, options?.in);
35
+ const year = _date.getFullYear();
36
+ const decade = Math.floor(year / 10) * 10;
37
+ _date.setFullYear(decade, 0, 1);
38
+ _date.setHours(0, 0, 0, 0);
39
+ return _date;
40
+ }
node_modules/date-fns/startOfDecade.d.cts ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { ContextOptions, DateArg } from "./types.js";
2
+ /**
3
+ * The {@link startOfDecade} options.
4
+ */
5
+ export interface StartOfDecadeOptions<DateType extends Date = Date>
6
+ extends ContextOptions<DateType> {}
7
+ /**
8
+ * @name startOfDecade
9
+ * @category Decade Helpers
10
+ * @summary Return the start of a decade for the given date.
11
+ *
12
+ * @description
13
+ * Return the start of a decade for the given date.
14
+ *
15
+ * @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).
16
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
17
+ *
18
+ * @param date - The original date
19
+ * @param options - An object with options
20
+ *
21
+ * @returns The start of a decade
22
+ *
23
+ * @example
24
+ * // The start of a decade for 21 October 2015 00:00:00:
25
+ * const result = startOfDecade(new Date(2015, 9, 21, 00, 00, 00))
26
+ * //=> Jan 01 2010 00:00:00
27
+ */
28
+ export declare function startOfDecade<
29
+ DateType extends Date,
30
+ ResultDate extends Date = DateType,
31
+ >(
32
+ date: DateArg<DateType>,
33
+ options?: StartOfDecadeOptions<ResultDate> | undefined,
34
+ ): ResultDate;
node_modules/date-fns/startOfDecade.d.ts ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { ContextOptions, DateArg } from "./types.js";
2
+ /**
3
+ * The {@link startOfDecade} options.
4
+ */
5
+ export interface StartOfDecadeOptions<DateType extends Date = Date>
6
+ extends ContextOptions<DateType> {}
7
+ /**
8
+ * @name startOfDecade
9
+ * @category Decade Helpers
10
+ * @summary Return the start of a decade for the given date.
11
+ *
12
+ * @description
13
+ * Return the start of a decade for the given date.
14
+ *
15
+ * @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).
16
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
17
+ *
18
+ * @param date - The original date
19
+ * @param options - An object with options
20
+ *
21
+ * @returns The start of a decade
22
+ *
23
+ * @example
24
+ * // The start of a decade for 21 October 2015 00:00:00:
25
+ * const result = startOfDecade(new Date(2015, 9, 21, 00, 00, 00))
26
+ * //=> Jan 01 2010 00:00:00
27
+ */
28
+ export declare function startOfDecade<
29
+ DateType extends Date,
30
+ ResultDate extends Date = DateType,
31
+ >(
32
+ date: DateArg<DateType>,
33
+ options?: StartOfDecadeOptions<ResultDate> | undefined,
34
+ ): ResultDate;
node_modules/date-fns/startOfDecade.js ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { toDate } from "./toDate.js";
2
+
3
+ /**
4
+ * The {@link startOfDecade} options.
5
+ */
6
+
7
+ /**
8
+ * @name startOfDecade
9
+ * @category Decade Helpers
10
+ * @summary Return the start of a decade for the given date.
11
+ *
12
+ * @description
13
+ * Return the start of a decade for the given date.
14
+ *
15
+ * @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).
16
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
17
+ *
18
+ * @param date - The original date
19
+ * @param options - An object with options
20
+ *
21
+ * @returns The start of a decade
22
+ *
23
+ * @example
24
+ * // The start of a decade for 21 October 2015 00:00:00:
25
+ * const result = startOfDecade(new Date(2015, 9, 21, 00, 00, 00))
26
+ * //=> Jan 01 2010 00:00:00
27
+ */
28
+ export function startOfDecade(date, options) {
29
+ // TODO: Switch to more technical definition in of decades that start with 1
30
+ // end with 0. I.e. 2001-2010 instead of current 2000-2009. It's a breaking
31
+ // change, so it can only be done in 4.0.
32
+ const _date = toDate(date, options?.in);
33
+ const year = _date.getFullYear();
34
+ const decade = Math.floor(year / 10) * 10;
35
+ _date.setFullYear(decade, 0, 1);
36
+ _date.setHours(0, 0, 0, 0);
37
+ return _date;
38
+ }
39
+
40
+ // Fallback for modularized imports:
41
+ export default startOfDecade;
node_modules/date-fns/startOfHour.cjs ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ exports.startOfHour = startOfHour;
3
+ var _index = require("./toDate.cjs");
4
+
5
+ /**
6
+ * The {@link startOfHour} function options.
7
+ */
8
+
9
+ /**
10
+ * @name startOfHour
11
+ * @category Hour Helpers
12
+ * @summary Return the start of an hour for the given date.
13
+ *
14
+ * @description
15
+ * Return the start of an hour for the given date.
16
+ * The result will be in the local timezone.
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 start of an hour
25
+ *
26
+ * @example
27
+ * // The start of an hour for 2 September 2014 11:55:00:
28
+ * const result = startOfHour(new Date(2014, 8, 2, 11, 55))
29
+ * //=> Tue Sep 02 2014 11:00:00
30
+ */
31
+ function startOfHour(date, options) {
32
+ const _date = (0, _index.toDate)(date, options?.in);
33
+ _date.setMinutes(0, 0, 0);
34
+ return _date;
35
+ }
node_modules/date-fns/startOfHour.d.cts ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { ContextOptions, DateArg } from "./types.js";
2
+ /**
3
+ * The {@link startOfHour} function options.
4
+ */
5
+ export interface StartOfHourOptions<DateType extends Date = Date>
6
+ extends ContextOptions<DateType> {}
7
+ /**
8
+ * @name startOfHour
9
+ * @category Hour Helpers
10
+ * @summary Return the start of an hour for the given date.
11
+ *
12
+ * @description
13
+ * Return the start of an hour for the given date.
14
+ * The result will be in the local timezone.
15
+ *
16
+ * @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).
17
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
18
+ *
19
+ * @param date - The original date
20
+ * @param options - An object with options
21
+ *
22
+ * @returns The start of an hour
23
+ *
24
+ * @example
25
+ * // The start of an hour for 2 September 2014 11:55:00:
26
+ * const result = startOfHour(new Date(2014, 8, 2, 11, 55))
27
+ * //=> Tue Sep 02 2014 11:00:00
28
+ */
29
+ export declare function startOfHour<
30
+ DateType extends Date,
31
+ ResultDate extends Date = DateType,
32
+ >(
33
+ date: DateArg<DateType>,
34
+ options?: StartOfHourOptions<ResultDate> | undefined,
35
+ ): ResultDate;
node_modules/date-fns/startOfHour.d.ts ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { ContextOptions, DateArg } from "./types.js";
2
+ /**
3
+ * The {@link startOfHour} function options.
4
+ */
5
+ export interface StartOfHourOptions<DateType extends Date = Date>
6
+ extends ContextOptions<DateType> {}
7
+ /**
8
+ * @name startOfHour
9
+ * @category Hour Helpers
10
+ * @summary Return the start of an hour for the given date.
11
+ *
12
+ * @description
13
+ * Return the start of an hour for the given date.
14
+ * The result will be in the local timezone.
15
+ *
16
+ * @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).
17
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
18
+ *
19
+ * @param date - The original date
20
+ * @param options - An object with options
21
+ *
22
+ * @returns The start of an hour
23
+ *
24
+ * @example
25
+ * // The start of an hour for 2 September 2014 11:55:00:
26
+ * const result = startOfHour(new Date(2014, 8, 2, 11, 55))
27
+ * //=> Tue Sep 02 2014 11:00:00
28
+ */
29
+ export declare function startOfHour<
30
+ DateType extends Date,
31
+ ResultDate extends Date = DateType,
32
+ >(
33
+ date: DateArg<DateType>,
34
+ options?: StartOfHourOptions<ResultDate> | undefined,
35
+ ): ResultDate;
node_modules/date-fns/startOfHour.js ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { toDate } from "./toDate.js";
2
+
3
+ /**
4
+ * The {@link startOfHour} function options.
5
+ */
6
+
7
+ /**
8
+ * @name startOfHour
9
+ * @category Hour Helpers
10
+ * @summary Return the start of an hour for the given date.
11
+ *
12
+ * @description
13
+ * Return the start of an hour for the given date.
14
+ * The result will be in the local timezone.
15
+ *
16
+ * @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).
17
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
18
+ *
19
+ * @param date - The original date
20
+ * @param options - An object with options
21
+ *
22
+ * @returns The start of an hour
23
+ *
24
+ * @example
25
+ * // The start of an hour for 2 September 2014 11:55:00:
26
+ * const result = startOfHour(new Date(2014, 8, 2, 11, 55))
27
+ * //=> Tue Sep 02 2014 11:00:00
28
+ */
29
+ export function startOfHour(date, options) {
30
+ const _date = toDate(date, options?.in);
31
+ _date.setMinutes(0, 0, 0);
32
+ return _date;
33
+ }
34
+
35
+ // Fallback for modularized imports:
36
+ export default startOfHour;
node_modules/date-fns/startOfISOWeek.cjs ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ exports.startOfISOWeek = startOfISOWeek;
3
+ var _index = require("./startOfWeek.cjs");
4
+
5
+ /**
6
+ * The {@link startOfISOWeek} function options.
7
+ */
8
+
9
+ /**
10
+ * @name startOfISOWeek
11
+ * @category ISO Week Helpers
12
+ * @summary Return the start of an ISO week for the given date.
13
+ *
14
+ * @description
15
+ * Return the start of an ISO week for the given date.
16
+ * The result will be in the local timezone.
17
+ *
18
+ * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
19
+ *
20
+ * @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).
21
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
22
+ *
23
+ * @param date - The original date
24
+ * @param options - An object with options
25
+ *
26
+ * @returns The start of an ISO week
27
+ *
28
+ * @example
29
+ * // The start of an ISO week for 2 September 2014 11:55:00:
30
+ * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))
31
+ * //=> Mon Sep 01 2014 00:00:00
32
+ */
33
+ function startOfISOWeek(date, options) {
34
+ return (0, _index.startOfWeek)(date, { ...options, weekStartsOn: 1 });
35
+ }
node_modules/date-fns/startOfISOWeek.d.cts ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { ContextOptions, DateArg } from "./types.js";
2
+ /**
3
+ * The {@link startOfISOWeek} function options.
4
+ */
5
+ export interface StartOfISOWeekOptions<DateType extends Date = Date>
6
+ extends ContextOptions<DateType> {}
7
+ /**
8
+ * @name startOfISOWeek
9
+ * @category ISO Week Helpers
10
+ * @summary Return the start of an ISO week for the given date.
11
+ *
12
+ * @description
13
+ * Return the start 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 start of an ISO week
25
+ *
26
+ * @example
27
+ * // The start of an ISO week for 2 September 2014 11:55:00:
28
+ * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))
29
+ * //=> Mon Sep 01 2014 00:00:00
30
+ */
31
+ export declare function startOfISOWeek<
32
+ DateType extends Date,
33
+ ResultDate extends Date = DateType,
34
+ >(
35
+ date: DateArg<DateType>,
36
+ options?: StartOfISOWeekOptions<ResultDate> | undefined,
37
+ ): ResultDate;
node_modules/date-fns/startOfISOWeek.d.ts ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { ContextOptions, DateArg } from "./types.js";
2
+ /**
3
+ * The {@link startOfISOWeek} function options.
4
+ */
5
+ export interface StartOfISOWeekOptions<DateType extends Date = Date>
6
+ extends ContextOptions<DateType> {}
7
+ /**
8
+ * @name startOfISOWeek
9
+ * @category ISO Week Helpers
10
+ * @summary Return the start of an ISO week for the given date.
11
+ *
12
+ * @description
13
+ * Return the start 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 start of an ISO week
25
+ *
26
+ * @example
27
+ * // The start of an ISO week for 2 September 2014 11:55:00:
28
+ * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))
29
+ * //=> Mon Sep 01 2014 00:00:00
30
+ */
31
+ export declare function startOfISOWeek<
32
+ DateType extends Date,
33
+ ResultDate extends Date = DateType,
34
+ >(
35
+ date: DateArg<DateType>,
36
+ options?: StartOfISOWeekOptions<ResultDate> | undefined,
37
+ ): ResultDate;
node_modules/date-fns/startOfISOWeek.js ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { startOfWeek } from "./startOfWeek.js";
2
+
3
+ /**
4
+ * The {@link startOfISOWeek} function options.
5
+ */
6
+
7
+ /**
8
+ * @name startOfISOWeek
9
+ * @category ISO Week Helpers
10
+ * @summary Return the start of an ISO week for the given date.
11
+ *
12
+ * @description
13
+ * Return the start 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 start of an ISO week
25
+ *
26
+ * @example
27
+ * // The start of an ISO week for 2 September 2014 11:55:00:
28
+ * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))
29
+ * //=> Mon Sep 01 2014 00:00:00
30
+ */
31
+ export function startOfISOWeek(date, options) {
32
+ return startOfWeek(date, { ...options, weekStartsOn: 1 });
33
+ }
34
+
35
+ // Fallback for modularized imports:
36
+ export default startOfISOWeek;
node_modules/date-fns/startOfISOWeekYear.cjs ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ exports.startOfISOWeekYear = startOfISOWeekYear;
3
+ var _index = require("./constructFrom.cjs");
4
+ var _index2 = require("./getISOWeekYear.cjs");
5
+ var _index3 = require("./startOfISOWeek.cjs");
6
+
7
+ /**
8
+ * The {@link startOfISOWeekYear} function options.
9
+ */
10
+
11
+ /**
12
+ * @name startOfISOWeekYear
13
+ * @category ISO Week-Numbering Year Helpers
14
+ * @summary Return the start of an ISO week-numbering year for the given date.
15
+ *
16
+ * @description
17
+ * Return the start of an ISO week-numbering year,
18
+ * which always starts 3 days before the year's first Thursday.
19
+ * The result will be in the local timezone.
20
+ *
21
+ * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
22
+ *
23
+ * @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).
24
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
25
+ *
26
+ * @param date - The original date
27
+ * @param options - An object with options
28
+ *
29
+ * @returns The start of an ISO week-numbering year
30
+ *
31
+ * @example
32
+ * // The start of an ISO week-numbering year for 2 July 2005:
33
+ * const result = startOfISOWeekYear(new Date(2005, 6, 2))
34
+ * //=> Mon Jan 03 2005 00:00:00
35
+ */
36
+ function startOfISOWeekYear(date, options) {
37
+ const year = (0, _index2.getISOWeekYear)(date, options);
38
+ const fourthOfJanuary = (0, _index.constructFrom)(options?.in || date, 0);
39
+ fourthOfJanuary.setFullYear(year, 0, 4);
40
+ fourthOfJanuary.setHours(0, 0, 0, 0);
41
+ return (0, _index3.startOfISOWeek)(fourthOfJanuary);
42
+ }
node_modules/date-fns/startOfISOWeekYear.d.cts ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { ContextOptions, DateArg } from "./types.js";
2
+ /**
3
+ * The {@link startOfISOWeekYear} function options.
4
+ */
5
+ export interface StartOfISOWeekYearOptions<DateType extends Date = Date>
6
+ extends ContextOptions<DateType> {}
7
+ /**
8
+ * @name startOfISOWeekYear
9
+ * @category ISO Week-Numbering Year Helpers
10
+ * @summary Return the start of an ISO week-numbering year for the given date.
11
+ *
12
+ * @description
13
+ * Return the start of an ISO week-numbering year,
14
+ * which always starts 3 days before the year's first Thursday.
15
+ * The result will be in the local timezone.
16
+ *
17
+ * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
18
+ *
19
+ * @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).
20
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
21
+ *
22
+ * @param date - The original date
23
+ * @param options - An object with options
24
+ *
25
+ * @returns The start of an ISO week-numbering year
26
+ *
27
+ * @example
28
+ * // The start of an ISO week-numbering year for 2 July 2005:
29
+ * const result = startOfISOWeekYear(new Date(2005, 6, 2))
30
+ * //=> Mon Jan 03 2005 00:00:00
31
+ */
32
+ export declare function startOfISOWeekYear<
33
+ DateType extends Date,
34
+ ResultDate extends Date = DateType,
35
+ >(
36
+ date: DateArg<DateType>,
37
+ options?: StartOfISOWeekYearOptions<ResultDate> | undefined,
38
+ ): ResultDate;
node_modules/date-fns/startOfISOWeekYear.d.ts ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { ContextOptions, DateArg } from "./types.js";
2
+ /**
3
+ * The {@link startOfISOWeekYear} function options.
4
+ */
5
+ export interface StartOfISOWeekYearOptions<DateType extends Date = Date>
6
+ extends ContextOptions<DateType> {}
7
+ /**
8
+ * @name startOfISOWeekYear
9
+ * @category ISO Week-Numbering Year Helpers
10
+ * @summary Return the start of an ISO week-numbering year for the given date.
11
+ *
12
+ * @description
13
+ * Return the start of an ISO week-numbering year,
14
+ * which always starts 3 days before the year's first Thursday.
15
+ * The result will be in the local timezone.
16
+ *
17
+ * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
18
+ *
19
+ * @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).
20
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
21
+ *
22
+ * @param date - The original date
23
+ * @param options - An object with options
24
+ *
25
+ * @returns The start of an ISO week-numbering year
26
+ *
27
+ * @example
28
+ * // The start of an ISO week-numbering year for 2 July 2005:
29
+ * const result = startOfISOWeekYear(new Date(2005, 6, 2))
30
+ * //=> Mon Jan 03 2005 00:00:00
31
+ */
32
+ export declare function startOfISOWeekYear<
33
+ DateType extends Date,
34
+ ResultDate extends Date = DateType,
35
+ >(
36
+ date: DateArg<DateType>,
37
+ options?: StartOfISOWeekYearOptions<ResultDate> | undefined,
38
+ ): ResultDate;
node_modules/date-fns/startOfISOWeekYear.js ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { constructFrom } from "./constructFrom.js";
2
+ import { getISOWeekYear } from "./getISOWeekYear.js";
3
+ import { startOfISOWeek } from "./startOfISOWeek.js";
4
+
5
+ /**
6
+ * The {@link startOfISOWeekYear} function options.
7
+ */
8
+
9
+ /**
10
+ * @name startOfISOWeekYear
11
+ * @category ISO Week-Numbering Year Helpers
12
+ * @summary Return the start of an ISO week-numbering year for the given date.
13
+ *
14
+ * @description
15
+ * Return the start of an ISO week-numbering year,
16
+ * which always starts 3 days before the year's first Thursday.
17
+ * The result will be in the local timezone.
18
+ *
19
+ * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
20
+ *
21
+ * @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).
22
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
23
+ *
24
+ * @param date - The original date
25
+ * @param options - An object with options
26
+ *
27
+ * @returns The start of an ISO week-numbering year
28
+ *
29
+ * @example
30
+ * // The start of an ISO week-numbering year for 2 July 2005:
31
+ * const result = startOfISOWeekYear(new Date(2005, 6, 2))
32
+ * //=> Mon Jan 03 2005 00:00:00
33
+ */
34
+ export function startOfISOWeekYear(date, options) {
35
+ const year = getISOWeekYear(date, options);
36
+ const fourthOfJanuary = constructFrom(options?.in || date, 0);
37
+ fourthOfJanuary.setFullYear(year, 0, 4);
38
+ fourthOfJanuary.setHours(0, 0, 0, 0);
39
+ return startOfISOWeek(fourthOfJanuary);
40
+ }
41
+
42
+ // Fallback for modularized imports:
43
+ export default startOfISOWeekYear;
node_modules/date-fns/startOfMinute.cjs ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ exports.startOfMinute = startOfMinute;
3
+ var _index = require("./toDate.cjs");
4
+
5
+ /**
6
+ * The {@link startOfMinute} function options.
7
+ */
8
+
9
+ /**
10
+ * @name startOfMinute
11
+ * @category Minute Helpers
12
+ * @summary Return the start of a minute for the given date.
13
+ *
14
+ * @description
15
+ * Return the start of a minute for the given date.
16
+ * The result will be in the local timezone.
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 start of a minute
25
+ *
26
+ * @example
27
+ * // The start of a minute for 1 December 2014 22:15:45.400:
28
+ * const result = startOfMinute(new Date(2014, 11, 1, 22, 15, 45, 400))
29
+ * //=> Mon Dec 01 2014 22:15:00
30
+ */
31
+ function startOfMinute(date, options) {
32
+ const date_ = (0, _index.toDate)(date, options?.in);
33
+ date_.setSeconds(0, 0);
34
+ return date_;
35
+ }
node_modules/date-fns/startOfMinute.d.cts ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { ContextOptions, DateArg } from "./types.js";
2
+ /**
3
+ * The {@link startOfMinute} function options.
4
+ */
5
+ export interface StartOfMinuteOptions<DateType extends Date = Date>
6
+ extends ContextOptions<DateType> {}
7
+ /**
8
+ * @name startOfMinute
9
+ * @category Minute Helpers
10
+ * @summary Return the start of a minute for the given date.
11
+ *
12
+ * @description
13
+ * Return the start of a minute for the given date.
14
+ * The result will be in the local timezone.
15
+ *
16
+ * @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).
17
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
18
+ *
19
+ * @param date - The original date
20
+ * @param options - An object with options
21
+ *
22
+ * @returns The start of a minute
23
+ *
24
+ * @example
25
+ * // The start of a minute for 1 December 2014 22:15:45.400:
26
+ * const result = startOfMinute(new Date(2014, 11, 1, 22, 15, 45, 400))
27
+ * //=> Mon Dec 01 2014 22:15:00
28
+ */
29
+ export declare function startOfMinute<
30
+ DateType extends Date,
31
+ ResultDate extends Date = DateType,
32
+ >(
33
+ date: DateArg<DateType>,
34
+ options?: StartOfMinuteOptions<ResultDate> | undefined,
35
+ ): ResultDate;
node_modules/date-fns/startOfMinute.d.ts ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { ContextOptions, DateArg } from "./types.js";
2
+ /**
3
+ * The {@link startOfMinute} function options.
4
+ */
5
+ export interface StartOfMinuteOptions<DateType extends Date = Date>
6
+ extends ContextOptions<DateType> {}
7
+ /**
8
+ * @name startOfMinute
9
+ * @category Minute Helpers
10
+ * @summary Return the start of a minute for the given date.
11
+ *
12
+ * @description
13
+ * Return the start of a minute for the given date.
14
+ * The result will be in the local timezone.
15
+ *
16
+ * @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).
17
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
18
+ *
19
+ * @param date - The original date
20
+ * @param options - An object with options
21
+ *
22
+ * @returns The start of a minute
23
+ *
24
+ * @example
25
+ * // The start of a minute for 1 December 2014 22:15:45.400:
26
+ * const result = startOfMinute(new Date(2014, 11, 1, 22, 15, 45, 400))
27
+ * //=> Mon Dec 01 2014 22:15:00
28
+ */
29
+ export declare function startOfMinute<
30
+ DateType extends Date,
31
+ ResultDate extends Date = DateType,
32
+ >(
33
+ date: DateArg<DateType>,
34
+ options?: StartOfMinuteOptions<ResultDate> | undefined,
35
+ ): ResultDate;
node_modules/date-fns/startOfMinute.js ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { toDate } from "./toDate.js";
2
+
3
+ /**
4
+ * The {@link startOfMinute} function options.
5
+ */
6
+
7
+ /**
8
+ * @name startOfMinute
9
+ * @category Minute Helpers
10
+ * @summary Return the start of a minute for the given date.
11
+ *
12
+ * @description
13
+ * Return the start of a minute for the given date.
14
+ * The result will be in the local timezone.
15
+ *
16
+ * @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).
17
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
18
+ *
19
+ * @param date - The original date
20
+ * @param options - An object with options
21
+ *
22
+ * @returns The start of a minute
23
+ *
24
+ * @example
25
+ * // The start of a minute for 1 December 2014 22:15:45.400:
26
+ * const result = startOfMinute(new Date(2014, 11, 1, 22, 15, 45, 400))
27
+ * //=> Mon Dec 01 2014 22:15:00
28
+ */
29
+ export function startOfMinute(date, options) {
30
+ const date_ = toDate(date, options?.in);
31
+ date_.setSeconds(0, 0);
32
+ return date_;
33
+ }
34
+
35
+ // Fallback for modularized imports:
36
+ export default startOfMinute;
node_modules/date-fns/startOfMonth.cjs ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ exports.startOfMonth = startOfMonth;
3
+ var _index = require("./toDate.cjs");
4
+
5
+ /**
6
+ * The {@link startOfMonth} function options.
7
+ */
8
+
9
+ /**
10
+ * @name startOfMonth
11
+ * @category Month Helpers
12
+ * @summary Return the start of a month for the given date.
13
+ *
14
+ * @description
15
+ * Return the start of a month for the given date. The result will be in the local timezone.
16
+ *
17
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments.
18
+ * 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,
20
+ * or inferred from the arguments.
21
+ *
22
+ * @param date - The original date
23
+ * @param options - An object with options
24
+ *
25
+ * @returns The start of a month
26
+ *
27
+ * @example
28
+ * // The start of a month for 2 September 2014 11:55:00:
29
+ * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))
30
+ * //=> Mon Sep 01 2014 00:00:00
31
+ */
32
+ function startOfMonth(date, options) {
33
+ const _date = (0, _index.toDate)(date, options?.in);
34
+ _date.setDate(1);
35
+ _date.setHours(0, 0, 0, 0);
36
+ return _date;
37
+ }
node_modules/date-fns/startOfMonth.d.cts ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { ContextOptions, DateArg } from "./types.js";
2
+ /**
3
+ * The {@link startOfMonth} function options.
4
+ */
5
+ export interface StartOfMonthOptions<ResultDate extends Date>
6
+ extends ContextOptions<ResultDate> {}
7
+ /**
8
+ * @name startOfMonth
9
+ * @category Month Helpers
10
+ * @summary Return the start of a month for the given date.
11
+ *
12
+ * @description
13
+ * Return the start of a month for the given date. The result will be in the local timezone.
14
+ *
15
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments.
16
+ * Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
17
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed,
18
+ * or inferred from the arguments.
19
+ *
20
+ * @param date - The original date
21
+ * @param options - An object with options
22
+ *
23
+ * @returns The start of a month
24
+ *
25
+ * @example
26
+ * // The start of a month for 2 September 2014 11:55:00:
27
+ * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))
28
+ * //=> Mon Sep 01 2014 00:00:00
29
+ */
30
+ export declare function startOfMonth<
31
+ DateType extends Date,
32
+ ResultDate extends Date = DateType,
33
+ >(
34
+ date: DateArg<DateType>,
35
+ options?: StartOfMonthOptions<ResultDate> | undefined,
36
+ ): ResultDate;
node_modules/date-fns/startOfMonth.d.ts ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { ContextOptions, DateArg } from "./types.js";
2
+ /**
3
+ * The {@link startOfMonth} function options.
4
+ */
5
+ export interface StartOfMonthOptions<ResultDate extends Date>
6
+ extends ContextOptions<ResultDate> {}
7
+ /**
8
+ * @name startOfMonth
9
+ * @category Month Helpers
10
+ * @summary Return the start of a month for the given date.
11
+ *
12
+ * @description
13
+ * Return the start of a month for the given date. The result will be in the local timezone.
14
+ *
15
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments.
16
+ * Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
17
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed,
18
+ * or inferred from the arguments.
19
+ *
20
+ * @param date - The original date
21
+ * @param options - An object with options
22
+ *
23
+ * @returns The start of a month
24
+ *
25
+ * @example
26
+ * // The start of a month for 2 September 2014 11:55:00:
27
+ * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))
28
+ * //=> Mon Sep 01 2014 00:00:00
29
+ */
30
+ export declare function startOfMonth<
31
+ DateType extends Date,
32
+ ResultDate extends Date = DateType,
33
+ >(
34
+ date: DateArg<DateType>,
35
+ options?: StartOfMonthOptions<ResultDate> | undefined,
36
+ ): ResultDate;
node_modules/date-fns/startOfMonth.js ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { toDate } from "./toDate.js";
2
+
3
+ /**
4
+ * The {@link startOfMonth} function options.
5
+ */
6
+
7
+ /**
8
+ * @name startOfMonth
9
+ * @category Month Helpers
10
+ * @summary Return the start of a month for the given date.
11
+ *
12
+ * @description
13
+ * Return the start of a month for the given date. The result will be in the local timezone.
14
+ *
15
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments.
16
+ * Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
17
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed,
18
+ * or inferred from the arguments.
19
+ *
20
+ * @param date - The original date
21
+ * @param options - An object with options
22
+ *
23
+ * @returns The start of a month
24
+ *
25
+ * @example
26
+ * // The start of a month for 2 September 2014 11:55:00:
27
+ * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))
28
+ * //=> Mon Sep 01 2014 00:00:00
29
+ */
30
+ export function startOfMonth(date, options) {
31
+ const _date = toDate(date, options?.in);
32
+ _date.setDate(1);
33
+ _date.setHours(0, 0, 0, 0);
34
+ return _date;
35
+ }
36
+
37
+ // Fallback for modularized imports:
38
+ export default startOfMonth;
node_modules/date-fns/startOfQuarter.cjs ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ exports.startOfQuarter = startOfQuarter;
3
+ var _index = require("./toDate.cjs");
4
+
5
+ /**
6
+ * The {@link startOfQuarter} function options.
7
+ */
8
+
9
+ /**
10
+ * @name startOfQuarter
11
+ * @category Quarter Helpers
12
+ * @summary Return the start of a year quarter for the given date.
13
+ *
14
+ * @description
15
+ * Return the start of a year quarter for the given date.
16
+ * The result will be in the local timezone.
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 - The options
23
+ *
24
+ * @returns The start of a quarter
25
+ *
26
+ * @example
27
+ * // The start of a quarter for 2 September 2014 11:55:00:
28
+ * const result = startOfQuarter(new Date(2014, 8, 2, 11, 55, 0))
29
+ * //=> Tue Jul 01 2014 00:00:00
30
+ */
31
+ function startOfQuarter(date, options) {
32
+ const _date = (0, _index.toDate)(date, options?.in);
33
+ const currentMonth = _date.getMonth();
34
+ const month = currentMonth - (currentMonth % 3);
35
+ _date.setMonth(month, 1);
36
+ _date.setHours(0, 0, 0, 0);
37
+ return _date;
38
+ }
node_modules/date-fns/startOfQuarter.d.cts ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { ContextOptions, DateArg } from "./types.js";
2
+ /**
3
+ * The {@link startOfQuarter} function options.
4
+ */
5
+ export interface StartOfQuarterOptions<DateType extends Date = Date>
6
+ extends ContextOptions<DateType> {}
7
+ /**
8
+ * @name startOfQuarter
9
+ * @category Quarter Helpers
10
+ * @summary Return the start of a year quarter for the given date.
11
+ *
12
+ * @description
13
+ * Return the start of a year quarter for the given date.
14
+ * The result will be in the local timezone.
15
+ *
16
+ * @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).
17
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
18
+ *
19
+ * @param date - The original date
20
+ * @param options - The options
21
+ *
22
+ * @returns The start of a quarter
23
+ *
24
+ * @example
25
+ * // The start of a quarter for 2 September 2014 11:55:00:
26
+ * const result = startOfQuarter(new Date(2014, 8, 2, 11, 55, 0))
27
+ * //=> Tue Jul 01 2014 00:00:00
28
+ */
29
+ export declare function startOfQuarter<
30
+ DateType extends Date,
31
+ ResultDate extends Date = DateType,
32
+ >(
33
+ date: DateArg<DateType>,
34
+ options?: StartOfQuarterOptions<ResultDate> | undefined,
35
+ ): ResultDate;
node_modules/date-fns/startOfQuarter.d.ts ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { ContextOptions, DateArg } from "./types.js";
2
+ /**
3
+ * The {@link startOfQuarter} function options.
4
+ */
5
+ export interface StartOfQuarterOptions<DateType extends Date = Date>
6
+ extends ContextOptions<DateType> {}
7
+ /**
8
+ * @name startOfQuarter
9
+ * @category Quarter Helpers
10
+ * @summary Return the start of a year quarter for the given date.
11
+ *
12
+ * @description
13
+ * Return the start of a year quarter for the given date.
14
+ * The result will be in the local timezone.
15
+ *
16
+ * @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).
17
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
18
+ *
19
+ * @param date - The original date
20
+ * @param options - The options
21
+ *
22
+ * @returns The start of a quarter
23
+ *
24
+ * @example
25
+ * // The start of a quarter for 2 September 2014 11:55:00:
26
+ * const result = startOfQuarter(new Date(2014, 8, 2, 11, 55, 0))
27
+ * //=> Tue Jul 01 2014 00:00:00
28
+ */
29
+ export declare function startOfQuarter<
30
+ DateType extends Date,
31
+ ResultDate extends Date = DateType,
32
+ >(
33
+ date: DateArg<DateType>,
34
+ options?: StartOfQuarterOptions<ResultDate> | undefined,
35
+ ): ResultDate;
node_modules/date-fns/startOfQuarter.js ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { toDate } from "./toDate.js";
2
+
3
+ /**
4
+ * The {@link startOfQuarter} function options.
5
+ */
6
+
7
+ /**
8
+ * @name startOfQuarter
9
+ * @category Quarter Helpers
10
+ * @summary Return the start of a year quarter for the given date.
11
+ *
12
+ * @description
13
+ * Return the start of a year quarter for the given date.
14
+ * The result will be in the local timezone.
15
+ *
16
+ * @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).
17
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
18
+ *
19
+ * @param date - The original date
20
+ * @param options - The options
21
+ *
22
+ * @returns The start of a quarter
23
+ *
24
+ * @example
25
+ * // The start of a quarter for 2 September 2014 11:55:00:
26
+ * const result = startOfQuarter(new Date(2014, 8, 2, 11, 55, 0))
27
+ * //=> Tue Jul 01 2014 00:00:00
28
+ */
29
+ export function startOfQuarter(date, options) {
30
+ const _date = toDate(date, options?.in);
31
+ const currentMonth = _date.getMonth();
32
+ const month = currentMonth - (currentMonth % 3);
33
+ _date.setMonth(month, 1);
34
+ _date.setHours(0, 0, 0, 0);
35
+ return _date;
36
+ }
37
+
38
+ // Fallback for modularized imports:
39
+ export default startOfQuarter;
node_modules/date-fns/startOfSecond.cjs ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ exports.startOfSecond = startOfSecond;
3
+ var _index = require("./toDate.cjs");
4
+
5
+ /**
6
+ * The {@link startOfSecond} function options.
7
+ */
8
+
9
+ /**
10
+ * @name startOfSecond
11
+ * @category Second Helpers
12
+ * @summary Return the start of a second for the given date.
13
+ *
14
+ * @description
15
+ * Return the start of a second for the given date.
16
+ * The result will be in the local timezone.
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 - The options
23
+ *
24
+ * @returns The start of a second
25
+ *
26
+ * @example
27
+ * // The start of a second for 1 December 2014 22:15:45.400:
28
+ * const result = startOfSecond(new Date(2014, 11, 1, 22, 15, 45, 400))
29
+ * //=> Mon Dec 01 2014 22:15:45.000
30
+ */
31
+ function startOfSecond(date, options) {
32
+ const date_ = (0, _index.toDate)(date, options?.in);
33
+ date_.setMilliseconds(0);
34
+ return date_;
35
+ }
node_modules/date-fns/startOfSecond.d.cts ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { DateArg, ContextOptions } from "./types.js";
2
+ /**
3
+ * The {@link startOfSecond} function options.
4
+ */
5
+ export interface StartOfSecondOptions<DateType extends Date = Date>
6
+ extends ContextOptions<DateType> {}
7
+ /**
8
+ * @name startOfSecond
9
+ * @category Second Helpers
10
+ * @summary Return the start of a second for the given date.
11
+ *
12
+ * @description
13
+ * Return the start of a second for the given date.
14
+ * The result will be in the local timezone.
15
+ *
16
+ * @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).
17
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
18
+ *
19
+ * @param date - The original date
20
+ * @param options - The options
21
+ *
22
+ * @returns The start of a second
23
+ *
24
+ * @example
25
+ * // The start of a second for 1 December 2014 22:15:45.400:
26
+ * const result = startOfSecond(new Date(2014, 11, 1, 22, 15, 45, 400))
27
+ * //=> Mon Dec 01 2014 22:15:45.000
28
+ */
29
+ export declare function startOfSecond<
30
+ DateType extends Date,
31
+ ResultDate extends Date = DateType,
32
+ >(
33
+ date: DateArg<DateType>,
34
+ options?: StartOfSecondOptions<ResultDate> | undefined,
35
+ ): ResultDate;
node_modules/date-fns/startOfSecond.d.ts ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { DateArg, ContextOptions } from "./types.js";
2
+ /**
3
+ * The {@link startOfSecond} function options.
4
+ */
5
+ export interface StartOfSecondOptions<DateType extends Date = Date>
6
+ extends ContextOptions<DateType> {}
7
+ /**
8
+ * @name startOfSecond
9
+ * @category Second Helpers
10
+ * @summary Return the start of a second for the given date.
11
+ *
12
+ * @description
13
+ * Return the start of a second for the given date.
14
+ * The result will be in the local timezone.
15
+ *
16
+ * @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).
17
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
18
+ *
19
+ * @param date - The original date
20
+ * @param options - The options
21
+ *
22
+ * @returns The start of a second
23
+ *
24
+ * @example
25
+ * // The start of a second for 1 December 2014 22:15:45.400:
26
+ * const result = startOfSecond(new Date(2014, 11, 1, 22, 15, 45, 400))
27
+ * //=> Mon Dec 01 2014 22:15:45.000
28
+ */
29
+ export declare function startOfSecond<
30
+ DateType extends Date,
31
+ ResultDate extends Date = DateType,
32
+ >(
33
+ date: DateArg<DateType>,
34
+ options?: StartOfSecondOptions<ResultDate> | undefined,
35
+ ): ResultDate;
node_modules/date-fns/startOfSecond.js ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { toDate } from "./toDate.js";
2
+
3
+ /**
4
+ * The {@link startOfSecond} function options.
5
+ */
6
+
7
+ /**
8
+ * @name startOfSecond
9
+ * @category Second Helpers
10
+ * @summary Return the start of a second for the given date.
11
+ *
12
+ * @description
13
+ * Return the start of a second for the given date.
14
+ * The result will be in the local timezone.
15
+ *
16
+ * @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).
17
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
18
+ *
19
+ * @param date - The original date
20
+ * @param options - The options
21
+ *
22
+ * @returns The start of a second
23
+ *
24
+ * @example
25
+ * // The start of a second for 1 December 2014 22:15:45.400:
26
+ * const result = startOfSecond(new Date(2014, 11, 1, 22, 15, 45, 400))
27
+ * //=> Mon Dec 01 2014 22:15:45.000
28
+ */
29
+ export function startOfSecond(date, options) {
30
+ const date_ = toDate(date, options?.in);
31
+ date_.setMilliseconds(0);
32
+ return date_;
33
+ }
34
+
35
+ // Fallback for modularized imports:
36
+ export default startOfSecond;
node_modules/date-fns/startOfToday.cjs ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ exports.startOfToday = startOfToday;
3
+ var _index = require("./startOfDay.cjs");
4
+
5
+ /**
6
+ * The {@link startOfToday} function options.
7
+ */
8
+
9
+ /**
10
+ * @name startOfToday
11
+ * @category Day Helpers
12
+ * @summary Return the start of today.
13
+ * @pure false
14
+ *
15
+ * @description
16
+ * Return the start of today.
17
+ *
18
+ * @typeParam ContextDate - The `Date` type of the context function.
19
+ *
20
+ * @param options - An object with options
21
+ *
22
+ * @returns The start of today
23
+ *
24
+ * @example
25
+ * // If today is 6 October 2014:
26
+ * const result = startOfToday()
27
+ * //=> Mon Oct 6 2014 00:00:00
28
+ */
29
+ function startOfToday(options) {
30
+ return (0, _index.startOfDay)(Date.now(), options);
31
+ }
node_modules/date-fns/startOfToday.d.cts ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { ContextOptions } from "./types.js";
2
+ /**
3
+ * The {@link startOfToday} function options.
4
+ */
5
+ export interface StartOfTodayOptions<DateType extends Date = Date>
6
+ extends ContextOptions<DateType> {}
7
+ /**
8
+ * @name startOfToday
9
+ * @category Day Helpers
10
+ * @summary Return the start of today.
11
+ * @pure false
12
+ *
13
+ * @description
14
+ * Return the start of today.
15
+ *
16
+ * @typeParam ContextDate - The `Date` type of the context function.
17
+ *
18
+ * @param options - An object with options
19
+ *
20
+ * @returns The start of today
21
+ *
22
+ * @example
23
+ * // If today is 6 October 2014:
24
+ * const result = startOfToday()
25
+ * //=> Mon Oct 6 2014 00:00:00
26
+ */
27
+ export declare function startOfToday<ContextDate extends Date>(
28
+ options?: StartOfTodayOptions<ContextDate> | undefined,
29
+ ): ContextDate;
node_modules/date-fns/startOfToday.d.ts ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { ContextOptions } from "./types.js";
2
+ /**
3
+ * The {@link startOfToday} function options.
4
+ */
5
+ export interface StartOfTodayOptions<DateType extends Date = Date>
6
+ extends ContextOptions<DateType> {}
7
+ /**
8
+ * @name startOfToday
9
+ * @category Day Helpers
10
+ * @summary Return the start of today.
11
+ * @pure false
12
+ *
13
+ * @description
14
+ * Return the start of today.
15
+ *
16
+ * @typeParam ContextDate - The `Date` type of the context function.
17
+ *
18
+ * @param options - An object with options
19
+ *
20
+ * @returns The start of today
21
+ *
22
+ * @example
23
+ * // If today is 6 October 2014:
24
+ * const result = startOfToday()
25
+ * //=> Mon Oct 6 2014 00:00:00
26
+ */
27
+ export declare function startOfToday<ContextDate extends Date>(
28
+ options?: StartOfTodayOptions<ContextDate> | undefined,
29
+ ): ContextDate;
node_modules/date-fns/startOfToday.js ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { startOfDay } from "./startOfDay.js";
2
+
3
+ /**
4
+ * The {@link startOfToday} function options.
5
+ */
6
+
7
+ /**
8
+ * @name startOfToday
9
+ * @category Day Helpers
10
+ * @summary Return the start of today.
11
+ * @pure false
12
+ *
13
+ * @description
14
+ * Return the start of today.
15
+ *
16
+ * @typeParam ContextDate - The `Date` type of the context function.
17
+ *
18
+ * @param options - An object with options
19
+ *
20
+ * @returns The start of today
21
+ *
22
+ * @example
23
+ * // If today is 6 October 2014:
24
+ * const result = startOfToday()
25
+ * //=> Mon Oct 6 2014 00:00:00
26
+ */
27
+ export function startOfToday(options) {
28
+ return startOfDay(Date.now(), options);
29
+ }
30
+
31
+ // Fallback for modularized imports:
32
+ export default startOfToday;
node_modules/date-fns/startOfTomorrow.cjs ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ exports.startOfTomorrow = startOfTomorrow;
3
+ var _index = require("./constructFrom.cjs");
4
+ var _index2 = require("./constructNow.cjs");
5
+
6
+ /**
7
+ * The {@link startOfTomorrow} function options.
8
+ */
9
+
10
+ /**
11
+ * @name startOfTomorrow
12
+ * @category Day Helpers
13
+ * @summary Return the start of tomorrow.
14
+ * @pure false
15
+ *
16
+ * @typeParam ContextDate - The `Date` type of the context function.
17
+ *
18
+ * @param options - An object with options
19
+ *
20
+ * @returns The start of tomorrow
21
+ *
22
+ * @description
23
+ * Return the start of tomorrow.
24
+ *
25
+ * @example
26
+ * // If today is 6 October 2014:
27
+ * const result = startOfTomorrow()
28
+ * //=> Tue Oct 7 2014 00:00:00
29
+ */
30
+ function startOfTomorrow(options) {
31
+ const now = (0, _index2.constructNow)(options?.in);
32
+ const year = now.getFullYear();
33
+ const month = now.getMonth();
34
+ const day = now.getDate();
35
+
36
+ const date = (0, _index.constructFrom)(options?.in, 0);
37
+ date.setFullYear(year, month, day + 1);
38
+ date.setHours(0, 0, 0, 0);
39
+ return date;
40
+ }
node_modules/date-fns/startOfTomorrow.d.cts ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { ContextOptions } from "./types.js";
2
+ /**
3
+ * The {@link startOfTomorrow} function options.
4
+ */
5
+ export interface StartOfTomorrowOptions<DateType extends Date = Date>
6
+ extends ContextOptions<DateType> {}
7
+ /**
8
+ * @name startOfTomorrow
9
+ * @category Day Helpers
10
+ * @summary Return the start of tomorrow.
11
+ * @pure false
12
+ *
13
+ * @typeParam ContextDate - The `Date` type of the context function.
14
+ *
15
+ * @param options - An object with options
16
+ *
17
+ * @returns The start of tomorrow
18
+ *
19
+ * @description
20
+ * Return the start of tomorrow.
21
+ *
22
+ * @example
23
+ * // If today is 6 October 2014:
24
+ * const result = startOfTomorrow()
25
+ * //=> Tue Oct 7 2014 00:00:00
26
+ */
27
+ export declare function startOfTomorrow<ContextDate extends Date>(
28
+ options?: StartOfTomorrowOptions<ContextDate> | undefined,
29
+ ): ContextDate;
node_modules/date-fns/startOfTomorrow.d.ts ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { ContextOptions } from "./types.js";
2
+ /**
3
+ * The {@link startOfTomorrow} function options.
4
+ */
5
+ export interface StartOfTomorrowOptions<DateType extends Date = Date>
6
+ extends ContextOptions<DateType> {}
7
+ /**
8
+ * @name startOfTomorrow
9
+ * @category Day Helpers
10
+ * @summary Return the start of tomorrow.
11
+ * @pure false
12
+ *
13
+ * @typeParam ContextDate - The `Date` type of the context function.
14
+ *
15
+ * @param options - An object with options
16
+ *
17
+ * @returns The start of tomorrow
18
+ *
19
+ * @description
20
+ * Return the start of tomorrow.
21
+ *
22
+ * @example
23
+ * // If today is 6 October 2014:
24
+ * const result = startOfTomorrow()
25
+ * //=> Tue Oct 7 2014 00:00:00
26
+ */
27
+ export declare function startOfTomorrow<ContextDate extends Date>(
28
+ options?: StartOfTomorrowOptions<ContextDate> | undefined,
29
+ ): ContextDate;
node_modules/date-fns/startOfTomorrow.js ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { constructFrom } from "./constructFrom.js";
2
+ import { constructNow } from "./constructNow.js";
3
+
4
+ /**
5
+ * The {@link startOfTomorrow} function options.
6
+ */
7
+
8
+ /**
9
+ * @name startOfTomorrow
10
+ * @category Day Helpers
11
+ * @summary Return the start of tomorrow.
12
+ * @pure false
13
+ *
14
+ * @typeParam ContextDate - The `Date` type of the context function.
15
+ *
16
+ * @param options - An object with options
17
+ *
18
+ * @returns The start of tomorrow
19
+ *
20
+ * @description
21
+ * Return the start of tomorrow.
22
+ *
23
+ * @example
24
+ * // If today is 6 October 2014:
25
+ * const result = startOfTomorrow()
26
+ * //=> Tue Oct 7 2014 00:00:00
27
+ */
28
+ export function startOfTomorrow(options) {
29
+ const now = constructNow(options?.in);
30
+ const year = now.getFullYear();
31
+ const month = now.getMonth();
32
+ const day = now.getDate();
33
+
34
+ const date = constructFrom(options?.in, 0);
35
+ date.setFullYear(year, month, day + 1);
36
+ date.setHours(0, 0, 0, 0);
37
+ return date;
38
+ }
39
+
40
+ // Fallback for modularized imports:
41
+ export default startOfTomorrow;
node_modules/date-fns/startOfWeek.cjs ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ exports.startOfWeek = startOfWeek;
3
+ var _index = require("./_lib/defaultOptions.cjs");
4
+ var _index2 = require("./toDate.cjs");
5
+
6
+ /**
7
+ * The {@link startOfWeek} function options.
8
+ */
9
+
10
+ /**
11
+ * @name startOfWeek
12
+ * @category Week Helpers
13
+ * @summary Return the start of a week for the given date.
14
+ *
15
+ * @description
16
+ * Return the start of a week for the given date.
17
+ * The result will be in the local timezone.
18
+ *
19
+ * @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).
20
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
21
+ *
22
+ * @param date - The original date
23
+ * @param options - An object with options
24
+ *
25
+ * @returns The start of a week
26
+ *
27
+ * @example
28
+ * // The start of a week for 2 September 2014 11:55:00:
29
+ * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))
30
+ * //=> Sun Aug 31 2014 00:00:00
31
+ *
32
+ * @example
33
+ * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:
34
+ * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })
35
+ * //=> Mon Sep 01 2014 00:00:00
36
+ */
37
+ function startOfWeek(date, options) {
38
+ const defaultOptions = (0, _index.getDefaultOptions)();
39
+ const weekStartsOn =
40
+ options?.weekStartsOn ??
41
+ options?.locale?.options?.weekStartsOn ??
42
+ defaultOptions.weekStartsOn ??
43
+ defaultOptions.locale?.options?.weekStartsOn ??
44
+ 0;
45
+
46
+ const _date = (0, _index2.toDate)(date, options?.in);
47
+ const day = _date.getDay();
48
+ const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
49
+
50
+ _date.setDate(_date.getDate() - diff);
51
+ _date.setHours(0, 0, 0, 0);
52
+ return _date;
53
+ }
node_modules/date-fns/startOfWeek.d.cts ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {
2
+ ContextOptions,
3
+ DateArg,
4
+ LocalizedOptions,
5
+ WeekOptions,
6
+ } from "./types.js";
7
+ /**
8
+ * The {@link startOfWeek} function options.
9
+ */
10
+ export interface StartOfWeekOptions<DateType extends Date = Date>
11
+ extends LocalizedOptions<"options">,
12
+ WeekOptions,
13
+ ContextOptions<DateType> {}
14
+ /**
15
+ * @name startOfWeek
16
+ * @category Week Helpers
17
+ * @summary Return the start of a week for the given date.
18
+ *
19
+ * @description
20
+ * Return the start of a week for the given date.
21
+ * The result will be in the local timezone.
22
+ *
23
+ * @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).
24
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
25
+ *
26
+ * @param date - The original date
27
+ * @param options - An object with options
28
+ *
29
+ * @returns The start of a week
30
+ *
31
+ * @example
32
+ * // The start of a week for 2 September 2014 11:55:00:
33
+ * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))
34
+ * //=> Sun Aug 31 2014 00:00:00
35
+ *
36
+ * @example
37
+ * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:
38
+ * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })
39
+ * //=> Mon Sep 01 2014 00:00:00
40
+ */
41
+ export declare function startOfWeek<
42
+ DateType extends Date,
43
+ ResultDate extends Date = DateType,
44
+ >(
45
+ date: DateArg<DateType>,
46
+ options?: StartOfWeekOptions<ResultDate>,
47
+ ): ResultDate;
node_modules/date-fns/startOfWeek.d.ts ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {
2
+ ContextOptions,
3
+ DateArg,
4
+ LocalizedOptions,
5
+ WeekOptions,
6
+ } from "./types.js";
7
+ /**
8
+ * The {@link startOfWeek} function options.
9
+ */
10
+ export interface StartOfWeekOptions<DateType extends Date = Date>
11
+ extends LocalizedOptions<"options">,
12
+ WeekOptions,
13
+ ContextOptions<DateType> {}
14
+ /**
15
+ * @name startOfWeek
16
+ * @category Week Helpers
17
+ * @summary Return the start of a week for the given date.
18
+ *
19
+ * @description
20
+ * Return the start of a week for the given date.
21
+ * The result will be in the local timezone.
22
+ *
23
+ * @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).
24
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
25
+ *
26
+ * @param date - The original date
27
+ * @param options - An object with options
28
+ *
29
+ * @returns The start of a week
30
+ *
31
+ * @example
32
+ * // The start of a week for 2 September 2014 11:55:00:
33
+ * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))
34
+ * //=> Sun Aug 31 2014 00:00:00
35
+ *
36
+ * @example
37
+ * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:
38
+ * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })
39
+ * //=> Mon Sep 01 2014 00:00:00
40
+ */
41
+ export declare function startOfWeek<
42
+ DateType extends Date,
43
+ ResultDate extends Date = DateType,
44
+ >(
45
+ date: DateArg<DateType>,
46
+ options?: StartOfWeekOptions<ResultDate>,
47
+ ): ResultDate;
node_modules/date-fns/startOfWeek.js ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { getDefaultOptions } from "./_lib/defaultOptions.js";
2
+ import { toDate } from "./toDate.js";
3
+
4
+ /**
5
+ * The {@link startOfWeek} function options.
6
+ */
7
+
8
+ /**
9
+ * @name startOfWeek
10
+ * @category Week Helpers
11
+ * @summary Return the start of a week for the given date.
12
+ *
13
+ * @description
14
+ * Return the start of a week for the given date.
15
+ * The result will be in the local timezone.
16
+ *
17
+ * @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).
18
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
19
+ *
20
+ * @param date - The original date
21
+ * @param options - An object with options
22
+ *
23
+ * @returns The start of a week
24
+ *
25
+ * @example
26
+ * // The start of a week for 2 September 2014 11:55:00:
27
+ * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))
28
+ * //=> Sun Aug 31 2014 00:00:00
29
+ *
30
+ * @example
31
+ * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:
32
+ * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })
33
+ * //=> Mon Sep 01 2014 00:00:00
34
+ */
35
+ export function startOfWeek(date, options) {
36
+ const defaultOptions = getDefaultOptions();
37
+ const weekStartsOn =
38
+ options?.weekStartsOn ??
39
+ options?.locale?.options?.weekStartsOn ??
40
+ defaultOptions.weekStartsOn ??
41
+ defaultOptions.locale?.options?.weekStartsOn ??
42
+ 0;
43
+
44
+ const _date = toDate(date, options?.in);
45
+ const day = _date.getDay();
46
+ const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
47
+
48
+ _date.setDate(_date.getDate() - diff);
49
+ _date.setHours(0, 0, 0, 0);
50
+ return _date;
51
+ }
52
+
53
+ // Fallback for modularized imports:
54
+ export default startOfWeek;
node_modules/date-fns/startOfWeekYear.cjs ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ exports.startOfWeekYear = startOfWeekYear;
3
+ var _index = require("./_lib/defaultOptions.cjs");
4
+ var _index2 = require("./constructFrom.cjs");
5
+ var _index3 = require("./getWeekYear.cjs");
6
+ var _index4 = require("./startOfWeek.cjs");
7
+
8
+ /**
9
+ * The {@link startOfWeekYear} function options.
10
+ */
11
+
12
+ /**
13
+ * @name startOfWeekYear
14
+ * @category Week-Numbering Year Helpers
15
+ * @summary Return the start of a local week-numbering year for the given date.
16
+ *
17
+ * @description
18
+ * Return the start of a local week-numbering year.
19
+ * The exact calculation depends on the values of
20
+ * `options.weekStartsOn` (which is the index of the first day of the week)
21
+ * and `options.firstWeekContainsDate` (which is the day of January, which is always in
22
+ * the first week of the week-numbering year)
23
+ *
24
+ * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
25
+ *
26
+ * @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).
27
+ * @typeParam ResultDate - The result `Date` type.
28
+ *
29
+ * @param date - The original date
30
+ * @param options - An object with options
31
+ *
32
+ * @returns The start of a week-numbering year
33
+ *
34
+ * @example
35
+ * // The start of an a week-numbering year for 2 July 2005 with default settings:
36
+ * const result = startOfWeekYear(new Date(2005, 6, 2))
37
+ * //=> Sun Dec 26 2004 00:00:00
38
+ *
39
+ * @example
40
+ * // The start of a week-numbering year for 2 July 2005
41
+ * // if Monday is the first day of week
42
+ * // and 4 January is always in the first week of the year:
43
+ * const result = startOfWeekYear(new Date(2005, 6, 2), {
44
+ * weekStartsOn: 1,
45
+ * firstWeekContainsDate: 4
46
+ * })
47
+ * //=> Mon Jan 03 2005 00:00:00
48
+ */
49
+ function startOfWeekYear(date, options) {
50
+ const defaultOptions = (0, _index.getDefaultOptions)();
51
+ const firstWeekContainsDate =
52
+ options?.firstWeekContainsDate ??
53
+ options?.locale?.options?.firstWeekContainsDate ??
54
+ defaultOptions.firstWeekContainsDate ??
55
+ defaultOptions.locale?.options?.firstWeekContainsDate ??
56
+ 1;
57
+
58
+ const year = (0, _index3.getWeekYear)(date, options);
59
+ const firstWeek = (0, _index2.constructFrom)(options?.in || date, 0);
60
+ firstWeek.setFullYear(year, 0, firstWeekContainsDate);
61
+ firstWeek.setHours(0, 0, 0, 0);
62
+ const _date = (0, _index4.startOfWeek)(firstWeek, options);
63
+ return _date;
64
+ }
node_modules/date-fns/startOfWeekYear.d.cts ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {
2
+ ContextOptions,
3
+ DateArg,
4
+ FirstWeekContainsDateOptions,
5
+ LocalizedOptions,
6
+ WeekOptions,
7
+ } from "./types.js";
8
+ /**
9
+ * The {@link startOfWeekYear} function options.
10
+ */
11
+ export interface StartOfWeekYearOptions<DateType extends Date = Date>
12
+ extends LocalizedOptions<"options">,
13
+ FirstWeekContainsDateOptions,
14
+ WeekOptions,
15
+ ContextOptions<DateType> {}
16
+ /**
17
+ * @name startOfWeekYear
18
+ * @category Week-Numbering Year Helpers
19
+ * @summary Return the start of a local week-numbering year for the given date.
20
+ *
21
+ * @description
22
+ * Return the start of a local week-numbering year.
23
+ * The exact calculation depends on the values of
24
+ * `options.weekStartsOn` (which is the index of the first day of the week)
25
+ * and `options.firstWeekContainsDate` (which is the day of January, which is always in
26
+ * the first week of the week-numbering year)
27
+ *
28
+ * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
29
+ *
30
+ * @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).
31
+ * @typeParam ResultDate - The result `Date` type.
32
+ *
33
+ * @param date - The original date
34
+ * @param options - An object with options
35
+ *
36
+ * @returns The start of a week-numbering year
37
+ *
38
+ * @example
39
+ * // The start of an a week-numbering year for 2 July 2005 with default settings:
40
+ * const result = startOfWeekYear(new Date(2005, 6, 2))
41
+ * //=> Sun Dec 26 2004 00:00:00
42
+ *
43
+ * @example
44
+ * // The start of a week-numbering year for 2 July 2005
45
+ * // if Monday is the first day of week
46
+ * // and 4 January is always in the first week of the year:
47
+ * const result = startOfWeekYear(new Date(2005, 6, 2), {
48
+ * weekStartsOn: 1,
49
+ * firstWeekContainsDate: 4
50
+ * })
51
+ * //=> Mon Jan 03 2005 00:00:00
52
+ */
53
+ export declare function startOfWeekYear<
54
+ DateType extends Date,
55
+ ResultDate extends Date = DateType,
56
+ >(
57
+ date: DateArg<DateType>,
58
+ options?: StartOfWeekYearOptions<ResultDate>,
59
+ ): ResultDate;
node_modules/date-fns/startOfWeekYear.d.ts ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {
2
+ ContextOptions,
3
+ DateArg,
4
+ FirstWeekContainsDateOptions,
5
+ LocalizedOptions,
6
+ WeekOptions,
7
+ } from "./types.js";
8
+ /**
9
+ * The {@link startOfWeekYear} function options.
10
+ */
11
+ export interface StartOfWeekYearOptions<DateType extends Date = Date>
12
+ extends LocalizedOptions<"options">,
13
+ FirstWeekContainsDateOptions,
14
+ WeekOptions,
15
+ ContextOptions<DateType> {}
16
+ /**
17
+ * @name startOfWeekYear
18
+ * @category Week-Numbering Year Helpers
19
+ * @summary Return the start of a local week-numbering year for the given date.
20
+ *
21
+ * @description
22
+ * Return the start of a local week-numbering year.
23
+ * The exact calculation depends on the values of
24
+ * `options.weekStartsOn` (which is the index of the first day of the week)
25
+ * and `options.firstWeekContainsDate` (which is the day of January, which is always in
26
+ * the first week of the week-numbering year)
27
+ *
28
+ * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
29
+ *
30
+ * @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).
31
+ * @typeParam ResultDate - The result `Date` type.
32
+ *
33
+ * @param date - The original date
34
+ * @param options - An object with options
35
+ *
36
+ * @returns The start of a week-numbering year
37
+ *
38
+ * @example
39
+ * // The start of an a week-numbering year for 2 July 2005 with default settings:
40
+ * const result = startOfWeekYear(new Date(2005, 6, 2))
41
+ * //=> Sun Dec 26 2004 00:00:00
42
+ *
43
+ * @example
44
+ * // The start of a week-numbering year for 2 July 2005
45
+ * // if Monday is the first day of week
46
+ * // and 4 January is always in the first week of the year:
47
+ * const result = startOfWeekYear(new Date(2005, 6, 2), {
48
+ * weekStartsOn: 1,
49
+ * firstWeekContainsDate: 4
50
+ * })
51
+ * //=> Mon Jan 03 2005 00:00:00
52
+ */
53
+ export declare function startOfWeekYear<
54
+ DateType extends Date,
55
+ ResultDate extends Date = DateType,
56
+ >(
57
+ date: DateArg<DateType>,
58
+ options?: StartOfWeekYearOptions<ResultDate>,
59
+ ): ResultDate;
node_modules/date-fns/startOfWeekYear.js ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { getDefaultOptions } from "./_lib/defaultOptions.js";
2
+ import { constructFrom } from "./constructFrom.js";
3
+ import { getWeekYear } from "./getWeekYear.js";
4
+ import { startOfWeek } from "./startOfWeek.js";
5
+
6
+ /**
7
+ * The {@link startOfWeekYear} function options.
8
+ */
9
+
10
+ /**
11
+ * @name startOfWeekYear
12
+ * @category Week-Numbering Year Helpers
13
+ * @summary Return the start of a local week-numbering year for the given date.
14
+ *
15
+ * @description
16
+ * Return the start of a local week-numbering year.
17
+ * The exact calculation depends on the values of
18
+ * `options.weekStartsOn` (which is the index of the first day of the week)
19
+ * and `options.firstWeekContainsDate` (which is the day of January, which is always in
20
+ * the first week of the week-numbering year)
21
+ *
22
+ * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
23
+ *
24
+ * @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).
25
+ * @typeParam ResultDate - The result `Date` type.
26
+ *
27
+ * @param date - The original date
28
+ * @param options - An object with options
29
+ *
30
+ * @returns The start of a week-numbering year
31
+ *
32
+ * @example
33
+ * // The start of an a week-numbering year for 2 July 2005 with default settings:
34
+ * const result = startOfWeekYear(new Date(2005, 6, 2))
35
+ * //=> Sun Dec 26 2004 00:00:00
36
+ *
37
+ * @example
38
+ * // The start of a week-numbering year for 2 July 2005
39
+ * // if Monday is the first day of week
40
+ * // and 4 January is always in the first week of the year:
41
+ * const result = startOfWeekYear(new Date(2005, 6, 2), {
42
+ * weekStartsOn: 1,
43
+ * firstWeekContainsDate: 4
44
+ * })
45
+ * //=> Mon Jan 03 2005 00:00:00
46
+ */
47
+ export function startOfWeekYear(date, options) {
48
+ const defaultOptions = getDefaultOptions();
49
+ const firstWeekContainsDate =
50
+ options?.firstWeekContainsDate ??
51
+ options?.locale?.options?.firstWeekContainsDate ??
52
+ defaultOptions.firstWeekContainsDate ??
53
+ defaultOptions.locale?.options?.firstWeekContainsDate ??
54
+ 1;
55
+
56
+ const year = getWeekYear(date, options);
57
+ const firstWeek = constructFrom(options?.in || date, 0);
58
+ firstWeek.setFullYear(year, 0, firstWeekContainsDate);
59
+ firstWeek.setHours(0, 0, 0, 0);
60
+ const _date = startOfWeek(firstWeek, options);
61
+ return _date;
62
+ }
63
+
64
+ // Fallback for modularized imports:
65
+ export default startOfWeekYear;
node_modules/date-fns/startOfYear.cjs ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ exports.startOfYear = startOfYear;
3
+ var _index = require("./toDate.cjs");
4
+
5
+ /**
6
+ * The {@link startOfYear} function options.
7
+ */
8
+
9
+ /**
10
+ * @name startOfYear
11
+ * @category Year Helpers
12
+ * @summary Return the start of a year for the given date.
13
+ *
14
+ * @description
15
+ * Return the start of a year for the given date.
16
+ * The result will be in the local timezone.
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 - The options
23
+ *
24
+ * @returns The start of a year
25
+ *
26
+ * @example
27
+ * // The start of a year for 2 September 2014 11:55:00:
28
+ * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))
29
+ * //=> Wed Jan 01 2014 00:00:00
30
+ */
31
+ function startOfYear(date, options) {
32
+ const date_ = (0, _index.toDate)(date, options?.in);
33
+ date_.setFullYear(date_.getFullYear(), 0, 1);
34
+ date_.setHours(0, 0, 0, 0);
35
+ return date_;
36
+ }