@octanejs/day-picker 0.0.1
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/LICENSE +21 -0
- package/README.md +14 -0
- package/UPSTREAM.md +24 -0
- package/package.json +77 -0
- package/src/DayPicker.tsrx +717 -0
- package/src/UI.ts +121 -0
- package/src/classes/CalendarDay.ts +82 -0
- package/src/classes/CalendarMonth.ts +20 -0
- package/src/classes/CalendarWeek.ts +19 -0
- package/src/classes/DateLib.ts +695 -0
- package/src/classes/index.ts +4 -0
- package/src/components/custom-components.tsrx +237 -0
- package/src/formatters/formatCaption.ts +18 -0
- package/src/formatters/formatDay.ts +17 -0
- package/src/formatters/formatMonthDropdown.ts +16 -0
- package/src/formatters/formatWeekNumber.ts +19 -0
- package/src/formatters/formatWeekNumberHeader.ts +11 -0
- package/src/formatters/formatWeekdayName.ts +17 -0
- package/src/formatters/formatYearDropdown.ts +15 -0
- package/src/formatters/index.ts +7 -0
- package/src/helpers/calculateFocusTarget.ts +79 -0
- package/src/helpers/createGetModifiers.ts +117 -0
- package/src/helpers/endOfBroadcastWeek.ts +22 -0
- package/src/helpers/getBroadcastWeeksInMonth.ts +32 -0
- package/src/helpers/getClassNamesForModifiers.ts +38 -0
- package/src/helpers/getComponents.ts +19 -0
- package/src/helpers/getDataAttributes.ts +17 -0
- package/src/helpers/getDates.ts +87 -0
- package/src/helpers/getDays.ts +19 -0
- package/src/helpers/getDefaultClassNames.ts +36 -0
- package/src/helpers/getDisplayMonths.ts +30 -0
- package/src/helpers/getFocusableDate.ts +66 -0
- package/src/helpers/getFormatters.ts +16 -0
- package/src/helpers/getInitialMonth.ts +35 -0
- package/src/helpers/getLabels.ts +93 -0
- package/src/helpers/getMonthOptions.ts +45 -0
- package/src/helpers/getMonths.ts +89 -0
- package/src/helpers/getNavMonth.ts +35 -0
- package/src/helpers/getNextFocus.ts +45 -0
- package/src/helpers/getNextMonth.ts +46 -0
- package/src/helpers/getPreviousMonth.ts +45 -0
- package/src/helpers/getStyleForModifiers.ts +31 -0
- package/src/helpers/getWeekdays.ts +33 -0
- package/src/helpers/getWeeks.ts +14 -0
- package/src/helpers/getYearOptions.ts +43 -0
- package/src/helpers/index.ts +2 -0
- package/src/helpers/startOfBroadcastWeek.ts +26 -0
- package/src/helpers/useControlledValue.ts +38 -0
- package/src/index.ts +13 -0
- package/src/labels/index.ts +12 -0
- package/src/labels/labelDayButton.ts +29 -0
- package/src/labels/labelGrid.ts +18 -0
- package/src/labels/labelGridcell.ts +26 -0
- package/src/labels/labelMonthDropdown.ts +14 -0
- package/src/labels/labelNav.ts +11 -0
- package/src/labels/labelNext.ts +17 -0
- package/src/labels/labelPrevious.ts +13 -0
- package/src/labels/labelWeekNumber.ts +15 -0
- package/src/labels/labelWeekNumberHeader.ts +14 -0
- package/src/labels/labelWeekday.ts +16 -0
- package/src/labels/labelYearDropdown.ts +14 -0
- package/src/locale/af.ts +48 -0
- package/src/locale/ar-DZ.ts +48 -0
- package/src/locale/ar-EG.ts +48 -0
- package/src/locale/ar-MA.ts +48 -0
- package/src/locale/ar-SA.ts +48 -0
- package/src/locale/ar-TN.ts +48 -0
- package/src/locale/ar.ts +48 -0
- package/src/locale/az.ts +48 -0
- package/src/locale/be-tarask.ts +51 -0
- package/src/locale/be.ts +48 -0
- package/src/locale/bg.ts +48 -0
- package/src/locale/bn.ts +48 -0
- package/src/locale/bs.ts +48 -0
- package/src/locale/ca.ts +48 -0
- package/src/locale/ckb.ts +51 -0
- package/src/locale/cs.ts +48 -0
- package/src/locale/cy.ts +48 -0
- package/src/locale/da.ts +48 -0
- package/src/locale/de-AT.ts +48 -0
- package/src/locale/de.ts +48 -0
- package/src/locale/el.ts +48 -0
- package/src/locale/en-AU.ts +48 -0
- package/src/locale/en-CA.ts +48 -0
- package/src/locale/en-GB.ts +51 -0
- package/src/locale/en-IE.ts +48 -0
- package/src/locale/en-IN.ts +48 -0
- package/src/locale/en-NZ.ts +48 -0
- package/src/locale/en-US.ts +72 -0
- package/src/locale/en-ZA.ts +48 -0
- package/src/locale/eo.ts +48 -0
- package/src/locale/es.ts +48 -0
- package/src/locale/et.ts +48 -0
- package/src/locale/eu.ts +48 -0
- package/src/locale/fa-IR.ts +48 -0
- package/src/locale/fi.ts +48 -0
- package/src/locale/fr-CA.ts +48 -0
- package/src/locale/fr-CH.ts +48 -0
- package/src/locale/fr.ts +48 -0
- package/src/locale/fy.ts +48 -0
- package/src/locale/gd.ts +48 -0
- package/src/locale/gl.ts +48 -0
- package/src/locale/gu.ts +48 -0
- package/src/locale/he.ts +48 -0
- package/src/locale/hi.ts +48 -0
- package/src/locale/hr.ts +48 -0
- package/src/locale/ht.ts +48 -0
- package/src/locale/hu.ts +48 -0
- package/src/locale/hy.ts +48 -0
- package/src/locale/id.ts +48 -0
- package/src/locale/is.ts +48 -0
- package/src/locale/it-CH.ts +48 -0
- package/src/locale/it.ts +48 -0
- package/src/locale/ja-Hira.ts +48 -0
- package/src/locale/ja.ts +48 -0
- package/src/locale/ka.ts +48 -0
- package/src/locale/kk.ts +48 -0
- package/src/locale/km.ts +48 -0
- package/src/locale/kn.ts +48 -0
- package/src/locale/ko.ts +48 -0
- package/src/locale/lb.ts +48 -0
- package/src/locale/lt.ts +48 -0
- package/src/locale/lv.ts +48 -0
- package/src/locale/mk.ts +48 -0
- package/src/locale/mn.ts +48 -0
- package/src/locale/ms.ts +48 -0
- package/src/locale/mt.ts +48 -0
- package/src/locale/nb.ts +48 -0
- package/src/locale/nl-BE.ts +48 -0
- package/src/locale/nl.ts +48 -0
- package/src/locale/nn.ts +48 -0
- package/src/locale/oc.ts +48 -0
- package/src/locale/pl.ts +48 -0
- package/src/locale/pt-BR.ts +48 -0
- package/src/locale/pt.ts +48 -0
- package/src/locale/ro.ts +48 -0
- package/src/locale/ru.ts +48 -0
- package/src/locale/se.ts +48 -0
- package/src/locale/sk.ts +48 -0
- package/src/locale/sl.ts +48 -0
- package/src/locale/sq.ts +48 -0
- package/src/locale/sr-Latn.ts +48 -0
- package/src/locale/sr.ts +48 -0
- package/src/locale/sv.ts +48 -0
- package/src/locale/ta.ts +48 -0
- package/src/locale/te.ts +48 -0
- package/src/locale/th.ts +48 -0
- package/src/locale/tr.ts +48 -0
- package/src/locale/ug.ts +48 -0
- package/src/locale/uk.ts +48 -0
- package/src/locale/uz-Cyrl.ts +48 -0
- package/src/locale/uz.ts +48 -0
- package/src/locale/vi.ts +48 -0
- package/src/locale/zh-CN.ts +48 -0
- package/src/locale/zh-HK.ts +51 -0
- package/src/locale/zh-TW.ts +51 -0
- package/src/locale.ts +108 -0
- package/src/noonDateLib.ts +202 -0
- package/src/selection/useMulti.ts +74 -0
- package/src/selection/useRange.ts +89 -0
- package/src/selection/useSingle.ts +77 -0
- package/src/style.css +451 -0
- package/src/style.css.d.ts +3 -0
- package/src/style.module.css +451 -0
- package/src/style.module.css.d.ts +29 -0
- package/src/types/index.ts +3 -0
- package/src/types/props.ts +671 -0
- package/src/types/selection.ts +97 -0
- package/src/types/shared.ts +346 -0
- package/src/useAnimation.ts +242 -0
- package/src/useCalendar.ts +233 -0
- package/src/useDayPicker.ts +91 -0
- package/src/useFocus.ts +109 -0
- package/src/useSelection.ts +36 -0
- package/src/utils/addToRange.ts +91 -0
- package/src/utils/convertMatchersToTimeZone.ts +88 -0
- package/src/utils/dateMatchModifiers.ts +72 -0
- package/src/utils/index.ts +7 -0
- package/src/utils/rangeContainsDayOfWeek.ts +33 -0
- package/src/utils/rangeContainsModifiers.ts +106 -0
- package/src/utils/rangeIncludesDate.ts +40 -0
- package/src/utils/rangeOverlaps.ts +26 -0
- package/src/utils/toTimeZone.ts +13 -0
- package/src/utils/typeguards.ts +71 -0
- package/status.json +13 -0
package/src/locale/da.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { da as dateFnsDa } from 'date-fns/locale';
|
|
2
|
+
|
|
3
|
+
import type { DateLibOptions, DayPickerLocale } from '../classes/DateLib.js';
|
|
4
|
+
import { DateLib } from '../classes/DateLib.js';
|
|
5
|
+
import type { Modifiers } from '../types/index.js';
|
|
6
|
+
|
|
7
|
+
/** Danish locale extended with DayPicker-specific translations. */
|
|
8
|
+
export const da: DayPickerLocale = {
|
|
9
|
+
...dateFnsDa,
|
|
10
|
+
labels: {
|
|
11
|
+
labelDayButton: (
|
|
12
|
+
date: Date,
|
|
13
|
+
modifiers: Modifiers,
|
|
14
|
+
options?: DateLibOptions,
|
|
15
|
+
dateLib?: DateLib,
|
|
16
|
+
) => {
|
|
17
|
+
const lib = dateLib ?? new DateLib(options);
|
|
18
|
+
let label = lib.format(date, 'PPPP');
|
|
19
|
+
if (modifiers.today) label = `I dag, ${label}`;
|
|
20
|
+
if (modifiers.selected) label = `${label}, valgt`;
|
|
21
|
+
return label;
|
|
22
|
+
},
|
|
23
|
+
labelMonthDropdown: 'Vælg måned',
|
|
24
|
+
labelNext: 'Gå til næste måned',
|
|
25
|
+
labelPrevious: 'Gå til forrige måned',
|
|
26
|
+
labelWeekNumber: (weekNumber: number) => `Uge ${weekNumber}`,
|
|
27
|
+
labelYearDropdown: 'Vælg år',
|
|
28
|
+
labelGrid: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
29
|
+
(dateLib ?? new DateLib(options)).formatMonthYear(date),
|
|
30
|
+
labelGridcell: (
|
|
31
|
+
date: Date,
|
|
32
|
+
modifiers?: Modifiers,
|
|
33
|
+
options?: DateLibOptions,
|
|
34
|
+
dateLib?: DateLib,
|
|
35
|
+
) => {
|
|
36
|
+
const lib = dateLib ?? new DateLib(options);
|
|
37
|
+
let label = lib.format(date, 'PPPP');
|
|
38
|
+
if (modifiers?.today) {
|
|
39
|
+
label = `I dag, ${label}`;
|
|
40
|
+
}
|
|
41
|
+
return label;
|
|
42
|
+
},
|
|
43
|
+
labelNav: 'Navigationslinje',
|
|
44
|
+
labelWeekNumberHeader: 'Ugenummer',
|
|
45
|
+
labelWeekday: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
46
|
+
(dateLib ?? new DateLib(options)).format(date, 'cccc'),
|
|
47
|
+
},
|
|
48
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { deAT as dateFnsDeAT } from 'date-fns/locale';
|
|
2
|
+
|
|
3
|
+
import type { DateLibOptions, DayPickerLocale } from '../classes/DateLib.js';
|
|
4
|
+
import { DateLib } from '../classes/DateLib.js';
|
|
5
|
+
import type { Modifiers } from '../types/index.js';
|
|
6
|
+
|
|
7
|
+
/** German (Austria) locale extended with DayPicker-specific translations. */
|
|
8
|
+
export const deAT: DayPickerLocale = {
|
|
9
|
+
...dateFnsDeAT,
|
|
10
|
+
labels: {
|
|
11
|
+
labelDayButton: (
|
|
12
|
+
date: Date,
|
|
13
|
+
modifiers: Modifiers,
|
|
14
|
+
options?: DateLibOptions,
|
|
15
|
+
dateLib?: DateLib,
|
|
16
|
+
) => {
|
|
17
|
+
const lib = dateLib ?? new DateLib(options);
|
|
18
|
+
let label = lib.format(date, 'PPPP');
|
|
19
|
+
if (modifiers.today) label = `Heute, ${label}`;
|
|
20
|
+
if (modifiers.selected) label = `${label}, ausgewählt`;
|
|
21
|
+
return label;
|
|
22
|
+
},
|
|
23
|
+
labelMonthDropdown: 'Monat auswählen',
|
|
24
|
+
labelNext: 'Zum nächsten Monat',
|
|
25
|
+
labelPrevious: 'Zum vorherigen Monat',
|
|
26
|
+
labelWeekNumber: (weekNumber: number) => `Woche ${weekNumber}`,
|
|
27
|
+
labelYearDropdown: 'Jahr auswählen',
|
|
28
|
+
labelGrid: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
29
|
+
(dateLib ?? new DateLib(options)).formatMonthYear(date),
|
|
30
|
+
labelGridcell: (
|
|
31
|
+
date: Date,
|
|
32
|
+
modifiers?: Modifiers,
|
|
33
|
+
options?: DateLibOptions,
|
|
34
|
+
dateLib?: DateLib,
|
|
35
|
+
) => {
|
|
36
|
+
const lib = dateLib ?? new DateLib(options);
|
|
37
|
+
let label = lib.format(date, 'PPPP');
|
|
38
|
+
if (modifiers?.today) {
|
|
39
|
+
label = `Heute, ${label}`;
|
|
40
|
+
}
|
|
41
|
+
return label;
|
|
42
|
+
},
|
|
43
|
+
labelNav: 'Navigationsleiste',
|
|
44
|
+
labelWeekNumberHeader: 'Wochennummer',
|
|
45
|
+
labelWeekday: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
46
|
+
(dateLib ?? new DateLib(options)).format(date, 'cccc'),
|
|
47
|
+
},
|
|
48
|
+
};
|
package/src/locale/de.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { de as dateFnsDe } from 'date-fns/locale';
|
|
2
|
+
|
|
3
|
+
import type { DateLibOptions, DayPickerLocale } from '../classes/DateLib.js';
|
|
4
|
+
import { DateLib } from '../classes/DateLib.js';
|
|
5
|
+
import type { Modifiers } from '../types/index.js';
|
|
6
|
+
|
|
7
|
+
/** German locale extended with DayPicker-specific translations. */
|
|
8
|
+
export const de: DayPickerLocale = {
|
|
9
|
+
...dateFnsDe,
|
|
10
|
+
labels: {
|
|
11
|
+
labelDayButton: (
|
|
12
|
+
date: Date,
|
|
13
|
+
modifiers: Modifiers,
|
|
14
|
+
options?: DateLibOptions,
|
|
15
|
+
dateLib?: DateLib,
|
|
16
|
+
) => {
|
|
17
|
+
const lib = dateLib ?? new DateLib(options);
|
|
18
|
+
let label = lib.format(date, 'PPPP');
|
|
19
|
+
if (modifiers.today) label = `Heute, ${label}`;
|
|
20
|
+
if (modifiers.selected) label = `${label}, ausgewählt`;
|
|
21
|
+
return label;
|
|
22
|
+
},
|
|
23
|
+
labelMonthDropdown: 'Monat auswählen',
|
|
24
|
+
labelNext: 'Zum nächsten Monat',
|
|
25
|
+
labelPrevious: 'Zum vorherigen Monat',
|
|
26
|
+
labelWeekNumber: (weekNumber: number) => `Woche ${weekNumber}`,
|
|
27
|
+
labelYearDropdown: 'Jahr auswählen',
|
|
28
|
+
labelGrid: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
29
|
+
(dateLib ?? new DateLib(options)).formatMonthYear(date),
|
|
30
|
+
labelGridcell: (
|
|
31
|
+
date: Date,
|
|
32
|
+
modifiers?: Modifiers,
|
|
33
|
+
options?: DateLibOptions,
|
|
34
|
+
dateLib?: DateLib,
|
|
35
|
+
) => {
|
|
36
|
+
const lib = dateLib ?? new DateLib(options);
|
|
37
|
+
let label = lib.format(date, 'PPPP');
|
|
38
|
+
if (modifiers?.today) {
|
|
39
|
+
label = `Heute, ${label}`;
|
|
40
|
+
}
|
|
41
|
+
return label;
|
|
42
|
+
},
|
|
43
|
+
labelNav: 'Navigationsleiste',
|
|
44
|
+
labelWeekNumberHeader: 'Wochennummer',
|
|
45
|
+
labelWeekday: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
46
|
+
(dateLib ?? new DateLib(options)).format(date, 'cccc'),
|
|
47
|
+
},
|
|
48
|
+
};
|
package/src/locale/el.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { el as dateFnsEl } from 'date-fns/locale';
|
|
2
|
+
|
|
3
|
+
import type { DateLibOptions, DayPickerLocale } from '../classes/DateLib.js';
|
|
4
|
+
import { DateLib } from '../classes/DateLib.js';
|
|
5
|
+
import type { Modifiers } from '../types/index.js';
|
|
6
|
+
|
|
7
|
+
/** Greek locale extended with DayPicker-specific translations. */
|
|
8
|
+
export const el: DayPickerLocale = {
|
|
9
|
+
...dateFnsEl,
|
|
10
|
+
labels: {
|
|
11
|
+
labelDayButton: (
|
|
12
|
+
date: Date,
|
|
13
|
+
modifiers: Modifiers,
|
|
14
|
+
options?: DateLibOptions,
|
|
15
|
+
dateLib?: DateLib,
|
|
16
|
+
) => {
|
|
17
|
+
const lib = dateLib ?? new DateLib(options);
|
|
18
|
+
let label = lib.format(date, 'PPPP');
|
|
19
|
+
if (modifiers.today) label = `Σήμερα, ${label}`;
|
|
20
|
+
if (modifiers.selected) label = `${label}, επιλεγμένο`;
|
|
21
|
+
return label;
|
|
22
|
+
},
|
|
23
|
+
labelMonthDropdown: 'Επιλέξτε μήνα',
|
|
24
|
+
labelNext: 'Μετάβαση στον επόμενο μήνα',
|
|
25
|
+
labelPrevious: 'Μετάβαση στον προηγούμενο μήνα',
|
|
26
|
+
labelWeekNumber: (weekNumber: number) => `Εβδομάδα ${weekNumber}`,
|
|
27
|
+
labelYearDropdown: 'Επιλέξτε έτος',
|
|
28
|
+
labelGrid: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
29
|
+
(dateLib ?? new DateLib(options)).formatMonthYear(date),
|
|
30
|
+
labelGridcell: (
|
|
31
|
+
date: Date,
|
|
32
|
+
modifiers?: Modifiers,
|
|
33
|
+
options?: DateLibOptions,
|
|
34
|
+
dateLib?: DateLib,
|
|
35
|
+
) => {
|
|
36
|
+
const lib = dateLib ?? new DateLib(options);
|
|
37
|
+
let label = lib.format(date, 'PPPP');
|
|
38
|
+
if (modifiers?.today) {
|
|
39
|
+
label = `Σήμερα, ${label}`;
|
|
40
|
+
}
|
|
41
|
+
return label;
|
|
42
|
+
},
|
|
43
|
+
labelNav: 'Γραμμή πλοήγησης',
|
|
44
|
+
labelWeekNumberHeader: 'Αριθμός εβδομάδας',
|
|
45
|
+
labelWeekday: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
46
|
+
(dateLib ?? new DateLib(options)).format(date, 'cccc'),
|
|
47
|
+
},
|
|
48
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { enAU as dateFnsEnAU } from 'date-fns/locale';
|
|
2
|
+
|
|
3
|
+
import type { DateLibOptions, DayPickerLocale } from '../classes/DateLib.js';
|
|
4
|
+
import { DateLib } from '../classes/DateLib.js';
|
|
5
|
+
import type { Modifiers } from '../types/index.js';
|
|
6
|
+
|
|
7
|
+
/** English (Australia) locale extended with DayPicker-specific translations. */
|
|
8
|
+
export const enAU: DayPickerLocale = {
|
|
9
|
+
...dateFnsEnAU,
|
|
10
|
+
labels: {
|
|
11
|
+
labelDayButton: (
|
|
12
|
+
date: Date,
|
|
13
|
+
modifiers: Modifiers,
|
|
14
|
+
options?: DateLibOptions,
|
|
15
|
+
dateLib?: DateLib,
|
|
16
|
+
) => {
|
|
17
|
+
const lib = dateLib ?? new DateLib(options);
|
|
18
|
+
let label = lib.format(date, 'PPPP');
|
|
19
|
+
if (modifiers.today) label = `Today, ${label}`;
|
|
20
|
+
if (modifiers.selected) label = `${label}, selected`;
|
|
21
|
+
return label;
|
|
22
|
+
},
|
|
23
|
+
labelMonthDropdown: 'Choose the Month',
|
|
24
|
+
labelNext: 'Go to the Next Month',
|
|
25
|
+
labelPrevious: 'Go to the Previous Month',
|
|
26
|
+
labelWeekNumber: (weekNumber: number) => `Week ${weekNumber}`,
|
|
27
|
+
labelYearDropdown: 'Choose the Year',
|
|
28
|
+
labelGrid: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
29
|
+
(dateLib ?? new DateLib(options)).formatMonthYear(date),
|
|
30
|
+
labelGridcell: (
|
|
31
|
+
date: Date,
|
|
32
|
+
modifiers?: Modifiers,
|
|
33
|
+
options?: DateLibOptions,
|
|
34
|
+
dateLib?: DateLib,
|
|
35
|
+
) => {
|
|
36
|
+
const lib = dateLib ?? new DateLib(options);
|
|
37
|
+
let label = lib.format(date, 'PPPP');
|
|
38
|
+
if (modifiers?.today) {
|
|
39
|
+
label = `Today, ${label}`;
|
|
40
|
+
}
|
|
41
|
+
return label;
|
|
42
|
+
},
|
|
43
|
+
labelNav: 'Navigation bar',
|
|
44
|
+
labelWeekNumberHeader: 'Week Number',
|
|
45
|
+
labelWeekday: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
46
|
+
(dateLib ?? new DateLib(options)).format(date, 'cccc'),
|
|
47
|
+
},
|
|
48
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { enCA as dateFnsEnCA } from 'date-fns/locale';
|
|
2
|
+
|
|
3
|
+
import type { DateLibOptions, DayPickerLocale } from '../classes/DateLib.js';
|
|
4
|
+
import { DateLib } from '../classes/DateLib.js';
|
|
5
|
+
import type { Modifiers } from '../types/index.js';
|
|
6
|
+
|
|
7
|
+
/** English (Canada) locale extended with DayPicker-specific translations. */
|
|
8
|
+
export const enCA: DayPickerLocale = {
|
|
9
|
+
...dateFnsEnCA,
|
|
10
|
+
labels: {
|
|
11
|
+
labelDayButton: (
|
|
12
|
+
date: Date,
|
|
13
|
+
modifiers: Modifiers,
|
|
14
|
+
options?: DateLibOptions,
|
|
15
|
+
dateLib?: DateLib,
|
|
16
|
+
) => {
|
|
17
|
+
const lib = dateLib ?? new DateLib(options);
|
|
18
|
+
let label = lib.format(date, 'PPPP');
|
|
19
|
+
if (modifiers.today) label = `Today, ${label}`;
|
|
20
|
+
if (modifiers.selected) label = `${label}, selected`;
|
|
21
|
+
return label;
|
|
22
|
+
},
|
|
23
|
+
labelMonthDropdown: 'Choose the Month',
|
|
24
|
+
labelNext: 'Go to the Next Month',
|
|
25
|
+
labelPrevious: 'Go to the Previous Month',
|
|
26
|
+
labelWeekNumber: (weekNumber: number) => `Week ${weekNumber}`,
|
|
27
|
+
labelYearDropdown: 'Choose the Year',
|
|
28
|
+
labelGrid: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
29
|
+
(dateLib ?? new DateLib(options)).formatMonthYear(date),
|
|
30
|
+
labelGridcell: (
|
|
31
|
+
date: Date,
|
|
32
|
+
modifiers?: Modifiers,
|
|
33
|
+
options?: DateLibOptions,
|
|
34
|
+
dateLib?: DateLib,
|
|
35
|
+
) => {
|
|
36
|
+
const lib = dateLib ?? new DateLib(options);
|
|
37
|
+
let label = lib.format(date, 'PPPP');
|
|
38
|
+
if (modifiers?.today) {
|
|
39
|
+
label = `Today, ${label}`;
|
|
40
|
+
}
|
|
41
|
+
return label;
|
|
42
|
+
},
|
|
43
|
+
labelNav: 'Navigation bar',
|
|
44
|
+
labelWeekNumberHeader: 'Week Number',
|
|
45
|
+
labelWeekday: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
46
|
+
(dateLib ?? new DateLib(options)).format(date, 'cccc'),
|
|
47
|
+
},
|
|
48
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { enGB as dateFnsEnGB } from 'date-fns/locale';
|
|
2
|
+
|
|
3
|
+
import type { DateLibOptions, DayPickerLocale } from '../classes/DateLib.js';
|
|
4
|
+
import { DateLib } from '../classes/DateLib.js';
|
|
5
|
+
import type { Modifiers } from '../types/index.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* English (United Kingdom) locale extended with DayPicker-specific
|
|
9
|
+
* translations.
|
|
10
|
+
*/
|
|
11
|
+
export const enGB: DayPickerLocale = {
|
|
12
|
+
...dateFnsEnGB,
|
|
13
|
+
labels: {
|
|
14
|
+
labelDayButton: (
|
|
15
|
+
date: Date,
|
|
16
|
+
modifiers: Modifiers,
|
|
17
|
+
options?: DateLibOptions,
|
|
18
|
+
dateLib?: DateLib,
|
|
19
|
+
) => {
|
|
20
|
+
const lib = dateLib ?? new DateLib(options);
|
|
21
|
+
let label = lib.format(date, 'PPPP');
|
|
22
|
+
if (modifiers.today) label = `Today, ${label}`;
|
|
23
|
+
if (modifiers.selected) label = `${label}, selected`;
|
|
24
|
+
return label;
|
|
25
|
+
},
|
|
26
|
+
labelMonthDropdown: 'Choose the Month',
|
|
27
|
+
labelNext: 'Go to the Next Month',
|
|
28
|
+
labelPrevious: 'Go to the Previous Month',
|
|
29
|
+
labelWeekNumber: (weekNumber: number) => `Week ${weekNumber}`,
|
|
30
|
+
labelYearDropdown: 'Choose the Year',
|
|
31
|
+
labelGrid: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
32
|
+
(dateLib ?? new DateLib(options)).formatMonthYear(date),
|
|
33
|
+
labelGridcell: (
|
|
34
|
+
date: Date,
|
|
35
|
+
modifiers?: Modifiers,
|
|
36
|
+
options?: DateLibOptions,
|
|
37
|
+
dateLib?: DateLib,
|
|
38
|
+
) => {
|
|
39
|
+
const lib = dateLib ?? new DateLib(options);
|
|
40
|
+
let label = lib.format(date, 'PPPP');
|
|
41
|
+
if (modifiers?.today) {
|
|
42
|
+
label = `Today, ${label}`;
|
|
43
|
+
}
|
|
44
|
+
return label;
|
|
45
|
+
},
|
|
46
|
+
labelNav: 'Navigation bar',
|
|
47
|
+
labelWeekNumberHeader: 'Week Number',
|
|
48
|
+
labelWeekday: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
49
|
+
(dateLib ?? new DateLib(options)).format(date, 'cccc'),
|
|
50
|
+
},
|
|
51
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { enIE as dateFnsEnIE } from 'date-fns/locale';
|
|
2
|
+
|
|
3
|
+
import type { DateLibOptions, DayPickerLocale } from '../classes/DateLib.js';
|
|
4
|
+
import { DateLib } from '../classes/DateLib.js';
|
|
5
|
+
import type { Modifiers } from '../types/index.js';
|
|
6
|
+
|
|
7
|
+
/** English (Ireland) locale extended with DayPicker-specific translations. */
|
|
8
|
+
export const enIE: DayPickerLocale = {
|
|
9
|
+
...dateFnsEnIE,
|
|
10
|
+
labels: {
|
|
11
|
+
labelDayButton: (
|
|
12
|
+
date: Date,
|
|
13
|
+
modifiers: Modifiers,
|
|
14
|
+
options?: DateLibOptions,
|
|
15
|
+
dateLib?: DateLib,
|
|
16
|
+
) => {
|
|
17
|
+
const lib = dateLib ?? new DateLib(options);
|
|
18
|
+
let label = lib.format(date, 'PPPP');
|
|
19
|
+
if (modifiers.today) label = `Today, ${label}`;
|
|
20
|
+
if (modifiers.selected) label = `${label}, selected`;
|
|
21
|
+
return label;
|
|
22
|
+
},
|
|
23
|
+
labelMonthDropdown: 'Choose the Month',
|
|
24
|
+
labelNext: 'Go to the Next Month',
|
|
25
|
+
labelPrevious: 'Go to the Previous Month',
|
|
26
|
+
labelWeekNumber: (weekNumber: number) => `Week ${weekNumber}`,
|
|
27
|
+
labelYearDropdown: 'Choose the Year',
|
|
28
|
+
labelGrid: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
29
|
+
(dateLib ?? new DateLib(options)).formatMonthYear(date),
|
|
30
|
+
labelGridcell: (
|
|
31
|
+
date: Date,
|
|
32
|
+
modifiers?: Modifiers,
|
|
33
|
+
options?: DateLibOptions,
|
|
34
|
+
dateLib?: DateLib,
|
|
35
|
+
) => {
|
|
36
|
+
const lib = dateLib ?? new DateLib(options);
|
|
37
|
+
let label = lib.format(date, 'PPPP');
|
|
38
|
+
if (modifiers?.today) {
|
|
39
|
+
label = `Today, ${label}`;
|
|
40
|
+
}
|
|
41
|
+
return label;
|
|
42
|
+
},
|
|
43
|
+
labelNav: 'Navigation bar',
|
|
44
|
+
labelWeekNumberHeader: 'Week Number',
|
|
45
|
+
labelWeekday: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
46
|
+
(dateLib ?? new DateLib(options)).format(date, 'cccc'),
|
|
47
|
+
},
|
|
48
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { enIN as dateFnsEnIN } from 'date-fns/locale';
|
|
2
|
+
|
|
3
|
+
import type { DateLibOptions, DayPickerLocale } from '../classes/DateLib.js';
|
|
4
|
+
import { DateLib } from '../classes/DateLib.js';
|
|
5
|
+
import type { Modifiers } from '../types/index.js';
|
|
6
|
+
|
|
7
|
+
/** English (India) locale extended with DayPicker-specific translations. */
|
|
8
|
+
export const enIN: DayPickerLocale = {
|
|
9
|
+
...dateFnsEnIN,
|
|
10
|
+
labels: {
|
|
11
|
+
labelDayButton: (
|
|
12
|
+
date: Date,
|
|
13
|
+
modifiers: Modifiers,
|
|
14
|
+
options?: DateLibOptions,
|
|
15
|
+
dateLib?: DateLib,
|
|
16
|
+
) => {
|
|
17
|
+
const lib = dateLib ?? new DateLib(options);
|
|
18
|
+
let label = lib.format(date, 'PPPP');
|
|
19
|
+
if (modifiers.today) label = `Today, ${label}`;
|
|
20
|
+
if (modifiers.selected) label = `${label}, selected`;
|
|
21
|
+
return label;
|
|
22
|
+
},
|
|
23
|
+
labelMonthDropdown: 'Choose the Month',
|
|
24
|
+
labelNext: 'Go to the Next Month',
|
|
25
|
+
labelPrevious: 'Go to the Previous Month',
|
|
26
|
+
labelWeekNumber: (weekNumber: number) => `Week ${weekNumber}`,
|
|
27
|
+
labelYearDropdown: 'Choose the Year',
|
|
28
|
+
labelGrid: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
29
|
+
(dateLib ?? new DateLib(options)).formatMonthYear(date),
|
|
30
|
+
labelGridcell: (
|
|
31
|
+
date: Date,
|
|
32
|
+
modifiers?: Modifiers,
|
|
33
|
+
options?: DateLibOptions,
|
|
34
|
+
dateLib?: DateLib,
|
|
35
|
+
) => {
|
|
36
|
+
const lib = dateLib ?? new DateLib(options);
|
|
37
|
+
let label = lib.format(date, 'PPPP');
|
|
38
|
+
if (modifiers?.today) {
|
|
39
|
+
label = `Today, ${label}`;
|
|
40
|
+
}
|
|
41
|
+
return label;
|
|
42
|
+
},
|
|
43
|
+
labelNav: 'Navigation bar',
|
|
44
|
+
labelWeekNumberHeader: 'Week Number',
|
|
45
|
+
labelWeekday: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
46
|
+
(dateLib ?? new DateLib(options)).format(date, 'cccc'),
|
|
47
|
+
},
|
|
48
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { enNZ as dateFnsEnNZ } from 'date-fns/locale';
|
|
2
|
+
|
|
3
|
+
import type { DateLibOptions, DayPickerLocale } from '../classes/DateLib.js';
|
|
4
|
+
import { DateLib } from '../classes/DateLib.js';
|
|
5
|
+
import type { Modifiers } from '../types/index.js';
|
|
6
|
+
|
|
7
|
+
/** English (New Zealand) locale extended with DayPicker-specific translations. */
|
|
8
|
+
export const enNZ: DayPickerLocale = {
|
|
9
|
+
...dateFnsEnNZ,
|
|
10
|
+
labels: {
|
|
11
|
+
labelDayButton: (
|
|
12
|
+
date: Date,
|
|
13
|
+
modifiers: Modifiers,
|
|
14
|
+
options?: DateLibOptions,
|
|
15
|
+
dateLib?: DateLib,
|
|
16
|
+
) => {
|
|
17
|
+
const lib = dateLib ?? new DateLib(options);
|
|
18
|
+
let label = lib.format(date, 'PPPP');
|
|
19
|
+
if (modifiers.today) label = `Today, ${label}`;
|
|
20
|
+
if (modifiers.selected) label = `${label}, selected`;
|
|
21
|
+
return label;
|
|
22
|
+
},
|
|
23
|
+
labelMonthDropdown: 'Choose the Month',
|
|
24
|
+
labelNext: 'Go to the Next Month',
|
|
25
|
+
labelPrevious: 'Go to the Previous Month',
|
|
26
|
+
labelWeekNumber: (weekNumber: number) => `Week ${weekNumber}`,
|
|
27
|
+
labelYearDropdown: 'Choose the Year',
|
|
28
|
+
labelGrid: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
29
|
+
(dateLib ?? new DateLib(options)).formatMonthYear(date),
|
|
30
|
+
labelGridcell: (
|
|
31
|
+
date: Date,
|
|
32
|
+
modifiers?: Modifiers,
|
|
33
|
+
options?: DateLibOptions,
|
|
34
|
+
dateLib?: DateLib,
|
|
35
|
+
) => {
|
|
36
|
+
const lib = dateLib ?? new DateLib(options);
|
|
37
|
+
let label = lib.format(date, 'PPPP');
|
|
38
|
+
if (modifiers?.today) {
|
|
39
|
+
label = `Today, ${label}`;
|
|
40
|
+
}
|
|
41
|
+
return label;
|
|
42
|
+
},
|
|
43
|
+
labelNav: 'Navigation bar',
|
|
44
|
+
labelWeekNumberHeader: 'Week Number',
|
|
45
|
+
labelWeekday: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
46
|
+
(dateLib ?? new DateLib(options)).format(date, 'cccc'),
|
|
47
|
+
},
|
|
48
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { format } from 'date-fns';
|
|
2
|
+
import { enUS as dateFnsEnUS } from 'date-fns/locale';
|
|
3
|
+
|
|
4
|
+
import type { DateLib, DateLibOptions, DayPickerLocale } from '../classes/DateLib.js';
|
|
5
|
+
import type { Modifiers } from '../types/index.js';
|
|
6
|
+
|
|
7
|
+
/** English (United States) locale extended with DayPicker-specific translations. */
|
|
8
|
+
export const enUS: DayPickerLocale = {
|
|
9
|
+
...dateFnsEnUS,
|
|
10
|
+
labels: {
|
|
11
|
+
labelDayButton: (
|
|
12
|
+
date: Date,
|
|
13
|
+
modifiers: Modifiers,
|
|
14
|
+
options?: DateLibOptions,
|
|
15
|
+
dateLib?: DateLib,
|
|
16
|
+
) => {
|
|
17
|
+
let formatDate: (d: Date, pattern: string) => string;
|
|
18
|
+
if (dateLib && typeof dateLib.format === 'function') {
|
|
19
|
+
formatDate = dateLib.format.bind(dateLib);
|
|
20
|
+
} else {
|
|
21
|
+
formatDate = (d, pattern) => format(d, pattern, { locale: dateFnsEnUS, ...options });
|
|
22
|
+
}
|
|
23
|
+
let label = formatDate(date, 'PPPP');
|
|
24
|
+
if (modifiers.today) label = `Today, ${label}`;
|
|
25
|
+
if (modifiers.selected) label = `${label}, selected`;
|
|
26
|
+
return label;
|
|
27
|
+
},
|
|
28
|
+
labelMonthDropdown: 'Choose the Month',
|
|
29
|
+
labelNext: 'Go to the Next Month',
|
|
30
|
+
labelPrevious: 'Go to the Previous Month',
|
|
31
|
+
labelWeekNumber: (weekNumber: number) => `Week ${weekNumber}`,
|
|
32
|
+
labelYearDropdown: 'Choose the Year',
|
|
33
|
+
labelGrid: (date: Date, options?: DateLibOptions, dateLib?: DateLib) => {
|
|
34
|
+
let formatDate: (d: Date, pattern: string) => string;
|
|
35
|
+
if (dateLib && typeof dateLib.format === 'function') {
|
|
36
|
+
formatDate = dateLib.format.bind(dateLib);
|
|
37
|
+
} else {
|
|
38
|
+
formatDate = (d, pattern) => format(d, pattern, { locale: dateFnsEnUS, ...options });
|
|
39
|
+
}
|
|
40
|
+
return formatDate(date, 'LLLL yyyy');
|
|
41
|
+
},
|
|
42
|
+
labelGridcell: (
|
|
43
|
+
date: Date,
|
|
44
|
+
modifiers?: Modifiers,
|
|
45
|
+
options?: DateLibOptions,
|
|
46
|
+
dateLib?: DateLib,
|
|
47
|
+
) => {
|
|
48
|
+
let formatDate: (d: Date, pattern: string) => string;
|
|
49
|
+
if (dateLib && typeof dateLib.format === 'function') {
|
|
50
|
+
formatDate = dateLib.format.bind(dateLib);
|
|
51
|
+
} else {
|
|
52
|
+
formatDate = (d, pattern) => format(d, pattern, { locale: dateFnsEnUS, ...options });
|
|
53
|
+
}
|
|
54
|
+
let label = formatDate(date, 'PPPP');
|
|
55
|
+
if (modifiers?.today) {
|
|
56
|
+
label = `Today, ${label}`;
|
|
57
|
+
}
|
|
58
|
+
return label;
|
|
59
|
+
},
|
|
60
|
+
labelNav: 'Navigation bar',
|
|
61
|
+
labelWeekNumberHeader: 'Week Number',
|
|
62
|
+
labelWeekday: (date: Date, options?: DateLibOptions, dateLib?: DateLib) => {
|
|
63
|
+
let formatDate: (d: Date, pattern: string) => string;
|
|
64
|
+
if (dateLib && typeof dateLib.format === 'function') {
|
|
65
|
+
formatDate = dateLib.format.bind(dateLib);
|
|
66
|
+
} else {
|
|
67
|
+
formatDate = (d, pattern) => format(d, pattern, { locale: dateFnsEnUS, ...options });
|
|
68
|
+
}
|
|
69
|
+
return formatDate(date, 'cccc');
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { enZA as dateFnsEnZA } from 'date-fns/locale';
|
|
2
|
+
|
|
3
|
+
import type { DateLibOptions, DayPickerLocale } from '../classes/DateLib.js';
|
|
4
|
+
import { DateLib } from '../classes/DateLib.js';
|
|
5
|
+
import type { Modifiers } from '../types/index.js';
|
|
6
|
+
|
|
7
|
+
/** English (South Africa) locale extended with DayPicker-specific translations. */
|
|
8
|
+
export const enZA: DayPickerLocale = {
|
|
9
|
+
...dateFnsEnZA,
|
|
10
|
+
labels: {
|
|
11
|
+
labelDayButton: (
|
|
12
|
+
date: Date,
|
|
13
|
+
modifiers: Modifiers,
|
|
14
|
+
options?: DateLibOptions,
|
|
15
|
+
dateLib?: DateLib,
|
|
16
|
+
) => {
|
|
17
|
+
const lib = dateLib ?? new DateLib(options);
|
|
18
|
+
let label = lib.format(date, 'PPPP');
|
|
19
|
+
if (modifiers.today) label = `Today, ${label}`;
|
|
20
|
+
if (modifiers.selected) label = `${label}, selected`;
|
|
21
|
+
return label;
|
|
22
|
+
},
|
|
23
|
+
labelMonthDropdown: 'Choose the Month',
|
|
24
|
+
labelNext: 'Go to the Next Month',
|
|
25
|
+
labelPrevious: 'Go to the Previous Month',
|
|
26
|
+
labelWeekNumber: (weekNumber: number) => `Week ${weekNumber}`,
|
|
27
|
+
labelYearDropdown: 'Choose the Year',
|
|
28
|
+
labelGrid: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
29
|
+
(dateLib ?? new DateLib(options)).formatMonthYear(date),
|
|
30
|
+
labelGridcell: (
|
|
31
|
+
date: Date,
|
|
32
|
+
modifiers?: Modifiers,
|
|
33
|
+
options?: DateLibOptions,
|
|
34
|
+
dateLib?: DateLib,
|
|
35
|
+
) => {
|
|
36
|
+
const lib = dateLib ?? new DateLib(options);
|
|
37
|
+
let label = lib.format(date, 'PPPP');
|
|
38
|
+
if (modifiers?.today) {
|
|
39
|
+
label = `Today, ${label}`;
|
|
40
|
+
}
|
|
41
|
+
return label;
|
|
42
|
+
},
|
|
43
|
+
labelNav: 'Navigation bar',
|
|
44
|
+
labelWeekNumberHeader: 'Week Number',
|
|
45
|
+
labelWeekday: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
46
|
+
(dateLib ?? new DateLib(options)).format(date, 'cccc'),
|
|
47
|
+
},
|
|
48
|
+
};
|
package/src/locale/eo.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { eo as dateFnsEo } from 'date-fns/locale';
|
|
2
|
+
|
|
3
|
+
import type { DateLibOptions, DayPickerLocale } from '../classes/DateLib.js';
|
|
4
|
+
import { DateLib } from '../classes/DateLib.js';
|
|
5
|
+
import type { Modifiers } from '../types/index.js';
|
|
6
|
+
|
|
7
|
+
/** Esperanto locale extended with DayPicker-specific translations. */
|
|
8
|
+
export const eo: DayPickerLocale = {
|
|
9
|
+
...dateFnsEo,
|
|
10
|
+
labels: {
|
|
11
|
+
labelDayButton: (
|
|
12
|
+
date: Date,
|
|
13
|
+
modifiers: Modifiers,
|
|
14
|
+
options?: DateLibOptions,
|
|
15
|
+
dateLib?: DateLib,
|
|
16
|
+
) => {
|
|
17
|
+
const lib = dateLib ?? new DateLib(options);
|
|
18
|
+
let label = lib.format(date, 'PPPP');
|
|
19
|
+
if (modifiers.today) label = `Hodiaŭ, ${label}`;
|
|
20
|
+
if (modifiers.selected) label = `${label}, elektita`;
|
|
21
|
+
return label;
|
|
22
|
+
},
|
|
23
|
+
labelMonthDropdown: 'Elektu la monaton',
|
|
24
|
+
labelNext: 'Iru al la sekva monato',
|
|
25
|
+
labelPrevious: 'Iru al la antaŭa monato',
|
|
26
|
+
labelWeekNumber: (weekNumber: number) => `Semajno ${weekNumber}`,
|
|
27
|
+
labelYearDropdown: 'Elektu la jaron',
|
|
28
|
+
labelGrid: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
29
|
+
(dateLib ?? new DateLib(options)).formatMonthYear(date),
|
|
30
|
+
labelGridcell: (
|
|
31
|
+
date: Date,
|
|
32
|
+
modifiers?: Modifiers,
|
|
33
|
+
options?: DateLibOptions,
|
|
34
|
+
dateLib?: DateLib,
|
|
35
|
+
) => {
|
|
36
|
+
const lib = dateLib ?? new DateLib(options);
|
|
37
|
+
let label = lib.format(date, 'PPPP');
|
|
38
|
+
if (modifiers?.today) {
|
|
39
|
+
label = `Hodiaŭ, ${label}`;
|
|
40
|
+
}
|
|
41
|
+
return label;
|
|
42
|
+
},
|
|
43
|
+
labelNav: 'Naviga breto',
|
|
44
|
+
labelWeekNumberHeader: 'Semajna numero',
|
|
45
|
+
labelWeekday: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
46
|
+
(dateLib ?? new DateLib(options)).format(date, 'cccc'),
|
|
47
|
+
},
|
|
48
|
+
};
|