karsten-design-system 1.1.57 → 1.1.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node_modules/react/jsx-runtime.js +2 -4
- package/dist/node_modules/react/jsx-runtime.js.map +1 -1
- package/dist/stories/components/button.js +1 -1
- package/dist/stories/components/button.js.map +1 -1
- package/dist/stories/components/notificationItem.js +1 -1
- package/package.json +2 -1
- package/dist/_virtual/react-jsx-runtime.development.js +0 -4
- package/dist/_virtual/react-jsx-runtime.development.js.map +0 -1
- package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +0 -8
- package/dist/node_modules/date-fns/_lib/addLeadingZeros.js.map +0 -1
- package/dist/node_modules/date-fns/_lib/defaultOptions.js +0 -8
- package/dist/node_modules/date-fns/_lib/defaultOptions.js.map +0 -1
- package/dist/node_modules/date-fns/_lib/format/formatters.js +0 -776
- package/dist/node_modules/date-fns/_lib/format/formatters.js.map +0 -1
- package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +0 -95
- package/dist/node_modules/date-fns/_lib/format/lightFormatters.js.map +0 -1
- package/dist/node_modules/date-fns/_lib/format/longFormatters.js +0 -67
- package/dist/node_modules/date-fns/_lib/format/longFormatters.js.map +0 -1
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +0 -32
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js.map +0 -1
- package/dist/node_modules/date-fns/_lib/normalizeDates.js +0 -12
- package/dist/node_modules/date-fns/_lib/normalizeDates.js.map +0 -1
- package/dist/node_modules/date-fns/_lib/protectedTokens.js +0 -26
- package/dist/node_modules/date-fns/_lib/protectedTokens.js.map +0 -1
- package/dist/node_modules/date-fns/constants.js +0 -47
- package/dist/node_modules/date-fns/constants.js.map +0 -1
- package/dist/node_modules/date-fns/constructFrom.js +0 -50
- package/dist/node_modules/date-fns/constructFrom.js.map +0 -1
- package/dist/node_modules/date-fns/differenceInCalendarDays.js +0 -63
- package/dist/node_modules/date-fns/differenceInCalendarDays.js.map +0 -1
- package/dist/node_modules/date-fns/format.js +0 -424
- package/dist/node_modules/date-fns/format.js.map +0 -1
- package/dist/node_modules/date-fns/getDayOfYear.js +0 -35
- package/dist/node_modules/date-fns/getDayOfYear.js.map +0 -1
- package/dist/node_modules/date-fns/getISOWeek.js +0 -41
- package/dist/node_modules/date-fns/getISOWeek.js.map +0 -1
- package/dist/node_modules/date-fns/getISOWeekYear.js +0 -53
- package/dist/node_modules/date-fns/getISOWeekYear.js.map +0 -1
- package/dist/node_modules/date-fns/getWeek.js +0 -55
- package/dist/node_modules/date-fns/getWeek.js.map +0 -1
- package/dist/node_modules/date-fns/getWeekYear.js +0 -76
- package/dist/node_modules/date-fns/getWeekYear.js.map +0 -1
- package/dist/node_modules/date-fns/isDate.js +0 -42
- package/dist/node_modules/date-fns/isDate.js.map +0 -1
- package/dist/node_modules/date-fns/isValid.js +0 -40
- package/dist/node_modules/date-fns/isValid.js.map +0 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +0 -104
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js.map +0 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +0 -42
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js.map +0 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +0 -14
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js.map +0 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +0 -190
- package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js.map +0 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +0 -135
- package/dist/node_modules/date-fns/locale/en-US/_lib/match.js.map +0 -1
- package/dist/node_modules/date-fns/locale/en-US.js +0 -29
- package/dist/node_modules/date-fns/locale/en-US.js.map +0 -1
- package/dist/node_modules/date-fns/startOfDay.js +0 -36
- package/dist/node_modules/date-fns/startOfDay.js.map +0 -1
- package/dist/node_modules/date-fns/startOfISOWeek.js +0 -36
- package/dist/node_modules/date-fns/startOfISOWeek.js.map +0 -1
- package/dist/node_modules/date-fns/startOfISOWeekYear.js +0 -43
- package/dist/node_modules/date-fns/startOfISOWeekYear.js.map +0 -1
- package/dist/node_modules/date-fns/startOfWeek.js +0 -54
- package/dist/node_modules/date-fns/startOfWeek.js.map +0 -1
- package/dist/node_modules/date-fns/startOfWeekYear.js +0 -65
- package/dist/node_modules/date-fns/startOfWeekYear.js.map +0 -1
- package/dist/node_modules/date-fns/startOfYear.js +0 -37
- package/dist/node_modules/date-fns/startOfYear.js.map +0 -1
- package/dist/node_modules/date-fns/toDate.js +0 -47
- package/dist/node_modules/date-fns/toDate.js.map +0 -1
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.js +0 -369
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.js.map +0 -1
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import { buildMatchFn } from '../../_lib/buildMatchFn.js';
|
|
2
|
-
import { buildMatchPatternFn } from '../../_lib/buildMatchPatternFn.js';
|
|
3
|
-
|
|
4
|
-
const matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
|
|
5
|
-
const parseOrdinalNumberPattern = /\d+/i;
|
|
6
|
-
|
|
7
|
-
const matchEraPatterns = {
|
|
8
|
-
narrow: /^(b|a)/i,
|
|
9
|
-
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
10
|
-
wide: /^(before christ|before common era|anno domini|common era)/i,
|
|
11
|
-
};
|
|
12
|
-
const parseEraPatterns = {
|
|
13
|
-
any: [/^b/i, /^(a|c)/i],
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const matchQuarterPatterns = {
|
|
17
|
-
narrow: /^[1234]/i,
|
|
18
|
-
abbreviated: /^q[1234]/i,
|
|
19
|
-
wide: /^[1234](th|st|nd|rd)? quarter/i,
|
|
20
|
-
};
|
|
21
|
-
const parseQuarterPatterns = {
|
|
22
|
-
any: [/1/i, /2/i, /3/i, /4/i],
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const matchMonthPatterns = {
|
|
26
|
-
narrow: /^[jfmasond]/i,
|
|
27
|
-
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
28
|
-
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i,
|
|
29
|
-
};
|
|
30
|
-
const parseMonthPatterns = {
|
|
31
|
-
narrow: [
|
|
32
|
-
/^j/i,
|
|
33
|
-
/^f/i,
|
|
34
|
-
/^m/i,
|
|
35
|
-
/^a/i,
|
|
36
|
-
/^m/i,
|
|
37
|
-
/^j/i,
|
|
38
|
-
/^j/i,
|
|
39
|
-
/^a/i,
|
|
40
|
-
/^s/i,
|
|
41
|
-
/^o/i,
|
|
42
|
-
/^n/i,
|
|
43
|
-
/^d/i,
|
|
44
|
-
],
|
|
45
|
-
|
|
46
|
-
any: [
|
|
47
|
-
/^ja/i,
|
|
48
|
-
/^f/i,
|
|
49
|
-
/^mar/i,
|
|
50
|
-
/^ap/i,
|
|
51
|
-
/^may/i,
|
|
52
|
-
/^jun/i,
|
|
53
|
-
/^jul/i,
|
|
54
|
-
/^au/i,
|
|
55
|
-
/^s/i,
|
|
56
|
-
/^o/i,
|
|
57
|
-
/^n/i,
|
|
58
|
-
/^d/i,
|
|
59
|
-
],
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
const matchDayPatterns = {
|
|
63
|
-
narrow: /^[smtwf]/i,
|
|
64
|
-
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
65
|
-
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
66
|
-
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i,
|
|
67
|
-
};
|
|
68
|
-
const parseDayPatterns = {
|
|
69
|
-
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
70
|
-
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i],
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
const matchDayPeriodPatterns = {
|
|
74
|
-
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
75
|
-
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i,
|
|
76
|
-
};
|
|
77
|
-
const parseDayPeriodPatterns = {
|
|
78
|
-
any: {
|
|
79
|
-
am: /^a/i,
|
|
80
|
-
pm: /^p/i,
|
|
81
|
-
midnight: /^mi/i,
|
|
82
|
-
noon: /^no/i,
|
|
83
|
-
morning: /morning/i,
|
|
84
|
-
afternoon: /afternoon/i,
|
|
85
|
-
evening: /evening/i,
|
|
86
|
-
night: /night/i,
|
|
87
|
-
},
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
const match = {
|
|
91
|
-
ordinalNumber: buildMatchPatternFn({
|
|
92
|
-
matchPattern: matchOrdinalNumberPattern,
|
|
93
|
-
parsePattern: parseOrdinalNumberPattern,
|
|
94
|
-
valueCallback: (value) => parseInt(value, 10),
|
|
95
|
-
}),
|
|
96
|
-
|
|
97
|
-
era: buildMatchFn({
|
|
98
|
-
matchPatterns: matchEraPatterns,
|
|
99
|
-
defaultMatchWidth: "wide",
|
|
100
|
-
parsePatterns: parseEraPatterns,
|
|
101
|
-
defaultParseWidth: "any",
|
|
102
|
-
}),
|
|
103
|
-
|
|
104
|
-
quarter: buildMatchFn({
|
|
105
|
-
matchPatterns: matchQuarterPatterns,
|
|
106
|
-
defaultMatchWidth: "wide",
|
|
107
|
-
parsePatterns: parseQuarterPatterns,
|
|
108
|
-
defaultParseWidth: "any",
|
|
109
|
-
valueCallback: (index) => index + 1,
|
|
110
|
-
}),
|
|
111
|
-
|
|
112
|
-
month: buildMatchFn({
|
|
113
|
-
matchPatterns: matchMonthPatterns,
|
|
114
|
-
defaultMatchWidth: "wide",
|
|
115
|
-
parsePatterns: parseMonthPatterns,
|
|
116
|
-
defaultParseWidth: "any",
|
|
117
|
-
}),
|
|
118
|
-
|
|
119
|
-
day: buildMatchFn({
|
|
120
|
-
matchPatterns: matchDayPatterns,
|
|
121
|
-
defaultMatchWidth: "wide",
|
|
122
|
-
parsePatterns: parseDayPatterns,
|
|
123
|
-
defaultParseWidth: "any",
|
|
124
|
-
}),
|
|
125
|
-
|
|
126
|
-
dayPeriod: buildMatchFn({
|
|
127
|
-
matchPatterns: matchDayPeriodPatterns,
|
|
128
|
-
defaultMatchWidth: "any",
|
|
129
|
-
parsePatterns: parseDayPeriodPatterns,
|
|
130
|
-
defaultParseWidth: "any",
|
|
131
|
-
}),
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
export { match };
|
|
135
|
-
//# sourceMappingURL=match.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"match.js","sources":["../../../../../../node_modules/date-fns/locale/en-US/_lib/match.js"],"sourcesContent":["import { buildMatchFn } from \"../../_lib/buildMatchFn.js\";\nimport { buildMatchPatternFn } from \"../../_lib/buildMatchPatternFn.js\";\n\nconst matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nconst parseOrdinalNumberPattern = /\\d+/i;\n\nconst matchEraPatterns = {\n narrow: /^(b|a)/i,\n abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n wide: /^(before christ|before common era|anno domini|common era)/i,\n};\nconst parseEraPatterns = {\n any: [/^b/i, /^(a|c)/i],\n};\n\nconst matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^q[1234]/i,\n wide: /^[1234](th|st|nd|rd)? quarter/i,\n};\nconst parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i],\n};\n\nconst matchMonthPatterns = {\n narrow: /^[jfmasond]/i,\n abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i,\n};\nconst parseMonthPatterns = {\n narrow: [\n /^j/i,\n /^f/i,\n /^m/i,\n /^a/i,\n /^m/i,\n /^j/i,\n /^j/i,\n /^a/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n\n any: [\n /^ja/i,\n /^f/i,\n /^mar/i,\n /^ap/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^au/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n};\n\nconst matchDayPatterns = {\n narrow: /^[smtwf]/i,\n short: /^(su|mo|tu|we|th|fr|sa)/i,\n abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i,\n};\nconst parseDayPatterns = {\n narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i],\n};\n\nconst matchDayPeriodPatterns = {\n narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i,\n};\nconst parseDayPeriodPatterns = {\n any: {\n am: /^a/i,\n pm: /^p/i,\n midnight: /^mi/i,\n noon: /^no/i,\n morning: /morning/i,\n afternoon: /afternoon/i,\n evening: /evening/i,\n night: /night/i,\n },\n};\n\nexport const match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: (value) => parseInt(value, 10),\n }),\n\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseEraPatterns,\n defaultParseWidth: \"any\",\n }),\n\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: \"any\",\n valueCallback: (index) => index + 1,\n }),\n\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: \"any\",\n }),\n\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseDayPatterns,\n defaultParseWidth: \"any\",\n }),\n\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: \"any\",\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: \"any\",\n }),\n};\n"],"names":[],"mappings":"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","x_google_ignoreList":[0]}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { formatDistance } from './en-US/_lib/formatDistance.js';
|
|
2
|
-
import { formatLong } from './en-US/_lib/formatLong.js';
|
|
3
|
-
import { formatRelative } from './en-US/_lib/formatRelative.js';
|
|
4
|
-
import { localize } from './en-US/_lib/localize.js';
|
|
5
|
-
import { match } from './en-US/_lib/match.js';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @category Locales
|
|
9
|
-
* @summary English locale (United States).
|
|
10
|
-
* @language English
|
|
11
|
-
* @iso-639-2 eng
|
|
12
|
-
* @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)
|
|
13
|
-
* @author Lesha Koss [@leshakoss](https://github.com/leshakoss)
|
|
14
|
-
*/
|
|
15
|
-
const enUS = {
|
|
16
|
-
code: "en-US",
|
|
17
|
-
formatDistance: formatDistance,
|
|
18
|
-
formatLong: formatLong,
|
|
19
|
-
formatRelative: formatRelative,
|
|
20
|
-
localize: localize,
|
|
21
|
-
match: match,
|
|
22
|
-
options: {
|
|
23
|
-
weekStartsOn: 0 /* Sunday */,
|
|
24
|
-
firstWeekContainsDate: 1,
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export { enUS as default, enUS };
|
|
29
|
-
//# sourceMappingURL=en-US.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"en-US.js","sources":["../../../../node_modules/date-fns/locale/en-US.js"],"sourcesContent":["import { formatDistance } from \"./en-US/_lib/formatDistance.js\";\nimport { formatLong } from \"./en-US/_lib/formatLong.js\";\nimport { formatRelative } from \"./en-US/_lib/formatRelative.js\";\nimport { localize } from \"./en-US/_lib/localize.js\";\nimport { match } from \"./en-US/_lib/match.js\";\n\n/**\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)\n * @author Lesha Koss [@leshakoss](https://github.com/leshakoss)\n */\nexport const enUS = {\n code: \"en-US\",\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 0 /* Sunday */,\n firstWeekContainsDate: 1,\n },\n};\n\n// Fallback for modularized imports:\nexport default enUS;\n"],"names":[],"mappings":";;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,IAAI,GAAG;AACpB,EAAE,IAAI,EAAE,OAAO;AACf,EAAE,cAAc,EAAE,cAAc;AAChC,EAAE,UAAU,EAAE,UAAU;AACxB,EAAE,cAAc,EAAE,cAAc;AAChC,EAAE,QAAQ,EAAE,QAAQ;AACpB,EAAE,KAAK,EAAE,KAAK;AACd,EAAE,OAAO,EAAE;AACX,IAAI,YAAY,EAAE,CAAC;AACnB,IAAI,qBAAqB,EAAE,CAAC;AAC5B,GAAG;AACH;;;;","x_google_ignoreList":[0]}
|
|
@@ -1,36 +0,0 @@
|
|
|
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
|
-
function startOfDay(date, options) {
|
|
30
|
-
const _date = toDate(date, options?.in);
|
|
31
|
-
_date.setHours(0, 0, 0, 0);
|
|
32
|
-
return _date;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export { startOfDay as default, startOfDay };
|
|
36
|
-
//# sourceMappingURL=startOfDay.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"startOfDay.js","sources":["../../../node_modules/date-fns/startOfDay.js"],"sourcesContent":["import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfDay} function options.\n */\n\n/**\n * @name startOfDay\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * @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).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a day\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\nexport function startOfDay(date, options) {\n const _date = toDate(date, options?.in);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfDay;\n"],"names":[],"mappings":";;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE;AAC1C,EAAE,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC;AACzC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAC5B,EAAE,OAAO,KAAK;AACd;;;;","x_google_ignoreList":[0]}
|
|
@@ -1,36 +0,0 @@
|
|
|
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
|
-
function startOfISOWeek(date, options) {
|
|
32
|
-
return startOfWeek(date, { ...options, weekStartsOn: 1 });
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export { startOfISOWeek as default, startOfISOWeek };
|
|
36
|
-
//# sourceMappingURL=startOfISOWeek.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"startOfISOWeek.js","sources":["../../../node_modules/date-fns/startOfISOWeek.js"],"sourcesContent":["import { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link startOfISOWeek} function options.\n */\n\n/**\n * @name startOfISOWeek\n * @category ISO Week Helpers\n * @summary Return the start of an ISO week for the given date.\n *\n * @description\n * Return the start of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @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).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of an ISO week\n *\n * @example\n * // The start of an ISO week for 2 September 2014 11:55:00:\n * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfISOWeek(date, options) {\n return startOfWeek(date, { ...options, weekStartsOn: 1 });\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeek;\n"],"names":[],"mappings":";;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE;AAC9C,EAAE,OAAO,WAAW,CAAC,IAAI,EAAE,EAAE,GAAG,OAAO,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;AAC3D;;;;","x_google_ignoreList":[0]}
|
|
@@ -1,43 +0,0 @@
|
|
|
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
|
-
function startOfISOWeekYear(date, options) {
|
|
35
|
-
const year = getISOWeekYear(date, options);
|
|
36
|
-
const fourthOfJanuary = constructFrom(date, 0);
|
|
37
|
-
fourthOfJanuary.setFullYear(year, 0, 4);
|
|
38
|
-
fourthOfJanuary.setHours(0, 0, 0, 0);
|
|
39
|
-
return startOfISOWeek(fourthOfJanuary);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export { startOfISOWeekYear as default, startOfISOWeekYear };
|
|
43
|
-
//# sourceMappingURL=startOfISOWeekYear.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"startOfISOWeekYear.js","sources":["../../../node_modules/date-fns/startOfISOWeekYear.js"],"sourcesContent":["import { constructFrom } from \"./constructFrom.js\";\nimport { getISOWeekYear } from \"./getISOWeekYear.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\n\n/**\n * The {@link startOfISOWeekYear} function options.\n */\n\n/**\n * @name startOfISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Return the start of an ISO week-numbering year for the given date.\n *\n * @description\n * Return the start of an ISO week-numbering year,\n * which always starts 3 days before the year's first Thursday.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @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).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of an ISO week-numbering year\n *\n * @example\n * // The start of an ISO week-numbering year for 2 July 2005:\n * const result = startOfISOWeekYear(new Date(2005, 6, 2))\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfISOWeekYear(date, options) {\n const year = getISOWeekYear(date, options);\n const fourthOfJanuary = constructFrom(options?.in || date, 0);\n fourthOfJanuary.setFullYear(year, 0, 4);\n fourthOfJanuary.setHours(0, 0, 0, 0);\n return startOfISOWeek(fourthOfJanuary);\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeekYear;\n"],"names":[],"mappings":";;;;AAIA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,kBAAkB,CAAC,IAAI,EAAE,OAAO,EAAE;AAClD,EAAE,MAAM,IAAI,GAAG,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC;AAC5C,EAAE,MAAM,eAAe,GAAG,aAAa,CAAgB,IAAI,EAAE,CAAC,CAAC;AAC/D,EAAE,eAAe,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;AACzC,EAAE,eAAe,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AACtC,EAAE,OAAO,cAAc,CAAC,eAAe,CAAC;AACxC;;;;","x_google_ignoreList":[0]}
|
|
@@ -1,54 +0,0 @@
|
|
|
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
|
-
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
|
-
export { startOfWeek as default, startOfWeek };
|
|
54
|
-
//# sourceMappingURL=startOfWeek.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"startOfWeek.js","sources":["../../../node_modules/date-fns/startOfWeek.js"],"sourcesContent":["import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfWeek} function options.\n */\n\n/**\n * @name startOfWeek\n * @category Week Helpers\n * @summary Return the start of a week for the given date.\n *\n * @description\n * Return the start of a week for the given date.\n * The result will be in the local timezone.\n *\n * @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).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week\n *\n * @example\n * // The start of a week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfWeek(date, options) {\n const defaultOptions = getDefaultOptions();\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const _date = toDate(date, options?.in);\n const day = _date.getDay();\n const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n\n _date.setDate(_date.getDate() - diff);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeek;\n"],"names":[],"mappings":";;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE;AAC3C,EAAE,MAAM,cAAc,GAAG,iBAAiB,EAAE;AAC5C,EAAE,MAAM,YAAY;AACpB,IAAI,OAAO,EAAE,YAAY;AACzB,IAAI,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY;AAC1C,IAAI,cAAc,CAAC,YAAY;AAC/B,IAAI,cAAc,CAAC,MAAM,EAAE,OAAO,EAAE,YAAY;AAChD,IAAI,CAAC;;AAEL,EAAE,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC;AACzC,EAAE,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE;AAC5B,EAAE,MAAM,IAAI,GAAG,CAAC,GAAG,GAAG,YAAY,GAAG,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,YAAY;;AAEhE,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC;AACvC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAC5B,EAAE,OAAO,KAAK;AACd;;;;","x_google_ignoreList":[0]}
|
|
@@ -1,65 +0,0 @@
|
|
|
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
|
-
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
|
-
export { startOfWeekYear as default, startOfWeekYear };
|
|
65
|
-
//# sourceMappingURL=startOfWeekYear.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"startOfWeekYear.js","sources":["../../../node_modules/date-fns/startOfWeekYear.js"],"sourcesContent":["import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { getWeekYear } from \"./getWeekYear.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link startOfWeekYear} function options.\n */\n\n/**\n * @name startOfWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Return the start of a local week-numbering year for the given date.\n *\n * @description\n * Return the start of a local week-numbering year.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @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).\n * @typeParam ResultDate - The result `Date` type.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week-numbering year\n *\n * @example\n * // The start of an a week-numbering year for 2 July 2005 with default settings:\n * const result = startOfWeekYear(new Date(2005, 6, 2))\n * //=> Sun Dec 26 2004 00:00:00\n *\n * @example\n * // The start of a week-numbering year for 2 July 2005\n * // if Monday is the first day of week\n * // and 4 January is always in the first week of the year:\n * const result = startOfWeekYear(new Date(2005, 6, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfWeekYear(date, options) {\n const defaultOptions = getDefaultOptions();\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const year = getWeekYear(date, options);\n const firstWeek = constructFrom(options?.in || date, 0);\n firstWeek.setFullYear(year, 0, firstWeekContainsDate);\n firstWeek.setHours(0, 0, 0, 0);\n const _date = startOfWeek(firstWeek, options);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeekYear;\n"],"names":[],"mappings":";;;;;AAKA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE;AAC/C,EAAE,MAAM,cAAc,GAAG,iBAAiB,EAAE;AAC5C,EAAE,MAAM,qBAAqB;AAC7B,IAAI,OAAO,EAAE,qBAAqB;AAClC,IAAI,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,qBAAqB;AACnD,IAAI,cAAc,CAAC,qBAAqB;AACxC,IAAI,cAAc,CAAC,MAAM,EAAE,OAAO,EAAE,qBAAqB;AACzD,IAAI,CAAC;;AAEL,EAAE,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC;AACzC,EAAE,MAAM,SAAS,GAAG,aAAa,CAAC,OAAO,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;AACzD,EAAE,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,EAAE,qBAAqB,CAAC;AACvD,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAChC,EAAE,MAAM,KAAK,GAAG,WAAW,CAAC,SAAS,EAAE,OAAO,CAAC;AAC/C,EAAE,OAAO,KAAK;AACd;;;;","x_google_ignoreList":[0]}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { toDate } from './toDate.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* The {@link startOfYear} function options.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @name startOfYear
|
|
9
|
-
* @category Year Helpers
|
|
10
|
-
* @summary Return the start of a year for the given date.
|
|
11
|
-
*
|
|
12
|
-
* @description
|
|
13
|
-
* Return the start of a year 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 year
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* // The start of a year for 2 September 2014 11:55:00:
|
|
26
|
-
* const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))
|
|
27
|
-
* //=> Wed Jan 01 2014 00:00:00
|
|
28
|
-
*/
|
|
29
|
-
function startOfYear(date, options) {
|
|
30
|
-
const date_ = toDate(date, options?.in);
|
|
31
|
-
date_.setFullYear(date_.getFullYear(), 0, 1);
|
|
32
|
-
date_.setHours(0, 0, 0, 0);
|
|
33
|
-
return date_;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export { startOfYear as default, startOfYear };
|
|
37
|
-
//# sourceMappingURL=startOfYear.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"startOfYear.js","sources":["../../../node_modules/date-fns/startOfYear.js"],"sourcesContent":["import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfYear} function options.\n */\n\n/**\n * @name startOfYear\n * @category Year Helpers\n * @summary Return the start of a year for the given date.\n *\n * @description\n * Return the start of a year for the given date.\n * The result will be in the local timezone.\n *\n * @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).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a year\n *\n * @example\n * // The start of a year for 2 September 2014 11:55:00:\n * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Jan 01 2014 00:00:00\n */\nexport function startOfYear(date, options) {\n const date_ = toDate(date, options?.in);\n date_.setFullYear(date_.getFullYear(), 0, 1);\n date_.setHours(0, 0, 0, 0);\n return date_;\n}\n\n// Fallback for modularized imports:\nexport default startOfYear;\n"],"names":[],"mappings":";;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE;AAC3C,EAAE,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC;AACzC,EAAE,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;AAC9C,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAC5B,EAAE,OAAO,KAAK;AACd;;;;","x_google_ignoreList":[0]}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { constructFrom } from './constructFrom.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @name toDate
|
|
5
|
-
* @category Common Helpers
|
|
6
|
-
* @summary Convert the given argument to an instance of Date.
|
|
7
|
-
*
|
|
8
|
-
* @description
|
|
9
|
-
* Convert the given argument to an instance of Date.
|
|
10
|
-
*
|
|
11
|
-
* If the argument is an instance of Date, the function returns its clone.
|
|
12
|
-
*
|
|
13
|
-
* If the argument is a number, it is treated as a timestamp.
|
|
14
|
-
*
|
|
15
|
-
* If the argument is none of the above, the function returns Invalid Date.
|
|
16
|
-
*
|
|
17
|
-
* Starting from v3.7.0, it clones a date using `[Symbol.for("constructDateFrom")]`
|
|
18
|
-
* enabling to transfer extra properties from the reference date to the new date.
|
|
19
|
-
* It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)
|
|
20
|
-
* that accept a time zone as a constructor argument.
|
|
21
|
-
*
|
|
22
|
-
* **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
|
|
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, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
26
|
-
*
|
|
27
|
-
* @param argument - The value to convert
|
|
28
|
-
*
|
|
29
|
-
* @returns The parsed date in the local time zone
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* // Clone the date:
|
|
33
|
-
* const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
|
|
34
|
-
* //=> Tue Feb 11 2014 11:30:30
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* // Convert the timestamp to date:
|
|
38
|
-
* const result = toDate(1392098430000)
|
|
39
|
-
* //=> Tue Feb 11 2014 11:30:30
|
|
40
|
-
*/
|
|
41
|
-
function toDate(argument, context) {
|
|
42
|
-
// [TODO] Get rid of `toDate` or `constructFrom`?
|
|
43
|
-
return constructFrom(context || argument, argument);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export { toDate as default, toDate };
|
|
47
|
-
//# sourceMappingURL=toDate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toDate.js","sources":["../../../node_modules/date-fns/toDate.js"],"sourcesContent":["import { constructFrom } from \"./constructFrom.js\";\n\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * Starting from v3.7.0, it clones a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @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).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param argument - The value to convert\n *\n * @returns The parsed date in the local time zone\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nexport function toDate(argument, context) {\n // [TODO] Get rid of `toDate` or `constructFrom`?\n return constructFrom(context || argument, argument);\n}\n\n// Fallback for modularized imports:\nexport default toDate;\n"],"names":[],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE;AAC1C;AACA,EAAE,OAAO,aAAa,CAAC,OAAO,IAAI,QAAQ,EAAE,QAAQ,CAAC;AACrD;;;;","x_google_ignoreList":[0]}
|