esday 1.0.1 → 1.1.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/CHANGELOG.md +13 -0
- package/README.md +5 -1
- package/chunks/{DXFoLbHM.js → 9Re3Ck2t.js} +1 -2
- package/chunks/{CeKusvtV.js → BfEWL_VC.js} +0 -1
- package/chunks/{oiGWnahC.js → Bk-WlP29.js} +20 -35
- package/chunks/{DuRKUq5K.js → BtFAvcS3.js} +1 -2
- package/chunks/BzQsG1-n.js +473 -0
- package/chunks/DBmUXISx.d.ts +3 -0
- package/chunks/{DMdr1ZL1.js → DLzmBvJ7.js} +2 -3
- package/chunks/{DIG_UBsE.js → DThHId1s.js} +3 -4
- package/chunks/{BB5OVV-y.d.ts → MfctHIHI.d.ts} +0 -8
- package/chunks/RZP9wuxV.js +452 -0
- package/chunks/{i3oEJgL3.js → SIX-1Rv6.js} +1 -2
- package/index.d.ts +2 -2
- package/index.js +1 -2
- package/locales/af.d.ts +3 -2
- package/locales/af.js +1 -2
- package/locales/am.d.ts +3 -2
- package/locales/am.js +1 -2
- package/locales/ar-dz.d.ts +0 -2
- package/locales/ar-dz.js +1 -2
- package/locales/ar-iq.d.ts +0 -2
- package/locales/ar-iq.js +1 -2
- package/locales/ar-kw.d.ts +0 -2
- package/locales/ar-kw.js +1 -2
- package/locales/ar-ly.d.ts +0 -2
- package/locales/ar-ly.js +1 -2
- package/locales/ar-ma.d.ts +0 -2
- package/locales/ar-ma.js +1 -2
- package/locales/ar-sa.d.ts +0 -2
- package/locales/ar-sa.js +1 -2
- package/locales/ar-tn.d.ts +0 -2
- package/locales/ar-tn.js +1 -2
- package/locales/ar.d.ts +3 -2
- package/locales/ar.js +1 -2
- package/locales/az.d.ts +3 -2
- package/locales/az.js +1 -2
- package/locales/be.d.ts +3 -2
- package/locales/be.js +1 -2
- package/locales/bg.d.ts +3 -2
- package/locales/bg.js +1 -2
- package/locales/bi.d.ts +3 -2
- package/locales/bi.js +1 -2
- package/locales/bm.d.ts +3 -2
- package/locales/bm.js +1 -2
- package/locales/bn-bd.d.ts +0 -2
- package/locales/bn-bd.js +2 -3
- package/locales/bn.d.ts +3 -2
- package/locales/bn.js +1 -2
- package/locales/bo.d.ts +3 -2
- package/locales/bo.js +1 -2
- package/locales/br.d.ts +3 -2
- package/locales/br.js +1 -2
- package/locales/bs.d.ts +3 -2
- package/locales/bs.js +1 -2
- package/locales/ca.d.ts +3 -2
- package/locales/ca.js +4 -5
- package/locales/cs.d.ts +3 -2
- package/locales/cs.js +1 -2
- package/locales/cv.d.ts +3 -2
- package/locales/cv.js +1 -2
- package/locales/cy.d.ts +3 -2
- package/locales/cy.js +1 -2
- package/locales/da.d.ts +3 -2
- package/locales/da.js +1 -2
- package/locales/de-at.d.ts +0 -2
- package/locales/de-at.js +2 -3
- package/locales/de-ch.d.ts +0 -2
- package/locales/de-ch.js +2 -3
- package/locales/de.d.ts +3 -2
- package/locales/de.js +1 -2
- package/locales/dv.d.ts +3 -2
- package/locales/dv.js +1 -2
- package/locales/el.d.ts +3 -2
- package/locales/el.js +1 -2
- package/locales/en-au.d.ts +0 -2
- package/locales/en-au.js +1 -2
- package/locales/en-ca.d.ts +0 -2
- package/locales/en-ca.js +1 -2
- package/locales/en-gb.d.ts +0 -2
- package/locales/en-gb.js +1 -2
- package/locales/en-ie.d.ts +0 -2
- package/locales/en-ie.js +1 -2
- package/locales/en-il.d.ts +0 -2
- package/locales/en-il.js +1 -2
- package/locales/en-in.d.ts +0 -2
- package/locales/en-in.js +1 -2
- package/locales/en-nz.d.ts +0 -2
- package/locales/en-nz.js +1 -2
- package/locales/en-sg.d.ts +0 -2
- package/locales/en-sg.js +1 -2
- package/locales/en-tt.d.ts +0 -2
- package/locales/en-tt.js +1 -2
- package/locales/en-us.d.ts +0 -2
- package/locales/en-us.js +1 -2
- package/locales/en.d.ts +4 -2
- package/locales/en.js +1 -2
- package/locales/eo.d.ts +3 -2
- package/locales/eo.js +1 -2
- package/locales/es-do.d.ts +0 -2
- package/locales/es-do.js +2 -3
- package/locales/es-mx.d.ts +0 -2
- package/locales/es-mx.js +2 -3
- package/locales/es-pr.d.ts +0 -2
- package/locales/es-pr.js +2 -3
- package/locales/es-us.d.ts +0 -2
- package/locales/es-us.js +2 -3
- package/locales/es.d.ts +3 -2
- package/locales/es.js +1 -2
- package/locales/et.d.ts +3 -2
- package/locales/et.js +1 -2
- package/locales/eu.d.ts +3 -2
- package/locales/eu.js +1 -2
- package/locales/fa.d.ts +3 -2
- package/locales/fa.js +1 -2
- package/locales/fi.d.ts +3 -2
- package/locales/fi.js +1 -2
- package/locales/fil.d.ts +3 -2
- package/locales/fil.js +1 -2
- package/locales/fo.d.ts +3 -2
- package/locales/fo.js +1 -2
- package/locales/fr-ca.d.ts +0 -2
- package/locales/fr-ca.js +2 -3
- package/locales/fr-ch.d.ts +0 -2
- package/locales/fr-ch.js +2 -3
- package/locales/fr.d.ts +3 -2
- package/locales/fr.js +1 -2
- package/locales/fy.d.ts +3 -2
- package/locales/fy.js +1 -2
- package/locales/ga.d.ts +3 -2
- package/locales/ga.js +1 -2
- package/locales/gd.d.ts +3 -2
- package/locales/gd.js +1 -2
- package/locales/gl.d.ts +3 -2
- package/locales/gl.js +1 -2
- package/locales/gom-deva.d.ts +3 -2
- package/locales/gom-deva.js +1 -2
- package/locales/gom-latn.d.ts +3 -2
- package/locales/gom-latn.js +1 -2
- package/locales/gu.d.ts +3 -2
- package/locales/gu.js +1 -2
- package/locales/he.d.ts +3 -2
- package/locales/he.js +1 -2
- package/locales/hi.d.ts +3 -2
- package/locales/hi.js +1 -2
- package/locales/hr.d.ts +3 -2
- package/locales/hr.js +1 -2
- package/locales/ht.d.ts +3 -2
- package/locales/ht.js +1 -2
- package/locales/hu.d.ts +3 -2
- package/locales/hu.js +1 -2
- package/locales/hy-am.d.ts +3 -2
- package/locales/hy-am.js +1 -2
- package/locales/id.d.ts +3 -2
- package/locales/id.js +2 -3
- package/locales/is.d.ts +3 -2
- package/locales/is.js +1 -2
- package/locales/it-ch.d.ts +0 -2
- package/locales/it-ch.js +2 -3
- package/locales/it.d.ts +3 -2
- package/locales/it.js +1 -2
- package/locales/ja.d.ts +6 -2
- package/locales/ja.js +1 -2
- package/locales/jv.d.ts +3 -2
- package/locales/jv.js +1 -2
- package/locales/ka.d.ts +3 -2
- package/locales/ka.js +3 -4
- package/locales/kk.d.ts +3 -2
- package/locales/kk.js +1 -2
- package/locales/km.d.ts +3 -2
- package/locales/km.js +1 -2
- package/locales/kn.d.ts +3 -2
- package/locales/kn.js +1 -2
- package/locales/ko.d.ts +3 -2
- package/locales/ko.js +1 -2
- package/locales/ku.d.ts +3 -2
- package/locales/ku.js +1 -2
- package/locales/ky.d.ts +3 -2
- package/locales/ky.js +1 -2
- package/locales/lb.d.ts +3 -2
- package/locales/lb.js +1 -2
- package/locales/lo.d.ts +3 -2
- package/locales/lo.js +1 -2
- package/locales/lt.d.ts +3 -2
- package/locales/lt.js +1 -2
- package/locales/lv.d.ts +3 -2
- package/locales/lv.js +1 -2
- package/locales/me.d.ts +3 -2
- package/locales/me.js +1 -2
- package/locales/mi.d.ts +0 -2
- package/locales/mi.js +1 -2
- package/locales/mk.d.ts +0 -2
- package/locales/mk.js +1 -2
- package/locales/ml.d.ts +0 -2
- package/locales/ml.js +1 -2
- package/locales/mn.d.ts +0 -2
- package/locales/mn.js +1 -2
- package/locales/mr.d.ts +3 -2
- package/locales/mr.js +3 -8
- package/locales/ms-my.d.ts +0 -2
- package/locales/ms-my.js +2 -3
- package/locales/ms.d.ts +3 -2
- package/locales/ms.js +1 -2
- package/locales/mt.d.ts +3 -2
- package/locales/mt.js +1 -2
- package/locales/my.d.ts +3 -2
- package/locales/my.js +1 -2
- package/locales/nb.d.ts +3 -2
- package/locales/nb.js +1 -2
- package/locales/ne.d.ts +3 -2
- package/locales/ne.js +1 -2
- package/locales/nl-be.d.ts +0 -2
- package/locales/nl-be.js +4 -5
- package/locales/nl.d.ts +3 -2
- package/locales/nl.js +1 -2
- package/locales/nn.d.ts +3 -2
- package/locales/nn.js +1 -2
- package/locales/oc-lnc.d.ts +3 -2
- package/locales/oc-lnc.js +1 -2
- package/locales/pa-in.d.ts +3 -2
- package/locales/pa-in.js +1 -2
- package/locales/pl.d.ts +3 -2
- package/locales/pl.js +2 -3
- package/locales/pt-br.d.ts +0 -2
- package/locales/pt-br.js +2 -3
- package/locales/pt.d.ts +3 -2
- package/locales/pt.js +1 -2
- package/locales/rn.d.ts +3 -2
- package/locales/rn.js +1 -2
- package/locales/ro.d.ts +3 -2
- package/locales/ro.js +1 -2
- package/locales/ru.d.ts +6 -2
- package/locales/ru.js +1 -2
- package/locales/rw.d.ts +3 -2
- package/locales/rw.js +1 -2
- package/locales/sd.d.ts +3 -2
- package/locales/sd.js +1 -2
- package/locales/se.d.ts +3 -2
- package/locales/se.js +1 -2
- package/locales/si.d.ts +3 -2
- package/locales/si.js +1 -2
- package/locales/sk.d.ts +3 -2
- package/locales/sk.js +1 -2
- package/locales/sl.d.ts +3 -2
- package/locales/sl.js +1 -2
- package/locales/sq.d.ts +3 -2
- package/locales/sq.js +1 -2
- package/locales/sr-cyrl.d.ts +0 -2
- package/locales/sr-cyrl.js +2 -3
- package/locales/sr.d.ts +3 -2
- package/locales/sr.js +1 -2
- package/locales/ss.d.ts +3 -2
- package/locales/ss.js +1 -2
- package/locales/sv-fi.d.ts +0 -2
- package/locales/sv-fi.js +2 -3
- package/locales/sv.d.ts +3 -2
- package/locales/sv.js +2 -3
- package/locales/sw.d.ts +3 -2
- package/locales/sw.js +3 -4
- package/locales/ta.d.ts +3 -2
- package/locales/ta.js +1 -2
- package/locales/te.d.ts +3 -2
- package/locales/te.js +1 -2
- package/locales/tet.d.ts +3 -2
- package/locales/tet.js +1 -2
- package/locales/tg.d.ts +3 -2
- package/locales/tg.js +1 -2
- package/locales/th.d.ts +3 -2
- package/locales/th.js +1 -2
- package/locales/tk.d.ts +3 -2
- package/locales/tk.js +1 -2
- package/locales/tl-ph.d.ts +3 -2
- package/locales/tl-ph.js +1 -2
- package/locales/tlh.d.ts +3 -2
- package/locales/tlh.js +1 -2
- package/locales/tr.d.ts +3 -2
- package/locales/tr.js +1 -2
- package/locales/tzl.d.ts +3 -2
- package/locales/tzl.js +1 -2
- package/locales/tzm-latn.d.ts +0 -2
- package/locales/tzm-latn.js +2 -3
- package/locales/tzm.d.ts +3 -2
- package/locales/tzm.js +1 -2
- package/locales/ug-cn.d.ts +3 -2
- package/locales/ug-cn.js +1 -2
- package/locales/uk.d.ts +0 -2
- package/locales/uk.js +2 -3
- package/locales/ur.d.ts +3 -2
- package/locales/ur.js +1 -2
- package/locales/uz-latn.d.ts +0 -2
- package/locales/uz-latn.js +3 -4
- package/locales/uz.d.ts +3 -2
- package/locales/uz.js +1 -2
- package/locales/vi.d.ts +3 -2
- package/locales/vi.js +1 -2
- package/locales/x-pseudo.d.ts +4 -2
- package/locales/x-pseudo.js +1 -2
- package/locales/yo.d.ts +3 -2
- package/locales/yo.js +1 -2
- package/locales/zh-cn.d.ts +0 -2
- package/locales/zh-cn.js +2 -3
- package/locales/zh-hk.d.ts +0 -2
- package/locales/zh-hk.js +2 -3
- package/locales/zh-mo.d.ts +0 -2
- package/locales/zh-mo.js +2 -3
- package/locales/zh-tw.d.ts +0 -2
- package/locales/zh-tw.js +2 -3
- package/locales/zh.d.ts +6 -2
- package/locales/zh.js +1 -2
- package/package.json +25 -21
- package/plugins/advancedFormat/index.d.ts +6 -3
- package/plugins/advancedFormat/index.js +2 -3
- package/plugins/advancedParse/index.d.ts +20 -3
- package/plugins/advancedParse/index.js +6 -8
- package/plugins/calendar/index.d.ts +8 -3
- package/plugins/calendar/index.js +1 -2
- package/plugins/dayOfYear/index.d.ts +1 -3
- package/plugins/dayOfYear/index.js +1 -2
- package/plugins/duration/index.d.ts +14 -8
- package/plugins/duration/index.js +1 -473
- package/plugins/index.d.ts +28 -0
- package/plugins/index.js +28 -0
- package/plugins/isBetween/index.d.ts +1 -3
- package/plugins/isBetween/index.js +2 -3
- package/plugins/isLeapYear/index.d.ts +1 -3
- package/plugins/isLeapYear/index.js +1 -2
- package/plugins/isSameOrAfter/index.d.ts +1 -3
- package/plugins/isSameOrAfter/index.js +1 -2
- package/plugins/isSameOrBefore/index.d.ts +1 -3
- package/plugins/isSameOrBefore/index.js +1 -2
- package/plugins/isToday/index.d.ts +1 -3
- package/plugins/isToday/index.js +2 -3
- package/plugins/isTomorrow/index.d.ts +1 -3
- package/plugins/isTomorrow/index.js +2 -3
- package/plugins/isYesterday/index.d.ts +1 -3
- package/plugins/isYesterday/index.js +2 -3
- package/plugins/isoWeek/index.d.ts +12 -3
- package/plugins/isoWeek/index.js +5 -6
- package/plugins/locale/index.d.ts +30 -21
- package/plugins/locale/index.js +4 -5
- package/plugins/localeData/index.d.ts +9 -3
- package/plugins/localeData/index.js +3 -6
- package/plugins/localizedFormat/index.d.ts +6 -3
- package/plugins/localizedFormat/index.js +3 -4
- package/plugins/localizedParse/index.d.ts +26 -3
- package/plugins/localizedParse/index.js +2 -3
- package/plugins/minMax/index.d.ts +1 -3
- package/plugins/minMax/index.js +2 -3
- package/plugins/objectSupport/index.d.ts +10 -3
- package/plugins/objectSupport/index.js +6 -9
- package/plugins/pluralGetSet/index.d.ts +8 -3
- package/plugins/pluralGetSet/index.js +1 -2
- package/plugins/quarterOfYear/index.d.ts +6 -3
- package/plugins/quarterOfYear/index.js +4 -5
- package/plugins/relativeTime/index.d.ts +22 -8
- package/plugins/relativeTime/index.js +7 -6
- package/plugins/timezone/index.d.ts +17 -3
- package/plugins/timezone/index.js +1 -454
- package/plugins/toArray/index.d.ts +1 -3
- package/plugins/toArray/index.js +1 -2
- package/plugins/toObject/index.d.ts +1 -3
- package/plugins/toObject/index.js +1 -2
- package/plugins/utc/index.d.ts +11 -3
- package/plugins/utc/index.js +8 -9
- package/plugins/week/index.d.ts +12 -3
- package/plugins/week/index.js +6 -7
- package/LICENSE +0 -21
- package/chunks/CBlQG2yl.d.ts +0 -5
package/locales/yo.js
CHANGED
package/locales/zh-cn.d.ts
CHANGED
package/locales/zh-cn.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { cloneLocale, setLocaleProperty } from "../plugins/locale/index.js";
|
|
2
1
|
import localeZh from "./zh.js";
|
|
3
|
-
|
|
2
|
+
import { cloneLocale, setLocaleProperty } from "../plugins/locale/index.js";
|
|
3
|
+
// src/locales/zh-cn.ts
|
|
4
4
|
/**
|
|
5
5
|
* Chinese (China) [zh-CN]
|
|
6
6
|
*/
|
|
7
7
|
const localeZhCn = cloneLocale(localeZh);
|
|
8
8
|
setLocaleProperty(localeZhCn, "name", "zh-CN");
|
|
9
|
-
//#endregion
|
|
10
9
|
export { localeZhCn as default };
|
package/locales/zh-hk.d.ts
CHANGED
package/locales/zh-hk.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { cloneLocale, setLocaleProperty } from "../plugins/locale/index.js";
|
|
2
1
|
import localeZh from "./zh.js";
|
|
3
|
-
|
|
2
|
+
import { cloneLocale, setLocaleProperty } from "../plugins/locale/index.js";
|
|
3
|
+
// src/locales/zh-hk.ts
|
|
4
4
|
/**
|
|
5
5
|
* Chinese (Hong Kong) [zh-HK]
|
|
6
6
|
*/
|
|
@@ -15,5 +15,4 @@ const calendar = {
|
|
|
15
15
|
const localeZhHk = cloneLocale(localeZh);
|
|
16
16
|
setLocaleProperty(localeZhHk, "name", "zh-HK");
|
|
17
17
|
setLocaleProperty(localeZhHk, "calendar", calendar);
|
|
18
|
-
//#endregion
|
|
19
18
|
export { localeZhHk as default };
|
package/locales/zh-mo.d.ts
CHANGED
package/locales/zh-mo.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { cloneLocale, setLocaleProperty } from "../plugins/locale/index.js";
|
|
2
1
|
import localeZh from "./zh.js";
|
|
3
|
-
|
|
2
|
+
import { cloneLocale, setLocaleProperty } from "../plugins/locale/index.js";
|
|
3
|
+
// src/locales/zh-mo.ts
|
|
4
4
|
/**
|
|
5
5
|
* Chinese (Macau) [zh-MO]
|
|
6
6
|
*/
|
|
@@ -15,5 +15,4 @@ const calendar = {
|
|
|
15
15
|
const localeZhHk = cloneLocale(localeZh);
|
|
16
16
|
setLocaleProperty(localeZhHk, "name", "zh-MO");
|
|
17
17
|
setLocaleProperty(localeZhHk, "calendar", calendar);
|
|
18
|
-
//#endregion
|
|
19
18
|
export { localeZhHk as default };
|
package/locales/zh-tw.d.ts
CHANGED
package/locales/zh-tw.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { cloneLocale, setLocaleProperty } from "../plugins/locale/index.js";
|
|
2
1
|
import localeZh from "./zh.js";
|
|
3
|
-
|
|
2
|
+
import { cloneLocale, setLocaleProperty } from "../plugins/locale/index.js";
|
|
3
|
+
// src/locales/zh-tw.ts
|
|
4
4
|
/**
|
|
5
5
|
* Chinese (Taiwan) [zh-TW]
|
|
6
6
|
*/
|
|
@@ -15,5 +15,4 @@ const calendar = {
|
|
|
15
15
|
const localeZhTw = cloneLocale(localeZh);
|
|
16
16
|
setLocaleProperty(localeZhTw, "name", "zh-TW");
|
|
17
17
|
setLocaleProperty(localeZhTw, "calendar", calendar);
|
|
18
|
-
//#endregion
|
|
19
18
|
export { localeZhTw as default };
|
package/locales/zh.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chinese [zh]
|
|
3
|
+
*
|
|
4
|
+
* This locale requires the week plugin, when the calendar property
|
|
5
|
+
* is used (e.g. in the calendar plugin).
|
|
6
|
+
*/
|
|
1
7
|
import { Locale } from "../plugins/locale/index.js";
|
|
2
|
-
//#region src/locales/zh.d.ts
|
|
3
8
|
declare module 'esday' {
|
|
4
9
|
interface EsDay {
|
|
5
10
|
week(): number;
|
|
@@ -7,5 +12,4 @@ declare module 'esday' {
|
|
|
7
12
|
}
|
|
8
13
|
}
|
|
9
14
|
declare const localeZh: Readonly<Locale>;
|
|
10
|
-
//#endregion
|
|
11
15
|
export { localeZh as default };
|
package/locales/zh.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "esday",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.1.1",
|
|
5
5
|
"description": "A simple date library fully written in TypeScript",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/BePo65/esday",
|
|
@@ -35,6 +35,10 @@
|
|
|
35
35
|
"types": "./index.d.ts",
|
|
36
36
|
"default": "./index.js"
|
|
37
37
|
},
|
|
38
|
+
"./plugins": {
|
|
39
|
+
"types": "./plugins/index.d.ts",
|
|
40
|
+
"default": "./plugins/index.js"
|
|
41
|
+
},
|
|
38
42
|
"./plugins/*": {
|
|
39
43
|
"types": "./plugins/*/index.d.ts",
|
|
40
44
|
"default": "./plugins/*/index.js"
|
|
@@ -52,28 +56,28 @@
|
|
|
52
56
|
"*"
|
|
53
57
|
],
|
|
54
58
|
"devDependencies": {
|
|
55
|
-
"@biomejs/biome": "2.
|
|
56
|
-
"@commitlint/cli": "^21.2.
|
|
57
|
-
"@commitlint/config-conventional": "^21.2.
|
|
58
|
-
"@playwright/test": "~1.
|
|
59
|
-
"@types/node": "^26.
|
|
60
|
-
"@vitest/browser-playwright": "^
|
|
61
|
-
"@vitest/coverage-v8": "
|
|
62
|
-
"@vitest/ui": "
|
|
63
|
-
"commit-and-tag-version": "^13.
|
|
59
|
+
"@biomejs/biome": "2.6.7",
|
|
60
|
+
"@commitlint/cli": "^21.2.4",
|
|
61
|
+
"@commitlint/config-conventional": "^21.2.4",
|
|
62
|
+
"@playwright/test": "~1.65.0",
|
|
63
|
+
"@types/node": "^26.6.6",
|
|
64
|
+
"@vitest/browser-playwright": "^5.1.0",
|
|
65
|
+
"@vitest/coverage-v8": "5.1.0",
|
|
66
|
+
"@vitest/ui": "5.1.0",
|
|
67
|
+
"commit-and-tag-version": "^13.3.0",
|
|
64
68
|
"cpy-cli": "^7.0.0",
|
|
65
|
-
"dompurify": "^3.4.
|
|
69
|
+
"dompurify": "^3.4.17",
|
|
66
70
|
"husky": "^9.1.7",
|
|
67
|
-
"jsdom": "^
|
|
68
|
-
"marked": "^18.0
|
|
69
|
-
"moment
|
|
70
|
-
"moment": "^
|
|
71
|
-
"playwright": "~1.
|
|
72
|
-
"tsdown": "^0.
|
|
73
|
-
"typescript": "
|
|
74
|
-
"ultracite": "
|
|
75
|
-
"vite": "^8.
|
|
76
|
-
"vitest": "
|
|
71
|
+
"jsdom": "^31.0.0",
|
|
72
|
+
"marked": "^18.2.0",
|
|
73
|
+
"moment": "^2.31.0",
|
|
74
|
+
"moment-timezone": "^0.6.6",
|
|
75
|
+
"playwright": "~1.65.0",
|
|
76
|
+
"tsdown": "^0.23.7",
|
|
77
|
+
"typescript": "6.0.3",
|
|
78
|
+
"ultracite": "8.2.0",
|
|
79
|
+
"vite": "^8.3.8",
|
|
80
|
+
"vitest": "5.1.0"
|
|
77
81
|
},
|
|
78
82
|
"commit-and-tag-version": {
|
|
79
83
|
"packageFiles": [
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* advancedFormat plugin
|
|
3
|
+
*
|
|
4
|
+
* This plugin adds format definitions to date formatting
|
|
5
|
+
*/
|
|
6
|
+
import { s as EsDayPlugin } from "../../chunks/MfctHIHI.js";
|
|
3
7
|
declare const advancedFormatPlugin: EsDayPlugin<{}>;
|
|
4
|
-
//#endregion
|
|
5
8
|
export { advancedFormatPlugin as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as padStart, r as padZoneStr } from "../../chunks/
|
|
2
|
-
|
|
1
|
+
import { n as padStart, r as padZoneStr } from "../../chunks/9Re3Ck2t.js";
|
|
2
|
+
// src/plugins/advancedFormat/index.ts
|
|
3
3
|
const advancedFormatPlugin = (_, _dayClass, dayFactory) => {
|
|
4
4
|
dayFactory.addFormatTokenDefinitions({
|
|
5
5
|
d: (sourceDate) => sourceDate.day().toString(),
|
|
@@ -12,5 +12,4 @@ const advancedFormatPlugin = (_, _dayClass, dayFactory) => {
|
|
|
12
12
|
kk: (sourceDate) => padStart(sourceDate.hour() !== 0 ? sourceDate.hour() : 24, 2, "0")
|
|
13
13
|
});
|
|
14
14
|
};
|
|
15
|
-
//#endregion
|
|
16
15
|
export { advancedFormatPlugin as default };
|
|
@@ -1,5 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* advancedParse plugin
|
|
3
|
+
*
|
|
4
|
+
* This plugin adds format definitions to date parsing.
|
|
5
|
+
*
|
|
6
|
+
* used esday parameters in '$conf':
|
|
7
|
+
* args_1 format parameter in call signature
|
|
8
|
+
* args_2 2nd parameter in call signature
|
|
9
|
+
* args_3 3rd parameter in call signature
|
|
10
|
+
*
|
|
11
|
+
* new esday parameters in '$conf':
|
|
12
|
+
* parseOptions ParseOptions object containing parsing options
|
|
13
|
+
* used by parser and postParser
|
|
14
|
+
*
|
|
15
|
+
* The plugin advancedParse must be activated before the plugin locale and before
|
|
16
|
+
* the plugin localizedParse, as it terminates the parsing chain, when there is a
|
|
17
|
+
* format property. Activation example:
|
|
18
|
+
* esday.extend(advancedParsePlugin).extend(localizedParsePlugin).extend(localePlugin)
|
|
19
|
+
*/
|
|
20
|
+
import { s as EsDayPlugin } from "../../chunks/MfctHIHI.js";
|
|
3
21
|
declare const advancedParsePlugin: EsDayPlugin<{}>;
|
|
4
|
-
//#endregion
|
|
5
22
|
export { advancedParsePlugin as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { f as constants_default } from "../../chunks/
|
|
2
|
-
import { a as isUndefined, i as isString, o as isValidDate, t as isArray } from "../../chunks/
|
|
3
|
-
|
|
1
|
+
import { f as constants_default } from "../../chunks/BfEWL_VC.js";
|
|
2
|
+
import { a as isUndefined, i as isString, o as isValidDate, t as isArray } from "../../chunks/BtFAvcS3.js";
|
|
3
|
+
// src/plugins/advancedParse/index.ts
|
|
4
4
|
/**
|
|
5
5
|
* Function to create a Date object from its date components
|
|
6
6
|
* is set to the corresponding function in the core module and
|
|
@@ -73,9 +73,7 @@ function addMillisecondsToInput() {
|
|
|
73
73
|
case 1:
|
|
74
74
|
value *= 100;
|
|
75
75
|
break;
|
|
76
|
-
case 2:
|
|
77
|
-
value *= 10;
|
|
78
|
-
break;
|
|
76
|
+
case 2: value *= 10;
|
|
79
77
|
}
|
|
80
78
|
parsedElements.milliseconds = value;
|
|
81
79
|
};
|
|
@@ -140,7 +138,7 @@ function makeParser(format, isStrict) {
|
|
|
140
138
|
if (isString(token)) {
|
|
141
139
|
const separatorLength = token.length;
|
|
142
140
|
if (isStrict && separatorsMatch) separatorsMatch && (separatorsMatch = input.substring(0, separatorLength) === token);
|
|
143
|
-
input = input.slice(separatorLength);
|
|
141
|
+
input = input.slice(0, start) + input.slice(start + separatorLength);
|
|
144
142
|
} else {
|
|
145
143
|
const { regex, updater } = token;
|
|
146
144
|
const part = input.slice(start);
|
|
@@ -149,6 +147,7 @@ function makeParser(format, isStrict) {
|
|
|
149
147
|
const value = match[0];
|
|
150
148
|
input = input.replace(value, "");
|
|
151
149
|
updater(parsedDateElements, value, parseOptions);
|
|
150
|
+
start += match.index;
|
|
152
151
|
}
|
|
153
152
|
}
|
|
154
153
|
}
|
|
@@ -401,5 +400,4 @@ const advancedParsePlugin = (_, dayClass, dayFactory) => {
|
|
|
401
400
|
};
|
|
402
401
|
dateFromDateComponents = proto["dateFromDateComponents"];
|
|
403
402
|
};
|
|
404
|
-
//#endregion
|
|
405
403
|
export { advancedParsePlugin as default };
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* calendar plugin
|
|
3
|
+
*
|
|
4
|
+
* This plugin adds 'calendar' method to EsDay
|
|
5
|
+
*
|
|
6
|
+
* This plugin requires the 'locale' plugin and a locale to be loaded.
|
|
7
|
+
*/
|
|
8
|
+
import { s as EsDayPlugin } from "../../chunks/MfctHIHI.js";
|
|
2
9
|
import { CalendarPartial } from "../locale/index.js";
|
|
3
|
-
//#region src/plugins/calendar/index.d.ts
|
|
4
10
|
declare module 'esday' {
|
|
5
11
|
interface EsDay {
|
|
6
12
|
calendar(referenceDate?: EsDay | null, formats?: CalendarPartial): string;
|
|
7
13
|
}
|
|
8
14
|
}
|
|
9
15
|
declare const calendarPlugin: EsDayPlugin<{}>;
|
|
10
|
-
//#endregion
|
|
11
16
|
export { calendarPlugin as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/plugins/calendar/index.ts
|
|
2
2
|
const defaultCalendar = {
|
|
3
3
|
sameDay: "[Today at] LT",
|
|
4
4
|
nextDay: "[Tomorrow at] LT",
|
|
@@ -27,5 +27,4 @@ const calendarPlugin = (_, dayClass, dayFactory) => {
|
|
|
27
27
|
return this.format(currentFormat);
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
|
-
//#endregion
|
|
31
30
|
export { calendarPlugin as default };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { s as EsDayPlugin } from "../../chunks/
|
|
2
|
-
//#region src/plugins/dayOfYear/index.d.ts
|
|
1
|
+
import { s as EsDayPlugin } from "../../chunks/MfctHIHI.js";
|
|
3
2
|
declare module 'esday' {
|
|
4
3
|
interface EsDay {
|
|
5
4
|
dayOfYear(): number;
|
|
@@ -7,5 +6,4 @@ declare module 'esday' {
|
|
|
7
6
|
}
|
|
8
7
|
}
|
|
9
8
|
declare const dayOfYearPlugin: EsDayPlugin<{}>;
|
|
10
|
-
//#endregion
|
|
11
9
|
export { dayOfYearPlugin as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/plugins/dayOfYear/index.ts
|
|
2
2
|
const SECONDS_A_DAY = 86400;
|
|
3
3
|
const dayOfYearPlugin = (_, dayClass, dayFactory) => {
|
|
4
4
|
dayClass.prototype.dayOfYear = function(input) {
|
|
@@ -6,5 +6,4 @@ const dayOfYearPlugin = (_, dayClass, dayFactory) => {
|
|
|
6
6
|
return input === void 0 ? dayOfYear : this.add(input - dayOfYear, "day");
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
|
-
//#endregion
|
|
10
9
|
export { dayOfYearPlugin as default };
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
/** = 0:
|
|
2
|
+
* Duration plugin
|
|
3
|
+
*
|
|
4
|
+
* This plugin adds 'duration' and 'isDuration' to the esday factory.
|
|
5
|
+
*
|
|
6
|
+
* To use the humanize method or any of the locale methods, the plugin Locale,
|
|
7
|
+
* a loaded locale and the plugin RelativeTime are required.
|
|
8
|
+
*/
|
|
9
|
+
import { C as UnitDates, D as UnitIsoWeeks, L as UnitTypePlurals, s as EsDayPlugin } from "../../chunks/MfctHIHI.js";
|
|
2
10
|
import { Locale } from "../locale/index.js";
|
|
3
11
|
import { ThresholdRelativeTime } from "../relativeTime/index.js";
|
|
4
|
-
//#region src/plugins/duration/index.d.ts
|
|
5
12
|
declare module 'esday' {
|
|
6
13
|
interface EsDayFactory {
|
|
7
14
|
duration(): Duration;
|
|
@@ -15,8 +22,8 @@ declare module 'esday' {
|
|
|
15
22
|
isDuration(d?: any): d is Duration;
|
|
16
23
|
}
|
|
17
24
|
}
|
|
18
|
-
type UnitTypeDuration = Exclude<UnitTypePlurals, UnitIsoWeeks | UnitDates>;
|
|
19
|
-
type UnitsObjectTypeDuration = {
|
|
25
|
+
export type UnitTypeDuration = Exclude<UnitTypePlurals, UnitIsoWeeks | UnitDates>;
|
|
26
|
+
export type UnitsObjectTypeDuration = {
|
|
20
27
|
years?: number | string;
|
|
21
28
|
quarters?: number | string;
|
|
22
29
|
months?: number | string;
|
|
@@ -27,12 +34,12 @@ type UnitsObjectTypeDuration = {
|
|
|
27
34
|
seconds?: number | string;
|
|
28
35
|
milliseconds?: number | string;
|
|
29
36
|
};
|
|
30
|
-
type DurationBase = {
|
|
37
|
+
export type DurationBase = {
|
|
31
38
|
milliseconds: number;
|
|
32
39
|
days: number;
|
|
33
40
|
months: number;
|
|
34
41
|
};
|
|
35
|
-
interface Duration {
|
|
42
|
+
export interface Duration {
|
|
36
43
|
clone(): Duration;
|
|
37
44
|
humanize(): string;
|
|
38
45
|
humanize(withSuffix: boolean): string;
|
|
@@ -73,5 +80,4 @@ interface Duration {
|
|
|
73
80
|
isValid(): boolean;
|
|
74
81
|
}
|
|
75
82
|
declare const durationPlugin: EsDayPlugin<{}>;
|
|
76
|
-
|
|
77
|
-
export { Duration, DurationBase, UnitTypeDuration, UnitsObjectTypeDuration, durationPlugin as default };
|
|
83
|
+
export { durationPlugin as default };
|