karsten-design-system 1.1.38 → 1.1.40
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/index.js +4877 -38
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/.storybook/index.css.js +0 -7
- package/dist/.storybook/index.css.js.map +0 -1
- package/dist/_virtual/jsx-runtime.js +0 -6
- package/dist/_virtual/jsx-runtime.js.map +0 -1
- package/dist/_virtual/jsx-runtime2.js +0 -4
- package/dist/_virtual/jsx-runtime2.js.map +0 -1
- package/dist/_virtual/react-jsx-runtime.development.js +0 -4
- package/dist/_virtual/react-jsx-runtime.development.js.map +0 -1
- package/dist/_virtual/react-jsx-runtime.production.js +0 -4
- package/dist/_virtual/react-jsx-runtime.production.js.map +0 -1
- package/dist/assets/icons/error.js +0 -8
- package/dist/assets/icons/error.js.map +0 -1
- package/dist/assets/icons/filter.js +0 -8
- package/dist/assets/icons/filter.js.map +0 -1
- package/dist/assets/icons/info.js +0 -8
- package/dist/assets/icons/info.js.map +0 -1
- package/dist/assets/icons/success.js +0 -8
- package/dist/assets/icons/success.js.map +0 -1
- package/dist/assets/icons/text.js +0 -8
- package/dist/assets/icons/text.js.map +0 -1
- package/dist/assets/logoSmall.js +0 -8
- package/dist/assets/logoSmall.js.map +0 -1
- package/dist/components/floating-label/index.js +0 -14
- package/dist/components/floating-label/index.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/_lib/buildFormatLongFn.js +0 -11
- package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js.map +0 -1
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +0 -65
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js.map +0 -1
- package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +0 -60
- package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js.map +0 -1
- package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +0 -23
- package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.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/locale/pt-BR/_lib/formatDistance.js +0 -104
- package/dist/node_modules/date-fns/locale/pt-BR/_lib/formatDistance.js.map +0 -1
- package/dist/node_modules/date-fns/locale/pt-BR/_lib/formatLong.js +0 -42
- package/dist/node_modules/date-fns/locale/pt-BR/_lib/formatLong.js.map +0 -1
- package/dist/node_modules/date-fns/locale/pt-BR/_lib/formatRelative.js +0 -25
- package/dist/node_modules/date-fns/locale/pt-BR/_lib/formatRelative.js.map +0 -1
- package/dist/node_modules/date-fns/locale/pt-BR/_lib/localize.js +0 -180
- package/dist/node_modules/date-fns/locale/pt-BR/_lib/localize.js.map +0 -1
- package/dist/node_modules/date-fns/locale/pt-BR/_lib/match.js +0 -137
- package/dist/node_modules/date-fns/locale/pt-BR/_lib/match.js.map +0 -1
- package/dist/node_modules/date-fns/locale/pt-BR.js +0 -29
- package/dist/node_modules/date-fns/locale/pt-BR.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
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.js +0 -45
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.js.map +0 -1
- package/dist/node_modules/react/jsx-runtime.js +0 -20
- package/dist/node_modules/react/jsx-runtime.js.map +0 -1
- package/dist/node_modules/style-inject/dist/style-inject.es.js +0 -29
- package/dist/node_modules/style-inject/dist/style-inject.es.js.map +0 -1
- package/dist/stories/components/accordion.js +0 -30
- package/dist/stories/components/accordion.js.map +0 -1
- package/dist/stories/components/autoComplete.js +0 -30
- package/dist/stories/components/autoComplete.js.map +0 -1
- package/dist/stories/components/basicHeader.js +0 -9
- package/dist/stories/components/basicHeader.js.map +0 -1
- package/dist/stories/components/breadcrumb.js +0 -10
- package/dist/stories/components/breadcrumb.js.map +0 -1
- package/dist/stories/components/button.js +0 -19
- package/dist/stories/components/button.js.map +0 -1
- package/dist/stories/components/calendarInput.js +0 -99
- package/dist/stories/components/calendarInput.js.map +0 -1
- package/dist/stories/components/card.js +0 -9
- package/dist/stories/components/card.js.map +0 -1
- package/dist/stories/components/cardButton.js +0 -11
- package/dist/stories/components/cardButton.js.map +0 -1
- package/dist/stories/components/cardIconsButton.js +0 -11
- package/dist/stories/components/cardIconsButton.js.map +0 -1
- package/dist/stories/components/chart.js +0 -9
- package/dist/stories/components/chart.js.map +0 -1
- package/dist/stories/components/dialog.js +0 -10
- package/dist/stories/components/dialog.js.map +0 -1
- package/dist/stories/components/divider.js +0 -9
- package/dist/stories/components/divider.js.map +0 -1
- package/dist/stories/components/emptyContent.js +0 -8
- package/dist/stories/components/emptyContent.js.map +0 -1
- package/dist/stories/components/expandablePanel.js +0 -10
- package/dist/stories/components/expandablePanel.js.map +0 -1
- package/dist/stories/components/fileUpload.js +0 -96
- package/dist/stories/components/fileUpload.js.map +0 -1
- package/dist/stories/components/filterButton.js +0 -33
- package/dist/stories/components/filterButton.js.map +0 -1
- package/dist/stories/components/header.js +0 -37
- package/dist/stories/components/header.js.map +0 -1
- package/dist/stories/components/iconButton.js +0 -14
- package/dist/stories/components/iconButton.js.map +0 -1
- package/dist/stories/components/infoCard.js +0 -9
- package/dist/stories/components/infoCard.js.map +0 -1
- package/dist/stories/components/input.js +0 -60
- package/dist/stories/components/input.js.map +0 -1
- package/dist/stories/components/inputSwitch.js +0 -14
- package/dist/stories/components/inputSwitch.js.map +0 -1
- package/dist/stories/components/inputTextArea.js +0 -20
- package/dist/stories/components/inputTextArea.js.map +0 -1
- package/dist/stories/components/internalMenu.js +0 -30
- package/dist/stories/components/internalMenu.js.map +0 -1
- package/dist/stories/components/link.js +0 -8
- package/dist/stories/components/link.js.map +0 -1
- package/dist/stories/components/megaMenu.js +0 -13
- package/dist/stories/components/megaMenu.js.map +0 -1
- package/dist/stories/components/modal.js +0 -38
- package/dist/stories/components/modal.js.map +0 -1
- package/dist/stories/components/multiselect.js +0 -125
- package/dist/stories/components/multiselect.js.map +0 -1
- package/dist/stories/components/notification.js +0 -16
- package/dist/stories/components/notification.js.map +0 -1
- package/dist/stories/components/notificationItem.js +0 -16
- package/dist/stories/components/notificationItem.js.map +0 -1
- package/dist/stories/components/paginator.js +0 -28
- package/dist/stories/components/paginator.js.map +0 -1
- package/dist/stories/components/radioButton.js +0 -17
- package/dist/stories/components/radioButton.js.map +0 -1
- package/dist/stories/components/select.js +0 -98
- package/dist/stories/components/select.js.map +0 -1
- package/dist/stories/components/sidebar.js +0 -17
- package/dist/stories/components/sidebar.js.map +0 -1
- package/dist/stories/components/skeleton.js +0 -9
- package/dist/stories/components/skeleton.js.map +0 -1
- package/dist/stories/components/spinner.js +0 -18
- package/dist/stories/components/spinner.js.map +0 -1
- package/dist/stories/components/table.js +0 -167
- package/dist/stories/components/table.js.map +0 -1
- package/dist/stories/components/tagStatus.js +0 -33
- package/dist/stories/components/tagStatus.js.map +0 -1
- package/dist/stories/components/toast.js +0 -18
- package/dist/stories/components/toast.js.map +0 -1
- package/dist/utils/masks/index.js +0 -90
- package/dist/utils/masks/index.js.map +0 -1
- package/dist/utils/nestedValue.js +0 -9
- package/dist/utils/nestedValue.js.map +0 -1
- package/dist/utils/sortData.js +0 -48
- package/dist/utils/sortData.js.map +0 -1
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
import { buildLocalizeFn } from '../../_lib/buildLocalizeFn.js';
|
|
2
|
-
|
|
3
|
-
const eraValues = {
|
|
4
|
-
narrow: ["AC", "DC"],
|
|
5
|
-
abbreviated: ["AC", "DC"],
|
|
6
|
-
wide: ["antes de cristo", "depois de cristo"],
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
const quarterValues = {
|
|
10
|
-
narrow: ["1", "2", "3", "4"],
|
|
11
|
-
abbreviated: ["T1", "T2", "T3", "T4"],
|
|
12
|
-
wide: ["1º trimestre", "2º trimestre", "3º trimestre", "4º trimestre"],
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
const monthValues = {
|
|
16
|
-
narrow: ["j", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"],
|
|
17
|
-
abbreviated: [
|
|
18
|
-
"jan",
|
|
19
|
-
"fev",
|
|
20
|
-
"mar",
|
|
21
|
-
"abr",
|
|
22
|
-
"mai",
|
|
23
|
-
"jun",
|
|
24
|
-
"jul",
|
|
25
|
-
"ago",
|
|
26
|
-
"set",
|
|
27
|
-
"out",
|
|
28
|
-
"nov",
|
|
29
|
-
"dez",
|
|
30
|
-
],
|
|
31
|
-
|
|
32
|
-
wide: [
|
|
33
|
-
"janeiro",
|
|
34
|
-
"fevereiro",
|
|
35
|
-
"março",
|
|
36
|
-
"abril",
|
|
37
|
-
"maio",
|
|
38
|
-
"junho",
|
|
39
|
-
"julho",
|
|
40
|
-
"agosto",
|
|
41
|
-
"setembro",
|
|
42
|
-
"outubro",
|
|
43
|
-
"novembro",
|
|
44
|
-
"dezembro",
|
|
45
|
-
],
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
const dayValues = {
|
|
49
|
-
narrow: ["D", "S", "T", "Q", "Q", "S", "S"],
|
|
50
|
-
short: ["dom", "seg", "ter", "qua", "qui", "sex", "sab"],
|
|
51
|
-
abbreviated: [
|
|
52
|
-
"domingo",
|
|
53
|
-
"segunda",
|
|
54
|
-
"terça",
|
|
55
|
-
"quarta",
|
|
56
|
-
"quinta",
|
|
57
|
-
"sexta",
|
|
58
|
-
"sábado",
|
|
59
|
-
],
|
|
60
|
-
|
|
61
|
-
wide: [
|
|
62
|
-
"domingo",
|
|
63
|
-
"segunda-feira",
|
|
64
|
-
"terça-feira",
|
|
65
|
-
"quarta-feira",
|
|
66
|
-
"quinta-feira",
|
|
67
|
-
"sexta-feira",
|
|
68
|
-
"sábado",
|
|
69
|
-
],
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
const dayPeriodValues = {
|
|
73
|
-
narrow: {
|
|
74
|
-
am: "a",
|
|
75
|
-
pm: "p",
|
|
76
|
-
midnight: "mn",
|
|
77
|
-
noon: "md",
|
|
78
|
-
morning: "manhã",
|
|
79
|
-
afternoon: "tarde",
|
|
80
|
-
evening: "tarde",
|
|
81
|
-
night: "noite",
|
|
82
|
-
},
|
|
83
|
-
abbreviated: {
|
|
84
|
-
am: "AM",
|
|
85
|
-
pm: "PM",
|
|
86
|
-
midnight: "meia-noite",
|
|
87
|
-
noon: "meio-dia",
|
|
88
|
-
morning: "manhã",
|
|
89
|
-
afternoon: "tarde",
|
|
90
|
-
evening: "tarde",
|
|
91
|
-
night: "noite",
|
|
92
|
-
},
|
|
93
|
-
wide: {
|
|
94
|
-
am: "a.m.",
|
|
95
|
-
pm: "p.m.",
|
|
96
|
-
midnight: "meia-noite",
|
|
97
|
-
noon: "meio-dia",
|
|
98
|
-
morning: "manhã",
|
|
99
|
-
afternoon: "tarde",
|
|
100
|
-
evening: "tarde",
|
|
101
|
-
night: "noite",
|
|
102
|
-
},
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
const formattingDayPeriodValues = {
|
|
106
|
-
narrow: {
|
|
107
|
-
am: "a",
|
|
108
|
-
pm: "p",
|
|
109
|
-
midnight: "mn",
|
|
110
|
-
noon: "md",
|
|
111
|
-
morning: "da manhã",
|
|
112
|
-
afternoon: "da tarde",
|
|
113
|
-
evening: "da tarde",
|
|
114
|
-
night: "da noite",
|
|
115
|
-
},
|
|
116
|
-
abbreviated: {
|
|
117
|
-
am: "AM",
|
|
118
|
-
pm: "PM",
|
|
119
|
-
midnight: "meia-noite",
|
|
120
|
-
noon: "meio-dia",
|
|
121
|
-
morning: "da manhã",
|
|
122
|
-
afternoon: "da tarde",
|
|
123
|
-
evening: "da tarde",
|
|
124
|
-
night: "da noite",
|
|
125
|
-
},
|
|
126
|
-
wide: {
|
|
127
|
-
am: "a.m.",
|
|
128
|
-
pm: "p.m.",
|
|
129
|
-
midnight: "meia-noite",
|
|
130
|
-
noon: "meio-dia",
|
|
131
|
-
morning: "da manhã",
|
|
132
|
-
afternoon: "da tarde",
|
|
133
|
-
evening: "da tarde",
|
|
134
|
-
night: "da noite",
|
|
135
|
-
},
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
const ordinalNumber = (dirtyNumber, options) => {
|
|
139
|
-
const number = Number(dirtyNumber);
|
|
140
|
-
|
|
141
|
-
if (options?.unit === "week") {
|
|
142
|
-
return number + "ª";
|
|
143
|
-
}
|
|
144
|
-
return number + "º";
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
const localize = {
|
|
148
|
-
ordinalNumber,
|
|
149
|
-
|
|
150
|
-
era: buildLocalizeFn({
|
|
151
|
-
values: eraValues,
|
|
152
|
-
defaultWidth: "wide",
|
|
153
|
-
}),
|
|
154
|
-
|
|
155
|
-
quarter: buildLocalizeFn({
|
|
156
|
-
values: quarterValues,
|
|
157
|
-
defaultWidth: "wide",
|
|
158
|
-
argumentCallback: (quarter) => quarter - 1,
|
|
159
|
-
}),
|
|
160
|
-
|
|
161
|
-
month: buildLocalizeFn({
|
|
162
|
-
values: monthValues,
|
|
163
|
-
defaultWidth: "wide",
|
|
164
|
-
}),
|
|
165
|
-
|
|
166
|
-
day: buildLocalizeFn({
|
|
167
|
-
values: dayValues,
|
|
168
|
-
defaultWidth: "wide",
|
|
169
|
-
}),
|
|
170
|
-
|
|
171
|
-
dayPeriod: buildLocalizeFn({
|
|
172
|
-
values: dayPeriodValues,
|
|
173
|
-
defaultWidth: "wide",
|
|
174
|
-
formattingValues: formattingDayPeriodValues,
|
|
175
|
-
defaultFormattingWidth: "wide",
|
|
176
|
-
}),
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
export { localize };
|
|
180
|
-
//# sourceMappingURL=localize.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"localize.js","sources":["../../../../../../node_modules/date-fns/locale/pt-BR/_lib/localize.js"],"sourcesContent":["import { buildLocalizeFn } from \"../../_lib/buildLocalizeFn.js\";\n\nconst eraValues = {\n narrow: [\"AC\", \"DC\"],\n abbreviated: [\"AC\", \"DC\"],\n wide: [\"antes de cristo\", \"depois de cristo\"],\n};\n\nconst quarterValues = {\n narrow: [\"1\", \"2\", \"3\", \"4\"],\n abbreviated: [\"T1\", \"T2\", \"T3\", \"T4\"],\n wide: [\"1º trimestre\", \"2º trimestre\", \"3º trimestre\", \"4º trimestre\"],\n};\n\nconst monthValues = {\n narrow: [\"j\", \"f\", \"m\", \"a\", \"m\", \"j\", \"j\", \"a\", \"s\", \"o\", \"n\", \"d\"],\n abbreviated: [\n \"jan\",\n \"fev\",\n \"mar\",\n \"abr\",\n \"mai\",\n \"jun\",\n \"jul\",\n \"ago\",\n \"set\",\n \"out\",\n \"nov\",\n \"dez\",\n ],\n\n wide: [\n \"janeiro\",\n \"fevereiro\",\n \"março\",\n \"abril\",\n \"maio\",\n \"junho\",\n \"julho\",\n \"agosto\",\n \"setembro\",\n \"outubro\",\n \"novembro\",\n \"dezembro\",\n ],\n};\n\nconst dayValues = {\n narrow: [\"D\", \"S\", \"T\", \"Q\", \"Q\", \"S\", \"S\"],\n short: [\"dom\", \"seg\", \"ter\", \"qua\", \"qui\", \"sex\", \"sab\"],\n abbreviated: [\n \"domingo\",\n \"segunda\",\n \"terça\",\n \"quarta\",\n \"quinta\",\n \"sexta\",\n \"sábado\",\n ],\n\n wide: [\n \"domingo\",\n \"segunda-feira\",\n \"terça-feira\",\n \"quarta-feira\",\n \"quinta-feira\",\n \"sexta-feira\",\n \"sábado\",\n ],\n};\n\nconst dayPeriodValues = {\n narrow: {\n am: \"a\",\n pm: \"p\",\n midnight: \"mn\",\n noon: \"md\",\n morning: \"manhã\",\n afternoon: \"tarde\",\n evening: \"tarde\",\n night: \"noite\",\n },\n abbreviated: {\n am: \"AM\",\n pm: \"PM\",\n midnight: \"meia-noite\",\n noon: \"meio-dia\",\n morning: \"manhã\",\n afternoon: \"tarde\",\n evening: \"tarde\",\n night: \"noite\",\n },\n wide: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"meia-noite\",\n noon: \"meio-dia\",\n morning: \"manhã\",\n afternoon: \"tarde\",\n evening: \"tarde\",\n night: \"noite\",\n },\n};\n\nconst formattingDayPeriodValues = {\n narrow: {\n am: \"a\",\n pm: \"p\",\n midnight: \"mn\",\n noon: \"md\",\n morning: \"da manhã\",\n afternoon: \"da tarde\",\n evening: \"da tarde\",\n night: \"da noite\",\n },\n abbreviated: {\n am: \"AM\",\n pm: \"PM\",\n midnight: \"meia-noite\",\n noon: \"meio-dia\",\n morning: \"da manhã\",\n afternoon: \"da tarde\",\n evening: \"da tarde\",\n night: \"da noite\",\n },\n wide: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"meia-noite\",\n noon: \"meio-dia\",\n morning: \"da manhã\",\n afternoon: \"da tarde\",\n evening: \"da tarde\",\n night: \"da noite\",\n },\n};\n\nconst ordinalNumber = (dirtyNumber, options) => {\n const number = Number(dirtyNumber);\n\n if (options?.unit === \"week\") {\n return number + \"ª\";\n }\n return number + \"º\";\n};\n\nexport const localize = {\n ordinalNumber,\n\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: \"wide\",\n }),\n\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: \"wide\",\n argumentCallback: (quarter) => quarter - 1,\n }),\n\n month: buildLocalizeFn({\n values: monthValues,\n defaultWidth: \"wide\",\n }),\n\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: \"wide\",\n }),\n\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: \"wide\",\n formattingValues: formattingDayPeriodValues,\n defaultFormattingWidth: \"wide\",\n }),\n};\n"],"names":[],"mappings":";;AAEA,MAAM,SAAS,GAAG;AAClB,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;AACtB,E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AE,GAAG,EAAE,eAAe,CAAC;AACvB,IAAI,MAAM,EAAE,SAAS;AACrB,IAAI,YAAY,EAAE,MAAM;AACxB,GAAG,CAAC;;AAEJ,EAAE,OAAO,EAAE,eAAe,CAAC;AAC3B,IAAI,MAAM,EAAE,aAAa;AACzB,IAAI,YAAY,EAAE,MAAM;AACxB,IAAI,gBAAgB,EAAE,CAAC,OAAO,KAAK,OAAO,GAAG,CAAC;AAC9C,GAAG,CAAC;;AAEJ,EAAE,KAAK,EAAE,eAAe,CAAC;AACzB,IAAI,MAAM,EAAE,WAAW;AACvB,IAAI,YAAY,EAAE,MAAM;AACxB,GAAG,CAAC;;AAEJ,EAAE,GAAG,EAAE,eAAe,CAAC;AACvB,IAAI,MAAM,EAAE,SAAS;AACrB,IAAI,YAAY,EAAE,MAAM;AACxB,GAAG,CAAC;;AAEJ,EAAE,SAAS,EAAE,eAAe,CAAC;AAC7B,IAAI,MAAM,EAAE,eAAe;AAC3B,IAAI,YAAY,EAAE,MAAM;AACxB,IAAI,gBAAgB,EAAE,yBAAyB;AAC/C,IAAI,sBAAsB,EAAE,MAAM;AAClC,GAAG,CAAC;AACJ;;;;","x_google_ignoreList":[0]}
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import { buildMatchFn } from '../../_lib/buildMatchFn.js';
|
|
2
|
-
import { buildMatchPatternFn } from '../../_lib/buildMatchPatternFn.js';
|
|
3
|
-
|
|
4
|
-
const matchOrdinalNumberPattern = /^(\d+)[ºªo]?/i;
|
|
5
|
-
const parseOrdinalNumberPattern = /\d+/i;
|
|
6
|
-
|
|
7
|
-
const matchEraPatterns = {
|
|
8
|
-
narrow: /^(ac|dc|a|d)/i,
|
|
9
|
-
abbreviated: /^(a\.?\s?c\.?|d\.?\s?c\.?)/i,
|
|
10
|
-
wide: /^(antes de cristo|depois de cristo)/i,
|
|
11
|
-
};
|
|
12
|
-
const parseEraPatterns = {
|
|
13
|
-
any: [/^ac/i, /^dc/i],
|
|
14
|
-
wide: [/^antes de cristo/i, /^depois de cristo/i],
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
const matchQuarterPatterns = {
|
|
18
|
-
narrow: /^[1234]/i,
|
|
19
|
-
abbreviated: /^T[1234]/i,
|
|
20
|
-
wide: /^[1234](º)? trimestre/i,
|
|
21
|
-
};
|
|
22
|
-
const parseQuarterPatterns = {
|
|
23
|
-
any: [/1/i, /2/i, /3/i, /4/i],
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const matchMonthPatterns = {
|
|
27
|
-
narrow: /^[jfmajsond]/i,
|
|
28
|
-
abbreviated: /^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,
|
|
29
|
-
wide: /^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i,
|
|
30
|
-
};
|
|
31
|
-
const parseMonthPatterns = {
|
|
32
|
-
narrow: [
|
|
33
|
-
/^j/i,
|
|
34
|
-
/^f/i,
|
|
35
|
-
/^m/i,
|
|
36
|
-
/^a/i,
|
|
37
|
-
/^m/i,
|
|
38
|
-
/^j/i,
|
|
39
|
-
/^j/i,
|
|
40
|
-
/^a/i,
|
|
41
|
-
/^s/i,
|
|
42
|
-
/^o/i,
|
|
43
|
-
/^n/i,
|
|
44
|
-
/^d/i,
|
|
45
|
-
],
|
|
46
|
-
|
|
47
|
-
any: [
|
|
48
|
-
/^ja/i,
|
|
49
|
-
/^fev/i,
|
|
50
|
-
/^mar/i,
|
|
51
|
-
/^abr/i,
|
|
52
|
-
/^mai/i,
|
|
53
|
-
/^jun/i,
|
|
54
|
-
/^jul/i,
|
|
55
|
-
/^ago/i,
|
|
56
|
-
/^set/i,
|
|
57
|
-
/^out/i,
|
|
58
|
-
/^nov/i,
|
|
59
|
-
/^dez/i,
|
|
60
|
-
],
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
const matchDayPatterns = {
|
|
64
|
-
narrow: /^(dom|[23456]ª?|s[aá]b)/i,
|
|
65
|
-
short: /^(dom|[23456]ª?|s[aá]b)/i,
|
|
66
|
-
abbreviated: /^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,
|
|
67
|
-
wide: /^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i,
|
|
68
|
-
};
|
|
69
|
-
const parseDayPatterns = {
|
|
70
|
-
short: [/^d/i, /^2/i, /^3/i, /^4/i, /^5/i, /^6/i, /^s[aá]/i],
|
|
71
|
-
narrow: [/^d/i, /^2/i, /^3/i, /^4/i, /^5/i, /^6/i, /^s[aá]/i],
|
|
72
|
-
any: [/^d/i, /^seg/i, /^t/i, /^qua/i, /^qui/i, /^sex/i, /^s[aá]b/i],
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
const matchDayPeriodPatterns = {
|
|
76
|
-
narrow: /^(a|p|mn|md|(da) (manhã|tarde|noite))/i,
|
|
77
|
-
any: /^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i,
|
|
78
|
-
};
|
|
79
|
-
const parseDayPeriodPatterns = {
|
|
80
|
-
any: {
|
|
81
|
-
am: /^a/i,
|
|
82
|
-
pm: /^p/i,
|
|
83
|
-
midnight: /^mn|^meia[-\s]noite/i,
|
|
84
|
-
noon: /^md|^meio[-\s]dia/i,
|
|
85
|
-
morning: /manhã/i,
|
|
86
|
-
afternoon: /tarde/i,
|
|
87
|
-
evening: /tarde/i,
|
|
88
|
-
night: /noite/i,
|
|
89
|
-
},
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
const match = {
|
|
93
|
-
ordinalNumber: buildMatchPatternFn({
|
|
94
|
-
matchPattern: matchOrdinalNumberPattern,
|
|
95
|
-
parsePattern: parseOrdinalNumberPattern,
|
|
96
|
-
valueCallback: (value) => parseInt(value, 10),
|
|
97
|
-
}),
|
|
98
|
-
|
|
99
|
-
era: buildMatchFn({
|
|
100
|
-
matchPatterns: matchEraPatterns,
|
|
101
|
-
defaultMatchWidth: "wide",
|
|
102
|
-
parsePatterns: parseEraPatterns,
|
|
103
|
-
defaultParseWidth: "any",
|
|
104
|
-
}),
|
|
105
|
-
|
|
106
|
-
quarter: buildMatchFn({
|
|
107
|
-
matchPatterns: matchQuarterPatterns,
|
|
108
|
-
defaultMatchWidth: "wide",
|
|
109
|
-
parsePatterns: parseQuarterPatterns,
|
|
110
|
-
defaultParseWidth: "any",
|
|
111
|
-
valueCallback: (index) => index + 1,
|
|
112
|
-
}),
|
|
113
|
-
|
|
114
|
-
month: buildMatchFn({
|
|
115
|
-
matchPatterns: matchMonthPatterns,
|
|
116
|
-
defaultMatchWidth: "wide",
|
|
117
|
-
parsePatterns: parseMonthPatterns,
|
|
118
|
-
defaultParseWidth: "any",
|
|
119
|
-
}),
|
|
120
|
-
|
|
121
|
-
day: buildMatchFn({
|
|
122
|
-
matchPatterns: matchDayPatterns,
|
|
123
|
-
defaultMatchWidth: "wide",
|
|
124
|
-
parsePatterns: parseDayPatterns,
|
|
125
|
-
defaultParseWidth: "any",
|
|
126
|
-
}),
|
|
127
|
-
|
|
128
|
-
dayPeriod: buildMatchFn({
|
|
129
|
-
matchPatterns: matchDayPeriodPatterns,
|
|
130
|
-
defaultMatchWidth: "any",
|
|
131
|
-
parsePatterns: parseDayPeriodPatterns,
|
|
132
|
-
defaultParseWidth: "any",
|
|
133
|
-
}),
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
export { match };
|
|
137
|
-
//# sourceMappingURL=match.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"match.js","sources":["../../../../../../node_modules/date-fns/locale/pt-BR/_lib/match.js"],"sourcesContent":["import { buildMatchFn } from \"../../_lib/buildMatchFn.js\";\nimport { buildMatchPatternFn } from \"../../_lib/buildMatchPatternFn.js\";\n\nconst matchOrdinalNumberPattern = /^(\\d+)[ºªo]?/i;\nconst parseOrdinalNumberPattern = /\\d+/i;\n\nconst matchEraPatterns = {\n narrow: /^(ac|dc|a|d)/i,\n abbreviated: /^(a\\.?\\s?c\\.?|d\\.?\\s?c\\.?)/i,\n wide: /^(antes de cristo|depois de cristo)/i,\n};\nconst parseEraPatterns = {\n any: [/^ac/i, /^dc/i],\n wide: [/^antes de cristo/i, /^depois de cristo/i],\n};\n\nconst matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^T[1234]/i,\n wide: /^[1234](º)? trimestre/i,\n};\nconst parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i],\n};\n\nconst matchMonthPatterns = {\n narrow: /^[jfmajsond]/i,\n abbreviated: /^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,\n wide: /^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/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 /^fev/i,\n /^mar/i,\n /^abr/i,\n /^mai/i,\n /^jun/i,\n /^jul/i,\n /^ago/i,\n /^set/i,\n /^out/i,\n /^nov/i,\n /^dez/i,\n ],\n};\n\nconst matchDayPatterns = {\n narrow: /^(dom|[23456]ª?|s[aá]b)/i,\n short: /^(dom|[23456]ª?|s[aá]b)/i,\n abbreviated: /^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,\n wide: /^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i,\n};\nconst parseDayPatterns = {\n short: [/^d/i, /^2/i, /^3/i, /^4/i, /^5/i, /^6/i, /^s[aá]/i],\n narrow: [/^d/i, /^2/i, /^3/i, /^4/i, /^5/i, /^6/i, /^s[aá]/i],\n any: [/^d/i, /^seg/i, /^t/i, /^qua/i, /^qui/i, /^sex/i, /^s[aá]b/i],\n};\n\nconst matchDayPeriodPatterns = {\n narrow: /^(a|p|mn|md|(da) (manhã|tarde|noite))/i,\n any: /^([ap]\\.?\\s?m\\.?|meia[-\\s]noite|meio[-\\s]dia|(da) (manhã|tarde|noite))/i,\n};\nconst parseDayPeriodPatterns = {\n any: {\n am: /^a/i,\n pm: /^p/i,\n midnight: /^mn|^meia[-\\s]noite/i,\n noon: /^md|^meio[-\\s]dia/i,\n morning: /manhã/i,\n afternoon: /tarde/i,\n evening: /tarde/i,\n night: /noite/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":";;;AAGA,MAAM,yBAAyB,GAAG,eAAe;AACjD,MAAM,yBAAyB,GAAG,MAAM;;AAExC,MAAM,gBAAgB,GAAG;AACzB,EAAE,MAAM,EAAE,eAAe;AACzB,EAAE,WAAW,EAAE,6BAA6B;AAC5C,EAAE,IAAI,EAAE,sCAAsC;AAC9C,CAAC;AACD,MAAM,gBAAgB,GA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xB,IAAI,aAAa,EAAE,oBAAoB;AACvC,IAAI,iBAAiB,EAAE,MAAM;AAC7B,IAAI,aAAa,EAAE,oBAAoB;AACvC,IAAI,iBAAiB,EAAE,KAAK;AAC5B,IAAI,aAAa,EAAE,CAAC,KAAK,KAAK,KAAK,GAAG,CAAC;AACvC,GAAG,CAAC;;AAEJ,EAAE,KAAK,EAAE,YAAY,CAAC;AACtB,IAAI,aAAa,EAAE,kBAAkB;AACrC,IAAI,iBAAiB,EAAE,MAAM;AAC7B,IAAI,aAAa,EAAE,kBAAkB;AACrC,IAAI,iBAAiB,EAAE,KAAK;AAC5B,GAAG,CAAC;;AAEJ,EAAE,GAAG,EAAE,YAAY,CAAC;AACpB,IAAI,aAAa,EAAE,gBAAgB;AACnC,IAAI,iBAAiB,EAAE,MAAM;AAC7B,IAAI,aAAa,EAAE,gBAAgB;AACnC,IAAI,iBAAiB,EAAE,KAAK;AAC5B,GAAG,CAAC;;AAEJ,EAAE,SAAS,EAAE,YAAY,CAAC;AAC1B,IAAI,aAAa,EAAE,sBAAsB;AACzC,IAAI,iBAAiB,EAAE,KAAK;AAC5B,IAAI,aAAa,EAAE,sBAAsB;AACzC,IAAI,iBAAiB,EAAE,KAAK;AAC5B,GAAG,CAAC;AACJ;;;;","x_google_ignoreList":[0]}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { formatDistance } from './pt-BR/_lib/formatDistance.js';
|
|
2
|
-
import { formatLong } from './pt-BR/_lib/formatLong.js';
|
|
3
|
-
import { formatRelative } from './pt-BR/_lib/formatRelative.js';
|
|
4
|
-
import { localize } from './pt-BR/_lib/localize.js';
|
|
5
|
-
import { match } from './pt-BR/_lib/match.js';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @category Locales
|
|
9
|
-
* @summary Portuguese locale (Brazil).
|
|
10
|
-
* @language Portuguese
|
|
11
|
-
* @iso-639-2 por
|
|
12
|
-
* @author Lucas Duailibe [@duailibe](https://github.com/duailibe)
|
|
13
|
-
* @author Yago Carballo [@yagocarballo](https://github.com/YagoCarballo)
|
|
14
|
-
*/
|
|
15
|
-
const ptBR = {
|
|
16
|
-
code: "pt-BR",
|
|
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 { ptBR as default, ptBR };
|
|
29
|
-
//# sourceMappingURL=pt-BR.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pt-BR.js","sources":["../../../../node_modules/date-fns/locale/pt-BR.js"],"sourcesContent":["import { formatDistance } from \"./pt-BR/_lib/formatDistance.js\";\nimport { formatLong } from \"./pt-BR/_lib/formatLong.js\";\nimport { formatRelative } from \"./pt-BR/_lib/formatRelative.js\";\nimport { localize } from \"./pt-BR/_lib/localize.js\";\nimport { match } from \"./pt-BR/_lib/match.js\";\n\n/**\n * @category Locales\n * @summary Portuguese locale (Brazil).\n * @language Portuguese\n * @iso-639-2 por\n * @author Lucas Duailibe [@duailibe](https://github.com/duailibe)\n * @author Yago Carballo [@yagocarballo](https://github.com/YagoCarballo)\n */\nexport const ptBR = {\n code: \"pt-BR\",\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 ptBR;\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]}
|