esday 0.5.0 → 0.6.2
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 +35 -0
- package/LICENSE +21 -21
- package/README.md +63 -51
- package/chunks/AyQQ6US-.js +84 -0
- package/chunks/{Y32qdU_5.js → BkjWOpMU.js} +7 -1
- package/chunks/{MtjcOKi-.d.ts → C5qDMHT5.d.ts} +2 -2
- package/chunks/{DqhiVwLi.d.ts → CODi8AFH.d.ts} +63 -35
- package/{index.js → chunks/CXWzCl3n.js} +91 -183
- package/chunks/{BRRrAbUl.js → CdvTtmWL.js} +2 -2
- package/chunks/{DXHbH1CI.js → Shk32pTP.js} +1 -1
- package/chunks/{Cb5SvF6r.js → v_QBn7Xm.js} +1 -1
- package/chunks/xt8C2lbv.js +38 -0
- package/index.d.mts +3 -0
- package/index.mjs +3 -0
- package/locales/af.d.mts +6 -0
- package/locales/{af.js → af.mjs} +4 -2
- package/locales/am.d.mts +6 -0
- package/locales/{am.js → am.mjs} +4 -2
- package/locales/ar-dz.d.mts +9 -0
- package/locales/{ar-dz.js → ar-dz.mjs} +7 -9
- package/locales/ar-iq.d.mts +9 -0
- package/locales/ar-iq.mjs +12 -0
- package/locales/ar-kw.d.mts +9 -0
- package/locales/{ar-kw.js → ar-kw.mjs} +7 -9
- package/locales/ar-ly.d.mts +9 -0
- package/locales/ar-ly.mjs +12 -0
- package/locales/ar-ma.d.mts +9 -0
- package/locales/{ar-ma.js → ar-ma.mjs} +7 -9
- package/locales/ar-sa.d.mts +9 -0
- package/locales/{ar-sa.js → ar-sa.mjs} +7 -9
- package/locales/ar-tn.d.mts +9 -0
- package/locales/{ar-tn.js → ar-tn.mjs} +7 -9
- package/locales/ar.d.mts +6 -0
- package/{chunks/BeVgU2nj.js → locales/ar.mjs} +12 -2
- package/locales/az.d.mts +6 -0
- package/locales/{az.js → az.mjs} +4 -2
- package/locales/be.d.mts +6 -0
- package/locales/{be.js → be.mjs} +55 -59
- package/locales/bg.d.mts +6 -0
- package/locales/{bg.js → bg.mjs} +4 -2
- package/locales/bi.d.mts +6 -0
- package/locales/{bi.js → bi.mjs} +4 -2
- package/locales/bm.d.mts +6 -0
- package/locales/{bm.js → bm.mjs} +4 -2
- package/locales/bn-bd.d.mts +9 -0
- package/locales/{bn-bd.js → bn-bd.mjs} +7 -9
- package/locales/bn.d.mts +6 -0
- package/{chunks/GjKpN6U-.js → locales/bn.mjs} +4 -2
- package/locales/bo.d.mts +6 -0
- package/locales/{bo.js → bo.mjs} +4 -2
- package/locales/br.d.mts +6 -0
- package/locales/{br.js → br.mjs} +10 -9
- package/locales/bs.d.mts +6 -0
- package/locales/{bs.js → bs.mjs} +4 -2
- package/locales/ca.d.mts +6 -0
- package/locales/{ca.js → ca.mjs} +35 -36
- package/locales/cs.d.mts +6 -0
- package/locales/{cs.js → cs.mjs} +38 -34
- package/locales/cv.d.mts +6 -0
- package/locales/{cv.js → cv.mjs} +4 -2
- package/locales/cy.d.mts +6 -0
- package/locales/{cy.js → cy.mjs} +4 -2
- package/locales/da.d.mts +6 -0
- package/locales/{da.js → da.mjs} +4 -2
- package/locales/de-at.d.mts +9 -0
- package/locales/{de-at.js → de-at.mjs} +7 -9
- package/locales/de-ch.d.mts +9 -0
- package/locales/de-ch.mjs +12 -0
- package/locales/de.d.mts +6 -0
- package/{chunks/DMtTiWuY.js → locales/de.mjs} +6 -2
- package/locales/dv.d.mts +6 -0
- package/locales/{dv.js → dv.mjs} +4 -2
- package/locales/el.d.mts +6 -0
- package/locales/{el.js → el.mjs} +4 -2
- package/locales/en-au.d.mts +9 -0
- package/locales/{en-au.js → en-au.mjs} +7 -8
- package/locales/en-ca.d.mts +9 -0
- package/locales/{en-ca.js → en-ca.mjs} +7 -8
- package/locales/{en-gb.d.ts → en-gb.d.mts} +1 -3
- package/locales/{en-gb.js → en-gb.mjs} +9 -8
- package/locales/en-ie.d.mts +9 -0
- package/locales/{en-ie.js → en-ie.mjs} +7 -8
- package/locales/en-il.d.mts +9 -0
- package/locales/{en-il.js → en-il.mjs} +7 -8
- package/locales/en-in.d.mts +9 -0
- package/locales/{en-in.js → en-in.mjs} +7 -8
- package/locales/en-nz.d.mts +9 -0
- package/locales/{en-nz.js → en-nz.mjs} +7 -8
- package/locales/en-sg.d.mts +9 -0
- package/locales/{en-sg.js → en-sg.mjs} +7 -8
- package/locales/en-tt.d.mts +9 -0
- package/locales/{en-tt.js → en-tt.mjs} +7 -8
- package/locales/en-us.d.mts +9 -0
- package/locales/en-us.mjs +12 -0
- package/locales/en.d.mts +6 -0
- package/{chunks/tfkJ5D3p.js → locales/en.mjs} +4 -2
- package/locales/eo.d.mts +6 -0
- package/locales/{eo.js → eo.mjs} +4 -2
- package/locales/es-do.d.mts +9 -0
- package/locales/{es-do.js → es-do.mjs} +7 -9
- package/locales/es-mx.d.mts +9 -0
- package/locales/es-mx.mjs +13 -0
- package/locales/es-pr.d.mts +9 -0
- package/locales/es-pr.mjs +16 -0
- package/locales/es-us.d.mts +9 -0
- package/locales/es-us.mjs +12 -0
- package/locales/es.d.mts +6 -0
- package/{chunks/Dixb5KKs.js → locales/es.mjs} +4 -2
- package/locales/et.d.mts +6 -0
- package/locales/{et.js → et.mjs} +6 -2
- package/locales/eu.d.mts +6 -0
- package/locales/{eu.js → eu.mjs} +4 -2
- package/locales/fa.d.mts +6 -0
- package/locales/{fa.js → fa.mjs} +4 -2
- package/locales/fi.d.mts +6 -0
- package/locales/{fi.js → fi.mjs} +8 -2
- package/locales/fil.d.mts +6 -0
- package/locales/{fil.js → fil.mjs} +4 -2
- package/locales/fo.d.mts +6 -0
- package/locales/{fo.js → fo.mjs} +4 -2
- package/locales/fr-ca.d.mts +9 -0
- package/locales/fr-ca.mjs +16 -0
- package/locales/fr-ch.d.mts +9 -0
- package/locales/fr-ch.mjs +16 -0
- package/locales/fr.d.mts +6 -0
- package/{chunks/D009Z-ld.js → locales/fr.mjs} +5 -4
- package/locales/fy.d.mts +6 -0
- package/locales/{fy.js → fy.mjs} +4 -2
- package/locales/ga.d.mts +6 -0
- package/locales/{ga.js → ga.mjs} +4 -2
- package/locales/gd.d.mts +6 -0
- package/locales/{gd.js → gd.mjs} +4 -2
- package/locales/gl.d.mts +6 -0
- package/locales/{gl.js → gl.mjs} +4 -2
- package/locales/gom-deva.d.mts +6 -0
- package/locales/{gom-deva.js → gom-deva.mjs} +34 -32
- package/locales/gom-latn.d.mts +6 -0
- package/locales/{gom-latn.js → gom-latn.mjs} +34 -32
- package/locales/gu.d.mts +6 -0
- package/locales/{gu.js → gu.mjs} +4 -2
- package/locales/he.d.mts +6 -0
- package/locales/{he.js → he.mjs} +8 -5
- package/locales/hi.d.mts +6 -0
- package/locales/{hi.js → hi.mjs} +34 -35
- package/locales/hr.d.mts +6 -0
- package/locales/{hr.js → hr.mjs} +10 -4
- package/locales/ht.d.mts +6 -0
- package/locales/{ht.js → ht.mjs} +4 -2
- package/locales/hu.d.mts +6 -0
- package/locales/{hu.js → hu.mjs} +6 -2
- package/locales/hy-am.d.mts +6 -0
- package/locales/{hy-am.js → hy-am.mjs} +34 -35
- package/locales/id.d.mts +6 -0
- package/locales/{id.js → id.mjs} +4 -2
- package/locales/is.d.mts +6 -0
- package/locales/{is.js → is.mjs} +14 -2
- package/locales/it-ch.d.mts +9 -0
- package/locales/{it-ch.js → it-ch.mjs} +4 -9
- package/locales/it.d.mts +6 -0
- package/{chunks/B5f9poqo.js → locales/it.mjs} +25 -24
- package/locales/{ja.d.ts → ja.d.mts} +1 -4
- package/locales/{ja.js → ja.mjs} +4 -2
- package/locales/jv.d.mts +6 -0
- package/locales/{jv.js → jv.mjs} +4 -2
- package/locales/ka.d.mts +6 -0
- package/locales/{ka.js → ka.mjs} +25 -26
- package/locales/kk.d.mts +6 -0
- package/locales/{kk.js → kk.mjs} +4 -2
- package/locales/km.d.mts +6 -0
- package/locales/{km.js → km.mjs} +4 -2
- package/locales/kn.d.mts +6 -0
- package/locales/{kn.js → kn.mjs} +4 -2
- package/locales/ko.d.mts +6 -0
- package/locales/{ko.js → ko.mjs} +5 -3
- package/locales/ku.d.mts +6 -0
- package/locales/{ku.js → ku.mjs} +4 -2
- package/locales/ky.d.mts +6 -0
- package/locales/{ky.js → ky.mjs} +4 -2
- package/locales/lb.d.mts +6 -0
- package/locales/{lb.js → lb.mjs} +5 -2
- package/locales/lo.d.mts +6 -0
- package/locales/{lo.js → lo.mjs} +4 -2
- package/locales/lt.d.mts +6 -0
- package/locales/{lt.js → lt.mjs} +4 -2
- package/locales/lv.d.mts +6 -0
- package/locales/{lv.js → lv.mjs} +4 -2
- package/locales/me.d.mts +6 -0
- package/locales/{me.js → me.mjs} +33 -33
- package/locales/mi.d.mts +6 -0
- package/locales/{mi.js → mi.mjs} +4 -2
- package/locales/mk.d.mts +6 -0
- package/locales/{mk.js → mk.mjs} +4 -2
- package/locales/ml.d.mts +6 -0
- package/locales/{ml.js → ml.mjs} +4 -2
- package/locales/mn.d.mts +6 -0
- package/locales/{mn.js → mn.mjs} +37 -16
- package/locales/mr.d.mts +6 -0
- package/locales/{mr.js → mr.mjs} +16 -2
- package/locales/ms-my.d.mts +9 -0
- package/locales/ms-my.mjs +12 -0
- package/locales/ms.d.mts +6 -0
- package/{chunks/CQ57zhVp.js → locales/ms.mjs} +4 -2
- package/locales/mt.d.mts +6 -0
- package/locales/{mt.js → mt.mjs} +4 -2
- package/locales/my.d.mts +6 -0
- package/locales/{my.js → my.mjs} +4 -2
- package/locales/nb.d.mts +6 -0
- package/locales/{nb.js → nb.mjs} +4 -2
- package/locales/ne.d.mts +6 -0
- package/locales/{ne.js → ne.mjs} +4 -2
- package/locales/nl-be.d.mts +9 -0
- package/locales/nl-be.mjs +16 -0
- package/locales/nl.d.mts +6 -0
- package/{chunks/BDssPbM_.js → locales/nl.mjs} +4 -2
- package/locales/nn.d.mts +6 -0
- package/locales/{nn.js → nn.mjs} +4 -2
- package/locales/oc-lnc.d.mts +6 -0
- package/locales/{oc-lnc.js → oc-lnc.mjs} +35 -36
- package/locales/pa-in.d.mts +6 -0
- package/locales/{pa-in.js → pa-in.mjs} +4 -2
- package/locales/pl.d.mts +6 -0
- package/locales/{pl.js → pl.mjs} +5 -2
- package/locales/pt-br.d.mts +9 -0
- package/locales/{pt-br.js → pt-br.mjs} +7 -9
- package/locales/pt.d.mts +6 -0
- package/{chunks/CWqzr5E5.js → locales/pt.mjs} +4 -2
- package/locales/rn.d.mts +6 -0
- package/locales/{rn.js → rn.mjs} +4 -2
- package/locales/ro.d.mts +6 -0
- package/locales/{ro.js → ro.mjs} +4 -2
- package/locales/{ru.d.ts → ru.d.mts} +1 -4
- package/locales/{ru.js → ru.mjs} +83 -82
- package/locales/rw.d.mts +6 -0
- package/locales/{rw.js → rw.mjs} +4 -2
- package/locales/sd.d.mts +6 -0
- package/locales/{sd.js → sd.mjs} +4 -2
- package/locales/se.d.mts +6 -0
- package/locales/{se.js → se.mjs} +4 -2
- package/locales/si.d.mts +6 -0
- package/locales/{si.js → si.mjs} +4 -2
- package/locales/sk.d.mts +6 -0
- package/locales/{sk.js → sk.mjs} +8 -2
- package/locales/sl.d.mts +6 -0
- package/locales/{sl.js → sl.mjs} +8 -2
- package/locales/sq.d.mts +6 -0
- package/locales/{sq.js → sq.mjs} +4 -2
- package/locales/sr-cyrl.d.mts +9 -0
- package/locales/{sr-cyrl.js → sr-cyrl.mjs} +16 -15
- package/locales/sr.d.mts +6 -0
- package/{chunks/Cg4ZI9v8.js → locales/sr.mjs} +14 -8
- package/locales/ss.d.mts +6 -0
- package/locales/{ss.js → ss.mjs} +4 -2
- package/locales/sv-fi.d.mts +9 -0
- package/locales/{sv-fi.js → sv-fi.mjs} +7 -9
- package/locales/sv.d.mts +6 -0
- package/{chunks/br7kModF.js → locales/sv.mjs} +5 -4
- package/locales/sw.d.mts +6 -0
- package/locales/{sw.js → sw.mjs} +4 -2
- package/locales/ta.d.mts +6 -0
- package/locales/{ta.js → ta.mjs} +4 -2
- package/locales/te.d.mts +6 -0
- package/locales/{te.js → te.mjs} +4 -2
- package/locales/tet.d.mts +6 -0
- package/locales/{tet.js → tet.mjs} +5 -4
- package/locales/tg.d.mts +6 -0
- package/locales/{tg.js → tg.mjs} +34 -35
- package/locales/th.d.mts +6 -0
- package/locales/{th.js → th.mjs} +4 -2
- package/locales/tk.d.mts +6 -0
- package/locales/{tk.js → tk.mjs} +5 -4
- package/locales/tl-ph.d.mts +6 -0
- package/locales/{tl-ph.js → tl-ph.mjs} +4 -2
- package/locales/tlh.d.mts +6 -0
- package/locales/{tlh.js → tlh.mjs} +5 -2
- package/locales/tr.d.mts +6 -0
- package/locales/{tr.js → tr.mjs} +5 -4
- package/locales/tzl.d.mts +6 -0
- package/locales/{tzl.js → tzl.mjs} +4 -2
- package/locales/tzm-latn.d.mts +9 -0
- package/locales/{tzm-latn.js → tzm-latn.mjs} +9 -9
- package/locales/tzm.d.mts +6 -0
- package/{chunks/l2Rxo2H0.js → locales/tzm.mjs} +4 -2
- package/locales/ug-cn.d.mts +6 -0
- package/locales/{ug-cn.js → ug-cn.mjs} +4 -2
- package/locales/uk.d.mts +6 -0
- package/locales/{uk.js → uk.mjs} +37 -32
- package/locales/ur.d.mts +6 -0
- package/locales/{ur.js → ur.mjs} +4 -2
- package/locales/uz-latn.d.mts +9 -0
- package/locales/{uz-latn.js → uz-latn.mjs} +9 -9
- package/locales/uz.d.mts +6 -0
- package/{chunks/CQJ0-ZuR.js → locales/uz.mjs} +4 -2
- package/locales/vi.d.mts +6 -0
- package/locales/{vi.js → vi.mjs} +4 -2
- package/locales/x-pseudo.d.mts +6 -0
- package/locales/{x-pseudo.js → x-pseudo.mjs} +5 -4
- package/locales/yo.d.mts +6 -0
- package/locales/{yo.js → yo.mjs} +4 -2
- package/locales/zh-cn.d.mts +9 -0
- package/locales/zh-cn.mjs +12 -0
- package/locales/zh-hk.d.mts +9 -0
- package/locales/zh-hk.mjs +21 -0
- package/locales/zh-mo.d.mts +9 -0
- package/locales/zh-mo.mjs +21 -0
- package/locales/zh-tw.d.mts +9 -0
- package/locales/zh-tw.mjs +21 -0
- package/locales/{zh.d.ts → zh.d.mts} +1 -4
- package/{chunks/BXRGSAJG.js → locales/zh.mjs} +5 -4
- package/package.json +29 -23
- package/plugins/advancedFormat/index.d.mts +6 -0
- package/plugins/advancedFormat/{index.js → index.mjs} +4 -6
- package/plugins/advancedParse/index.d.mts +6 -0
- package/plugins/advancedParse/{index.js → index.mjs} +21 -20
- package/plugins/calendar/{index.d.ts → index.d.mts} +2 -4
- package/plugins/calendar/{index.js → index.mjs} +1 -2
- package/plugins/dayOfYear/{index.d.ts → index.d.mts} +1 -2
- package/plugins/dayOfYear/{index.js → index.mjs} +1 -2
- package/plugins/duration/index.d.mts +78 -0
- package/plugins/duration/index.mjs +477 -0
- package/plugins/isBetween/{index.d.ts → index.d.mts} +1 -2
- package/plugins/isBetween/{index.js → index.mjs} +2 -3
- package/plugins/isLeapYear/{index.d.ts → index.d.mts} +1 -2
- package/plugins/isLeapYear/{index.js → index.mjs} +1 -2
- package/plugins/isSameOrAfter/{index.d.ts → index.d.mts} +1 -2
- package/plugins/isSameOrAfter/{index.js → index.mjs} +1 -2
- package/plugins/isSameOrBefore/{index.d.ts → index.d.mts} +1 -2
- package/plugins/isSameOrBefore/{index.js → index.mjs} +1 -2
- package/plugins/isToday/{index.d.ts → index.d.mts} +1 -2
- package/plugins/isToday/{index.js → index.mjs} +2 -3
- package/plugins/isTomorrow/{index.d.ts → index.d.mts} +1 -2
- package/plugins/isTomorrow/{index.js → index.mjs} +2 -3
- package/plugins/isYesterday/{index.d.ts → index.d.mts} +1 -2
- package/plugins/isYesterday/{index.js → index.mjs} +2 -3
- package/plugins/isoWeek/{index.d.ts → index.d.mts} +1 -3
- package/plugins/isoWeek/{index.js → index.mjs} +13 -25
- package/{chunks/St35qgL0.d.ts → plugins/locale/index.d.mts} +5 -4
- package/{chunks/CoBtJ4c1.js → plugins/locale/index.mjs} +13 -16
- package/plugins/localeData/index.d.mts +6 -0
- package/plugins/localeData/{index.js → index.mjs} +18 -11
- package/plugins/localizedFormat/index.d.mts +6 -0
- package/plugins/localizedFormat/{index.js → index.mjs} +5 -10
- package/plugins/localizedParse/index.d.mts +6 -0
- package/plugins/localizedParse/{index.js → index.mjs} +40 -22
- package/plugins/minMax/{index.d.ts → index.d.mts} +1 -2
- package/plugins/minMax/{index.js → index.mjs} +2 -3
- package/plugins/objectSupport/index.d.mts +6 -0
- package/plugins/objectSupport/{index.js → index.mjs} +33 -38
- package/plugins/pluralGetSet/{index.d.ts → index.d.mts} +1 -3
- package/plugins/pluralGetSet/{index.js → index.mjs} +1 -2
- package/plugins/quarterOfYear/{index.d.ts → index.d.mts} +1 -3
- package/plugins/quarterOfYear/{index.js → index.mjs} +11 -18
- package/plugins/relativeTime/index.d.mts +47 -0
- package/plugins/relativeTime/index.mjs +187 -0
- package/plugins/timezone/index.d.mts +6 -0
- package/plugins/timezone/index.mjs +456 -0
- package/plugins/toArray/{index.d.ts → index.d.mts} +1 -2
- package/plugins/toArray/{index.js → index.mjs} +1 -2
- package/plugins/toObject/{index.d.ts → index.d.mts} +1 -2
- package/plugins/toObject/{index.js → index.mjs} +1 -2
- package/plugins/utc/{index.d.ts → index.d.mts} +1 -2
- package/plugins/utc/{index.js → index.mjs} +37 -39
- package/plugins/week/{index.d.ts → index.d.mts} +1 -3
- package/plugins/week/{index.js → index.mjs} +17 -27
- package/chunks/BtmEtAW3.js +0 -43
- package/chunks/DjY7KvwG.js +0 -28
- package/index.d.ts +0 -3
- package/locales/af.d.ts +0 -8
- package/locales/am.d.ts +0 -8
- package/locales/ar-dz.d.ts +0 -11
- package/locales/ar-iq.d.ts +0 -11
- package/locales/ar-iq.js +0 -14
- package/locales/ar-kw.d.ts +0 -11
- package/locales/ar-ly.d.ts +0 -11
- package/locales/ar-ly.js +0 -14
- package/locales/ar-ma.d.ts +0 -11
- package/locales/ar-sa.d.ts +0 -11
- package/locales/ar-tn.d.ts +0 -11
- package/locales/ar.d.ts +0 -8
- package/locales/ar.js +0 -3
- package/locales/az.d.ts +0 -8
- package/locales/be.d.ts +0 -8
- package/locales/bg.d.ts +0 -8
- package/locales/bi.d.ts +0 -8
- package/locales/bm.d.ts +0 -8
- package/locales/bn-bd.d.ts +0 -11
- package/locales/bn.d.ts +0 -8
- package/locales/bn.js +0 -3
- package/locales/bo.d.ts +0 -8
- package/locales/br.d.ts +0 -8
- package/locales/bs.d.ts +0 -8
- package/locales/ca.d.ts +0 -8
- package/locales/cs.d.ts +0 -8
- package/locales/cv.d.ts +0 -8
- package/locales/cy.d.ts +0 -8
- package/locales/da.d.ts +0 -8
- package/locales/de-at.d.ts +0 -11
- package/locales/de-ch.d.ts +0 -11
- package/locales/de-ch.js +0 -14
- package/locales/de.d.ts +0 -8
- package/locales/de.js +0 -3
- package/locales/dv.d.ts +0 -8
- package/locales/el.d.ts +0 -8
- package/locales/en-au.d.ts +0 -11
- package/locales/en-ca.d.ts +0 -11
- package/locales/en-ie.d.ts +0 -11
- package/locales/en-il.d.ts +0 -11
- package/locales/en-in.d.ts +0 -11
- package/locales/en-nz.d.ts +0 -11
- package/locales/en-sg.d.ts +0 -11
- package/locales/en-tt.d.ts +0 -11
- package/locales/en-us.d.ts +0 -11
- package/locales/en-us.js +0 -13
- package/locales/en.d.ts +0 -8
- package/locales/en.js +0 -3
- package/locales/eo.d.ts +0 -8
- package/locales/es-do.d.ts +0 -11
- package/locales/es-mx.d.ts +0 -11
- package/locales/es-mx.js +0 -15
- package/locales/es-pr.d.ts +0 -11
- package/locales/es-pr.js +0 -18
- package/locales/es-us.d.ts +0 -11
- package/locales/es-us.js +0 -14
- package/locales/es.d.ts +0 -8
- package/locales/es.js +0 -3
- package/locales/et.d.ts +0 -8
- package/locales/eu.d.ts +0 -8
- package/locales/fa.d.ts +0 -8
- package/locales/fi.d.ts +0 -8
- package/locales/fil.d.ts +0 -8
- package/locales/fo.d.ts +0 -8
- package/locales/fr-ca.d.ts +0 -11
- package/locales/fr-ca.js +0 -18
- package/locales/fr-ch.d.ts +0 -11
- package/locales/fr-ch.js +0 -18
- package/locales/fr.d.ts +0 -8
- package/locales/fr.js +0 -3
- package/locales/fy.d.ts +0 -8
- package/locales/ga.d.ts +0 -8
- package/locales/gd.d.ts +0 -8
- package/locales/gl.d.ts +0 -8
- package/locales/gom-deva.d.ts +0 -8
- package/locales/gom-latn.d.ts +0 -8
- package/locales/gu.d.ts +0 -8
- package/locales/he.d.ts +0 -8
- package/locales/hi.d.ts +0 -8
- package/locales/hr.d.ts +0 -8
- package/locales/ht.d.ts +0 -8
- package/locales/hu.d.ts +0 -8
- package/locales/hy-am.d.ts +0 -8
- package/locales/id.d.ts +0 -8
- package/locales/is.d.ts +0 -8
- package/locales/it-ch.d.ts +0 -11
- package/locales/it.d.ts +0 -8
- package/locales/it.js +0 -3
- package/locales/jv.d.ts +0 -8
- package/locales/ka.d.ts +0 -8
- package/locales/kk.d.ts +0 -8
- package/locales/km.d.ts +0 -8
- package/locales/kn.d.ts +0 -8
- package/locales/ko.d.ts +0 -8
- package/locales/ku.d.ts +0 -8
- package/locales/ky.d.ts +0 -8
- package/locales/lb.d.ts +0 -8
- package/locales/lo.d.ts +0 -8
- package/locales/lt.d.ts +0 -8
- package/locales/lv.d.ts +0 -8
- package/locales/me.d.ts +0 -8
- package/locales/mi.d.ts +0 -8
- package/locales/mk.d.ts +0 -8
- package/locales/ml.d.ts +0 -8
- package/locales/mn.d.ts +0 -8
- package/locales/mr.d.ts +0 -8
- package/locales/ms-my.d.ts +0 -11
- package/locales/ms-my.js +0 -14
- package/locales/ms.d.ts +0 -8
- package/locales/ms.js +0 -3
- package/locales/mt.d.ts +0 -8
- package/locales/my.d.ts +0 -8
- package/locales/nb.d.ts +0 -8
- package/locales/ne.d.ts +0 -8
- package/locales/nl-be.d.ts +0 -11
- package/locales/nl-be.js +0 -18
- package/locales/nl.d.ts +0 -8
- package/locales/nl.js +0 -3
- package/locales/nn.d.ts +0 -8
- package/locales/oc-lnc.d.ts +0 -8
- package/locales/pa-in.d.ts +0 -8
- package/locales/pl.d.ts +0 -8
- package/locales/pt-br.d.ts +0 -11
- package/locales/pt.d.ts +0 -8
- package/locales/pt.js +0 -3
- package/locales/rn.d.ts +0 -8
- package/locales/ro.d.ts +0 -8
- package/locales/rw.d.ts +0 -8
- package/locales/sd.d.ts +0 -8
- package/locales/se.d.ts +0 -8
- package/locales/si.d.ts +0 -8
- package/locales/sk.d.ts +0 -8
- package/locales/sl.d.ts +0 -8
- package/locales/sq.d.ts +0 -8
- package/locales/sr-cyrl.d.ts +0 -11
- package/locales/sr.d.ts +0 -8
- package/locales/sr.js +0 -3
- package/locales/ss.d.ts +0 -8
- package/locales/sv-fi.d.ts +0 -11
- package/locales/sv.d.ts +0 -8
- package/locales/sv.js +0 -3
- package/locales/sw.d.ts +0 -8
- package/locales/ta.d.ts +0 -8
- package/locales/te.d.ts +0 -8
- package/locales/tet.d.ts +0 -8
- package/locales/tg.d.ts +0 -8
- package/locales/th.d.ts +0 -8
- package/locales/tk.d.ts +0 -8
- package/locales/tl-ph.d.ts +0 -8
- package/locales/tlh.d.ts +0 -8
- package/locales/tr.d.ts +0 -8
- package/locales/tzl.d.ts +0 -8
- package/locales/tzm-latn.d.ts +0 -11
- package/locales/tzm.d.ts +0 -8
- package/locales/tzm.js +0 -3
- package/locales/ug-cn.d.ts +0 -8
- package/locales/uk.d.ts +0 -8
- package/locales/ur.d.ts +0 -8
- package/locales/uz-latn.d.ts +0 -11
- package/locales/uz.d.ts +0 -8
- package/locales/uz.js +0 -3
- package/locales/vi.d.ts +0 -8
- package/locales/x-pseudo.d.ts +0 -8
- package/locales/yo.d.ts +0 -8
- package/locales/zh-cn.d.ts +0 -11
- package/locales/zh-cn.js +0 -14
- package/locales/zh-hk.d.ts +0 -11
- package/locales/zh-hk.js +0 -23
- package/locales/zh-mo.d.ts +0 -11
- package/locales/zh-mo.js +0 -23
- package/locales/zh-tw.d.ts +0 -11
- package/locales/zh-tw.js +0 -23
- package/locales/zh.js +0 -3
- package/plugins/advancedFormat/index.d.ts +0 -8
- package/plugins/advancedParse/index.d.ts +0 -8
- package/plugins/locale/index.d.ts +0 -4
- package/plugins/locale/index.js +0 -7
- package/plugins/localeData/index.d.ts +0 -8
- package/plugins/localizedFormat/index.d.ts +0 -8
- package/plugins/localizedParse/index.d.ts +0 -8
- package/plugins/objectSupport/index.d.ts +0 -8
- package/plugins/relativeTime/index.d.ts +0 -59
- package/plugins/relativeTime/index.js +0 -154
|
@@ -1,44 +1,16 @@
|
|
|
1
|
-
import { constants_default } from "./
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { createInstanceFromExist } from "./
|
|
6
|
-
import { padStart, padZoneStr } from "./
|
|
1
|
+
import { p as constants_default } from "./BkjWOpMU.js";
|
|
2
|
+
import { a as isUndefined, n as isEmptyObject, o as isValidDate, r as isObject, t as isArray } from "./v_QBn7Xm.js";
|
|
3
|
+
import { n as normalizeUnitWithPlurals, t as normalizeUnit } from "./AyQQ6US-.js";
|
|
4
|
+
import { i as setUnitInDate, r as prettyUnitsDate, t as getUnitInDate } from "./xt8C2lbv.js";
|
|
5
|
+
import { t as createInstanceFromExist } from "./Shk32pTP.js";
|
|
6
|
+
import { n as padStart, r as padZoneStr } from "./CdvTtmWL.js";
|
|
7
7
|
|
|
8
|
-
//#region rolldown:runtime
|
|
9
|
-
var __create = Object.create;
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
14
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
15
|
-
var __commonJS = (cb, mod) => function() {
|
|
16
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
17
|
-
};
|
|
18
|
-
var __copyProps = (to, from, except, desc) => {
|
|
19
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
20
|
-
key = keys[i];
|
|
21
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
22
|
-
get: ((k) => from[k]).bind(null, key),
|
|
23
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
return to;
|
|
27
|
-
};
|
|
28
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
29
|
-
value: mod,
|
|
30
|
-
enumerable: true
|
|
31
|
-
}) : target, mod));
|
|
32
|
-
|
|
33
|
-
//#endregion
|
|
34
8
|
//#region src/core/Impl/add.ts
|
|
35
9
|
function addImpl(that, value, units) {
|
|
36
10
|
const $d = that["$d"];
|
|
37
11
|
const unit = normalizeUnitWithPlurals(units);
|
|
38
12
|
const instanceFactorySet = (multiplier) => {
|
|
39
|
-
|
|
40
|
-
newInstance["$d"].setDate($d.getDate() + Math.round(multiplier * value));
|
|
41
|
-
return newInstance;
|
|
13
|
+
return that.set("date", that.get("date") + Math.round(multiplier * value));
|
|
42
14
|
};
|
|
43
15
|
switch (normalizeUnitWithPlurals(unit)) {
|
|
44
16
|
case constants_default.YEAR: return that.set("year", that.get("year") + value);
|
|
@@ -94,37 +66,34 @@ function diffImpl(that, date, units, asFloat = false) {
|
|
|
94
66
|
const zoneDelta = (that.utcOffset() - date.utcOffset()) * constants_default.MILLISECONDS_A_MINUTE;
|
|
95
67
|
let result;
|
|
96
68
|
if (isUndefined(units)) result = diffInMs;
|
|
97
|
-
else {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
result = diffInMs;
|
|
126
|
-
break;
|
|
127
|
-
}
|
|
69
|
+
else switch (normalizeUnitWithPlurals(units)) {
|
|
70
|
+
case constants_default.YEAR:
|
|
71
|
+
result = diffInMonths / 12;
|
|
72
|
+
break;
|
|
73
|
+
case constants_default.MONTH:
|
|
74
|
+
result = diffInMonths;
|
|
75
|
+
break;
|
|
76
|
+
case constants_default.QUARTER:
|
|
77
|
+
result = diffInMonths / 3;
|
|
78
|
+
break;
|
|
79
|
+
case constants_default.WEEK:
|
|
80
|
+
result = (diffInMs + zoneDelta) / constants_default.MILLISECONDS_A_WEEK;
|
|
81
|
+
break;
|
|
82
|
+
case constants_default.DAY:
|
|
83
|
+
result = (diffInMs + zoneDelta) / constants_default.MILLISECONDS_A_DAY;
|
|
84
|
+
break;
|
|
85
|
+
case constants_default.HOUR:
|
|
86
|
+
result = diffInMs / constants_default.MILLISECONDS_A_HOUR;
|
|
87
|
+
break;
|
|
88
|
+
case constants_default.MIN:
|
|
89
|
+
result = diffInMs / constants_default.MILLISECONDS_A_MINUTE;
|
|
90
|
+
break;
|
|
91
|
+
case constants_default.SECOND:
|
|
92
|
+
result = diffInMs / constants_default.MILLISECONDS_A_SECOND;
|
|
93
|
+
break;
|
|
94
|
+
default:
|
|
95
|
+
result = diffInMs;
|
|
96
|
+
break;
|
|
128
97
|
}
|
|
129
98
|
return asFloat ? result : absFloor(result);
|
|
130
99
|
}
|
|
@@ -217,19 +186,17 @@ function startOfImpl(that, unit, reverse = false) {
|
|
|
217
186
|
const result = that.clone();
|
|
218
187
|
const setterFunc = result["$set"];
|
|
219
188
|
const instanceFactorySet = (method, slice) => {
|
|
220
|
-
const
|
|
221
|
-
0,
|
|
222
|
-
0,
|
|
223
|
-
0,
|
|
224
|
-
0
|
|
225
|
-
];
|
|
226
|
-
const argumentEnd = [
|
|
189
|
+
const argument = reverse ? [
|
|
227
190
|
23,
|
|
228
191
|
59,
|
|
229
192
|
59,
|
|
230
193
|
999
|
|
231
|
-
]
|
|
232
|
-
|
|
194
|
+
].slice(slice) : [
|
|
195
|
+
0,
|
|
196
|
+
0,
|
|
197
|
+
0,
|
|
198
|
+
0
|
|
199
|
+
].slice(slice);
|
|
233
200
|
setterFunc.call(result, method, argument);
|
|
234
201
|
};
|
|
235
202
|
const instanceFactory = (date, month) => {
|
|
@@ -264,108 +231,36 @@ function startOfImpl(that, unit, reverse = false) {
|
|
|
264
231
|
}
|
|
265
232
|
|
|
266
233
|
//#endregion
|
|
267
|
-
//#region
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
}
|
|
272
|
-
module.exports = _checkPrivateRedeclaration, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
273
|
-
}) });
|
|
274
|
-
|
|
275
|
-
//#endregion
|
|
276
|
-
//#region node_modules/.pnpm/@oxc-project+runtime@0.80.0/node_modules/@oxc-project/runtime/src/helpers/classPrivateMethodInitSpec.js
|
|
277
|
-
var require_classPrivateMethodInitSpec = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/@oxc-project+runtime@0.80.0/node_modules/@oxc-project/runtime/src/helpers/classPrivateMethodInitSpec.js": ((exports, module) => {
|
|
278
|
-
var checkPrivateRedeclaration = require_checkPrivateRedeclaration();
|
|
279
|
-
function _classPrivateMethodInitSpec$1(e, a) {
|
|
280
|
-
checkPrivateRedeclaration(e, a), a.add(e);
|
|
281
|
-
}
|
|
282
|
-
module.exports = _classPrivateMethodInitSpec$1, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
283
|
-
}) });
|
|
284
|
-
|
|
285
|
-
//#endregion
|
|
286
|
-
//#region node_modules/.pnpm/@oxc-project+runtime@0.80.0/node_modules/@oxc-project/runtime/src/helpers/typeof.js
|
|
287
|
-
var require_typeof = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/@oxc-project+runtime@0.80.0/node_modules/@oxc-project/runtime/src/helpers/typeof.js": ((exports, module) => {
|
|
288
|
-
function _typeof$2(o) {
|
|
289
|
-
"@babel/helpers - typeof";
|
|
290
|
-
return module.exports = _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o$1) {
|
|
291
|
-
return typeof o$1;
|
|
292
|
-
} : function(o$1) {
|
|
293
|
-
return o$1 && "function" == typeof Symbol && o$1.constructor === Symbol && o$1 !== Symbol.prototype ? "symbol" : typeof o$1;
|
|
294
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof$2(o);
|
|
295
|
-
}
|
|
296
|
-
module.exports = _typeof$2, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
297
|
-
}) });
|
|
298
|
-
|
|
299
|
-
//#endregion
|
|
300
|
-
//#region node_modules/.pnpm/@oxc-project+runtime@0.80.0/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js
|
|
301
|
-
var require_toPrimitive = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/@oxc-project+runtime@0.80.0/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js": ((exports, module) => {
|
|
302
|
-
var _typeof$1 = require_typeof()["default"];
|
|
303
|
-
function toPrimitive$1(t, r) {
|
|
304
|
-
if ("object" != _typeof$1(t) || !t) return t;
|
|
305
|
-
var e = t[Symbol.toPrimitive];
|
|
306
|
-
if (void 0 !== e) {
|
|
307
|
-
var i = e.call(t, r || "default");
|
|
308
|
-
if ("object" != _typeof$1(i)) return i;
|
|
309
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
310
|
-
}
|
|
311
|
-
return ("string" === r ? String : Number)(t);
|
|
312
|
-
}
|
|
313
|
-
module.exports = toPrimitive$1, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
314
|
-
}) });
|
|
315
|
-
|
|
316
|
-
//#endregion
|
|
317
|
-
//#region node_modules/.pnpm/@oxc-project+runtime@0.80.0/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js
|
|
318
|
-
var require_toPropertyKey = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/@oxc-project+runtime@0.80.0/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js": ((exports, module) => {
|
|
319
|
-
var _typeof = require_typeof()["default"];
|
|
320
|
-
var toPrimitive = require_toPrimitive();
|
|
321
|
-
function toPropertyKey$1(t) {
|
|
322
|
-
var i = toPrimitive(t, "string");
|
|
323
|
-
return "symbol" == _typeof(i) ? i : i + "";
|
|
324
|
-
}
|
|
325
|
-
module.exports = toPropertyKey$1, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
326
|
-
}) });
|
|
234
|
+
//#region \0@oxc-project+runtime@0.112.0/helpers/checkPrivateRedeclaration.js
|
|
235
|
+
function _checkPrivateRedeclaration(e, t) {
|
|
236
|
+
if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
237
|
+
}
|
|
327
238
|
|
|
328
239
|
//#endregion
|
|
329
|
-
//#region
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
334
|
-
value: t,
|
|
335
|
-
enumerable: !0,
|
|
336
|
-
configurable: !0,
|
|
337
|
-
writable: !0
|
|
338
|
-
}) : e[r] = t, e;
|
|
339
|
-
}
|
|
340
|
-
module.exports = _defineProperty$1, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
341
|
-
}) });
|
|
240
|
+
//#region \0@oxc-project+runtime@0.112.0/helpers/classPrivateMethodInitSpec.js
|
|
241
|
+
function _classPrivateMethodInitSpec(e, a) {
|
|
242
|
+
_checkPrivateRedeclaration(e, a), a.add(e);
|
|
243
|
+
}
|
|
342
244
|
|
|
343
245
|
//#endregion
|
|
344
|
-
//#region
|
|
345
|
-
|
|
346
|
-
function
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
}
|
|
350
|
-
module.exports = _assertClassBrand$1, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
351
|
-
}) });
|
|
246
|
+
//#region \0@oxc-project+runtime@0.112.0/helpers/assertClassBrand.js
|
|
247
|
+
function _assertClassBrand(e, t, n) {
|
|
248
|
+
if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
|
|
249
|
+
throw new TypeError("Private element is not present on this object");
|
|
250
|
+
}
|
|
352
251
|
|
|
353
252
|
//#endregion
|
|
354
253
|
//#region src/core/EsDay.ts
|
|
355
|
-
var import_classPrivateMethodInitSpec = /* @__PURE__ */ __toESM(require_classPrivateMethodInitSpec(), 1);
|
|
356
|
-
var import_defineProperty = /* @__PURE__ */ __toESM(require_defineProperty(), 1);
|
|
357
|
-
var import_assertClassBrand = /* @__PURE__ */ __toESM(require_assertClassBrand(), 1);
|
|
358
254
|
var _EsDay_brand = /* @__PURE__ */ new WeakSet();
|
|
359
255
|
var EsDay = class EsDay {
|
|
360
256
|
constructor(d, conf) {
|
|
361
|
-
(
|
|
362
|
-
|
|
363
|
-
(0, import_defineProperty.default)(this, "$conf", {});
|
|
257
|
+
_classPrivateMethodInitSpec(this, _EsDay_brand);
|
|
258
|
+
this.$conf = {};
|
|
364
259
|
if (!isUndefined(conf)) this.$conf = structuredClone(conf);
|
|
365
260
|
this.$parse(d);
|
|
366
261
|
}
|
|
367
262
|
$parse(d) {
|
|
368
|
-
this.$d = (
|
|
263
|
+
this.$d = _assertClassBrand(_EsDay_brand, this, _parseImpl).call(this, d);
|
|
369
264
|
}
|
|
370
265
|
/**
|
|
371
266
|
* Create a Date object from the date components (year, month, ...).
|
|
@@ -383,10 +278,9 @@ var EsDay = class EsDay {
|
|
|
383
278
|
*/
|
|
384
279
|
dateFromDateComponents(Y, M, D, h, m, s, ms, offsetMs) {
|
|
385
280
|
const parsedYearOrDefault = Y ?? (/* @__PURE__ */ new Date()).getFullYear();
|
|
386
|
-
const parsedMonthOrDefault = M ?? (Y !== void 0 ? 1 : (/* @__PURE__ */ new Date()).getMonth() + 1);
|
|
387
281
|
const dateComponents = {
|
|
388
282
|
Y: parsedYearOrDefault,
|
|
389
|
-
M:
|
|
283
|
+
M: (M ?? (Y !== void 0 ? 1 : (/* @__PURE__ */ new Date()).getMonth() + 1)) - 1,
|
|
390
284
|
D: D ?? 1,
|
|
391
285
|
h: h ?? 0,
|
|
392
286
|
m: m ?? 0,
|
|
@@ -397,7 +291,7 @@ var EsDay = class EsDay {
|
|
|
397
291
|
let overflowed = false;
|
|
398
292
|
let result = new Date(dateComponents.Y, dateComponents.M, dateComponents.D, dateComponents.h, dateComponents.m, dateComponents.s, dateComponents.ms);
|
|
399
293
|
if (yearWithoutCentury) result.setFullYear(dateComponents.Y);
|
|
400
|
-
overflowed = M !== void 0 && M - 1 !== result.getMonth() || D !== void 0 && D !== result.getDate() || h !== void 0 && h
|
|
294
|
+
overflowed = M !== void 0 && (M < 1 || M > 12 || M - 1 !== result.getMonth()) || D !== void 0 && (D < 0 || D !== result.getDate()) || h !== void 0 && (h < 0 || h > 23) || m !== void 0 && (m < 0 || m > 59) || s !== void 0 && (s < 0 || s > 59);
|
|
401
295
|
if (overflowed) result = constants_default.INVALID_DATE;
|
|
402
296
|
else if (!isUndefined(offsetMs)) {
|
|
403
297
|
const currentOffsetMin = result.getTimezoneOffset();
|
|
@@ -440,7 +334,7 @@ var EsDay = class EsDay {
|
|
|
440
334
|
return startOfImpl(this, units, true);
|
|
441
335
|
}
|
|
442
336
|
add(value, unit) {
|
|
443
|
-
if (!isObject(value)
|
|
337
|
+
if (!isObject(value)) return addImpl(this, value, unit ?? constants_default.MS);
|
|
444
338
|
return this.clone();
|
|
445
339
|
}
|
|
446
340
|
subtract(value, unit) {
|
|
@@ -452,7 +346,7 @@ var EsDay = class EsDay {
|
|
|
452
346
|
}
|
|
453
347
|
utcOffset(offset, _keepLocalTime) {
|
|
454
348
|
if (offset !== void 0) return new EsDay(constants_default.INVALID_DATE);
|
|
455
|
-
return -Math.round(this
|
|
349
|
+
return -Math.round(this.$d.getTimezoneOffset());
|
|
456
350
|
}
|
|
457
351
|
get(unit) {
|
|
458
352
|
const normalizedUnit = normalizeUnitWithPlurals(unit);
|
|
@@ -476,10 +370,14 @@ var EsDay = class EsDay {
|
|
|
476
370
|
return this.$d.toUTCString();
|
|
477
371
|
}
|
|
478
372
|
$set(unit, values) {
|
|
479
|
-
if (isObject(unit)) return this
|
|
373
|
+
if (isObject(unit)) return this;
|
|
480
374
|
const normalizedUnit = normalizeUnitWithPlurals(unit);
|
|
481
375
|
if (normalizedUnit === constants_default.DAY) setUnitInDate(this.$d, constants_default.DAY_OF_MONTH, this.date() + (values[0] - this.day()));
|
|
482
|
-
else if (normalizedUnit === constants_default.
|
|
376
|
+
else if (normalizedUnit === constants_default.YEAR && values.length === 2) {
|
|
377
|
+
const originalDate = this.date();
|
|
378
|
+
setUnitInDate(this.$d, constants_default.YEAR, values);
|
|
379
|
+
if (originalDate > 0 && this.date() !== originalDate) setUnitInDate(this.$d, constants_default.DAY_OF_MONTH, 0);
|
|
380
|
+
} else if (normalizedUnit === constants_default.MONTH) {
|
|
483
381
|
const originalDate = values.length === 1 ? this.date() : values[1];
|
|
484
382
|
setUnitInDate(this.$d, constants_default.MONTH, values);
|
|
485
383
|
if (originalDate > 0 && this.date() !== originalDate) setUnitInDate(this.$d, constants_default.DAY_OF_MONTH, 0);
|
|
@@ -517,19 +415,26 @@ function _parseImpl(date) {
|
|
|
517
415
|
if (isUndefined(date)) return /* @__PURE__ */ new Date();
|
|
518
416
|
if (isEmptyObject(date)) return /* @__PURE__ */ new Date();
|
|
519
417
|
if (Array.isArray(date)) return parseArrayToDate.call(this, date);
|
|
520
|
-
if (typeof date === "string"
|
|
521
|
-
|
|
522
|
-
if (
|
|
523
|
-
const
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
418
|
+
if (typeof date === "string") {
|
|
419
|
+
let dateTrimmed = date.trimStart();
|
|
420
|
+
if (!/Z$/i.test(dateTrimmed)) {
|
|
421
|
+
const d = dateTrimmed.match(constants_default.REGEX_PARSE_DEFAULT);
|
|
422
|
+
if (d) {
|
|
423
|
+
const Y = _assertClassBrand(_EsDay_brand, this, _toNumber).call(this, d[1]);
|
|
424
|
+
const M = _assertClassBrand(_EsDay_brand, this, _toNumber).call(this, d[2]);
|
|
425
|
+
const D = _assertClassBrand(_EsDay_brand, this, _toNumber).call(this, d[3]);
|
|
426
|
+
const h = _assertClassBrand(_EsDay_brand, this, _toNumber).call(this, d[4]);
|
|
427
|
+
const m = _assertClassBrand(_EsDay_brand, this, _toNumber).call(this, d[5]);
|
|
428
|
+
const s = _assertClassBrand(_EsDay_brand, this, _toNumber).call(this, d[6]);
|
|
429
|
+
const ms = _assertClassBrand(_EsDay_brand, this, _toMsNumber).call(this, d[7]);
|
|
430
|
+
return this.dateFromDateComponents(Y, M, D, h, m, s, ms);
|
|
431
|
+
}
|
|
432
|
+
} else {
|
|
433
|
+
dateTrimmed = dateTrimmed.replace(/(\.\d{3})\d*(?=Z)/, "$1");
|
|
434
|
+
return new Date(dateTrimmed);
|
|
531
435
|
}
|
|
532
436
|
}
|
|
437
|
+
if (typeof date === "string") date = date.replace(/(\.\d{3})\d*(?=Z)/, "$1");
|
|
533
438
|
return new Date(date);
|
|
534
439
|
}
|
|
535
440
|
/**
|
|
@@ -558,7 +463,10 @@ const esday = (d, ...others) => {
|
|
|
558
463
|
else if (isObject(o)) Object.assign(conf, o);
|
|
559
464
|
else conf[`args_${i + 1}`] = o;
|
|
560
465
|
});
|
|
561
|
-
|
|
466
|
+
const result = new EsDay(d, conf);
|
|
467
|
+
const resultConf = result["$conf"];
|
|
468
|
+
for (const property in resultConf) if (property.startsWith("args_")) delete resultConf[property];
|
|
469
|
+
return result;
|
|
562
470
|
};
|
|
563
471
|
esday.addFormatTokenDefinitions = addFormatTokenDefinitions;
|
|
564
472
|
esday.extend = (plugin, option) => {
|
|
@@ -570,4 +478,4 @@ esday.extend = (plugin, option) => {
|
|
|
570
478
|
};
|
|
571
479
|
|
|
572
480
|
//#endregion
|
|
573
|
-
export { EsDay, esday };
|
|
481
|
+
export { _checkPrivateRedeclaration as i, EsDay as n, _assertClassBrand as r, esday as t };
|
|
@@ -48,9 +48,9 @@ function padZoneStr(utcOffset) {
|
|
|
48
48
|
const negMinutes = -utcOffset;
|
|
49
49
|
const minutes = Math.abs(negMinutes);
|
|
50
50
|
const hourOffset = Math.floor(minutes / 60);
|
|
51
|
-
const minuteOffset = minutes % 60;
|
|
51
|
+
const minuteOffset = Math.trunc(minutes % 60);
|
|
52
52
|
return `${negMinutes <= 0 ? "+" : "-"}${padStart(hourOffset, 2, "0")}:${padStart(minuteOffset, 2, "0")}`;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
//#endregion
|
|
56
|
-
export {
|
|
56
|
+
export { padStart as n, padZoneStr as r, padNumberWithLeadingZeros as t };
|
|
@@ -22,4 +22,4 @@ function isValidDate(value) {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
//#endregion
|
|
25
|
-
export {
|
|
25
|
+
export { isUndefined as a, isString as i, isEmptyObject as n, isValidDate as o, isObject as r, undefinedOr as s, isArray as t };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { t as isArray } from "./v_QBn7Xm.js";
|
|
2
|
+
import { n as normalizeUnitWithPlurals } from "./AyQQ6US-.js";
|
|
3
|
+
|
|
4
|
+
//#region src/common/date-fields.ts
|
|
5
|
+
/**
|
|
6
|
+
* Map units to fields of a javascript Date object.
|
|
7
|
+
*/
|
|
8
|
+
const UNIT_FIELD_MAP = {
|
|
9
|
+
year: "FullYear",
|
|
10
|
+
month: "Month",
|
|
11
|
+
date: "Date",
|
|
12
|
+
day: "Day",
|
|
13
|
+
hour: "Hours",
|
|
14
|
+
minute: "Minutes",
|
|
15
|
+
second: "Seconds",
|
|
16
|
+
millisecond: "Milliseconds"
|
|
17
|
+
};
|
|
18
|
+
const prettyUnitsDate = Object.keys(UNIT_FIELD_MAP);
|
|
19
|
+
function unitToField(unit) {
|
|
20
|
+
return UNIT_FIELD_MAP[normalizeUnitWithPlurals(unit)];
|
|
21
|
+
}
|
|
22
|
+
function getUnitInDate(date, unit) {
|
|
23
|
+
return date[`get${unitToField(unit)}`]();
|
|
24
|
+
}
|
|
25
|
+
function getUnitInDateUTC(date, unit) {
|
|
26
|
+
return date[`getUTC${unitToField(unit)}`]();
|
|
27
|
+
}
|
|
28
|
+
function setUnitInDate(date, unit, value) {
|
|
29
|
+
date[`set${unitToField(unit)}`](...isArray(value) ? value : [value]);
|
|
30
|
+
return date;
|
|
31
|
+
}
|
|
32
|
+
function setUnitInDateUTC(date, unit, value) {
|
|
33
|
+
date[`setUTC${unitToField(unit)}`](...isArray(value) ? value : [value]);
|
|
34
|
+
return date;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
38
|
+
export { setUnitInDateUTC as a, setUnitInDate as i, getUnitInDateUTC as n, prettyUnitsDate as r, getUnitInDate as t };
|
package/index.d.mts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { A as UnitQuarter, C as UnitDay, D as UnitMin, F as UnitTypeGetSet, L as UnitWeek, M as UnitType, N as UnitTypeAddSub, O as UnitMonth, P as UnitTypeCore, R as UnitYear, T as UnitIsoWeek, _ as PrettyUnitAsPlural, a as EsDayFactoryParserFn, b as ShortUnit, c as ParsingObject, d as ParsingObjectShort, f as UnitsObjectTypeAddSub, g as LongUnit, h as SimpleType, i as EsDayFactory, j as UnitSecond, k as UnitMs, l as ParsingObjectLong, m as SimpleObject, n as DateFromDateComponents, o as EsDayPlugin, p as UnitsObjectTypeSet, r as DateType, s as FormattingTokenDefinitions, t as EsDay, u as ParsingObjectPlurals, v as PrettyUnitAsSingular, w as UnitHour, x as UnitDate, y as PrettyUnitFromPlurals } from "./chunks/CODi8AFH.js";
|
|
2
|
+
import { t as esday } from "./chunks/C5qDMHT5.js";
|
|
3
|
+
export { DateFromDateComponents, DateType, EsDay, EsDayFactory, EsDayFactoryParserFn, EsDayPlugin, FormattingTokenDefinitions, LongUnit, ParsingObject, ParsingObjectLong, ParsingObjectPlurals, ParsingObjectShort, PrettyUnitAsPlural, PrettyUnitAsSingular, PrettyUnitFromPlurals, ShortUnit, SimpleObject, SimpleType, UnitDate, UnitDay, UnitHour, UnitIsoWeek, UnitMin, UnitMonth, UnitMs, UnitQuarter, UnitSecond, UnitType, UnitTypeAddSub, UnitTypeCore, UnitTypeGetSet, UnitWeek, UnitYear, UnitsObjectTypeAddSub, UnitsObjectTypeSet, esday };
|
package/index.mjs
ADDED
package/locales/af.d.mts
ADDED
package/locales/{af.js → af.mjs}
RENAMED
|
@@ -56,6 +56,7 @@ const localeAf = {
|
|
|
56
56
|
"Nov",
|
|
57
57
|
"Des"
|
|
58
58
|
],
|
|
59
|
+
dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
|
|
59
60
|
ordinal: (n) => `${n}`,
|
|
60
61
|
weekStart: 1,
|
|
61
62
|
yearStart: 4,
|
|
@@ -90,6 +91,8 @@ const localeAf = {
|
|
|
90
91
|
hh: "%d ure",
|
|
91
92
|
d: "n dag",
|
|
92
93
|
dd: "%d dae",
|
|
94
|
+
w: "n week",
|
|
95
|
+
ww: "%d weke",
|
|
93
96
|
M: "n maand",
|
|
94
97
|
MM: "%d maande",
|
|
95
98
|
y: "n jaar",
|
|
@@ -100,7 +103,6 @@ const localeAf = {
|
|
|
100
103
|
return isLowercase ? m.toLowerCase() : m;
|
|
101
104
|
}
|
|
102
105
|
};
|
|
103
|
-
var af_default = localeAf;
|
|
104
106
|
|
|
105
107
|
//#endregion
|
|
106
|
-
export {
|
|
108
|
+
export { localeAf as default };
|
package/locales/am.d.mts
ADDED
package/locales/{am.js → am.mjs}
RENAMED
|
@@ -56,6 +56,7 @@ const localeAm = {
|
|
|
56
56
|
"ኖቬም",
|
|
57
57
|
"ዲሴም"
|
|
58
58
|
],
|
|
59
|
+
dayOfMonthOrdinalParse: /\d{1,2}/,
|
|
59
60
|
ordinal: (n) => `${n}ኛ`,
|
|
60
61
|
weekStart: 1,
|
|
61
62
|
yearStart: 4,
|
|
@@ -90,6 +91,8 @@ const localeAm = {
|
|
|
90
91
|
hh: "%d ሰዓታት",
|
|
91
92
|
d: "አንድ ቀን",
|
|
92
93
|
dd: "%d ቀናት",
|
|
94
|
+
w: "አንድ ሳምንት",
|
|
95
|
+
ww: "%d ሳምንታት",
|
|
93
96
|
M: "አንድ ወር",
|
|
94
97
|
MM: "%d ወራት",
|
|
95
98
|
y: "አንድ ዓመት",
|
|
@@ -100,7 +103,6 @@ const localeAm = {
|
|
|
100
103
|
return isLowercase ? m.toLowerCase() : m;
|
|
101
104
|
}
|
|
102
105
|
};
|
|
103
|
-
var am_default = localeAm;
|
|
104
106
|
|
|
105
107
|
//#endregion
|
|
106
|
-
export {
|
|
108
|
+
export { localeAm as default };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "../
|
|
3
|
-
import "../chunks/DjY7KvwG.js";
|
|
4
|
-
import { ar_default } from "../chunks/BeVgU2nj.js";
|
|
5
|
-
import "../chunks/tfkJ5D3p.js";
|
|
6
|
-
import { cloneLocale, setLocaleProperty } from "../chunks/CoBtJ4c1.js";
|
|
1
|
+
import locale from "./ar.mjs";
|
|
2
|
+
import { cloneLocale, setLocaleProperty } from "../plugins/locale/index.mjs";
|
|
7
3
|
|
|
8
4
|
//#region src/locales/ar-dz.ts
|
|
9
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Arabic (Algeria) [ar-DZ]
|
|
7
|
+
*/
|
|
8
|
+
const localeArDz = cloneLocale(locale);
|
|
10
9
|
const months = [
|
|
11
10
|
"جانفي",
|
|
12
11
|
"فيفري",
|
|
@@ -26,7 +25,6 @@ setLocaleProperty(localeArDz, "months", months);
|
|
|
26
25
|
setLocaleProperty(localeArDz, "monthsShort", months);
|
|
27
26
|
setLocaleProperty(localeArDz, "weekStart", 0);
|
|
28
27
|
setLocaleProperty(localeArDz, "yearStart", 4);
|
|
29
|
-
var ar_dz_default = localeArDz;
|
|
30
28
|
|
|
31
29
|
//#endregion
|
|
32
|
-
export {
|
|
30
|
+
export { localeArDz as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import locale from "./ar.mjs";
|
|
2
|
+
import { cloneLocale, setLocaleProperty } from "../plugins/locale/index.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/locales/ar-iq.ts
|
|
5
|
+
/**
|
|
6
|
+
* Arabic (Iraq) [ar-IQ]
|
|
7
|
+
*/
|
|
8
|
+
const localeArIq = cloneLocale(locale);
|
|
9
|
+
setLocaleProperty(localeArIq, "name", "ar-IQ");
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
export { localeArIq as default };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "../
|
|
3
|
-
import "../chunks/DjY7KvwG.js";
|
|
4
|
-
import { ar_default } from "../chunks/BeVgU2nj.js";
|
|
5
|
-
import "../chunks/tfkJ5D3p.js";
|
|
6
|
-
import { cloneLocale, setLocaleProperty } from "../chunks/CoBtJ4c1.js";
|
|
1
|
+
import locale from "./ar.mjs";
|
|
2
|
+
import { cloneLocale, setLocaleProperty } from "../plugins/locale/index.mjs";
|
|
7
3
|
|
|
8
4
|
//#region src/locales/ar-kw.ts
|
|
9
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Arabic (Kuwait) [ar-KW]
|
|
7
|
+
*/
|
|
8
|
+
const localeArKw = cloneLocale(locale);
|
|
10
9
|
const formats = structuredClone(localeArKw.formats);
|
|
11
10
|
formats.L = "DD/MM/YYYY";
|
|
12
11
|
formats.l = "DD/MM/YYYY";
|
|
@@ -22,7 +21,6 @@ setLocaleProperty(localeArKw, "name", "ar-KW");
|
|
|
22
21
|
setLocaleProperty(localeArKw, "weekStart", 0);
|
|
23
22
|
setLocaleProperty(localeArKw, "formats", formats);
|
|
24
23
|
setLocaleProperty(localeArKw, "calendar", calendar);
|
|
25
|
-
var ar_kw_default = localeArKw;
|
|
26
24
|
|
|
27
25
|
//#endregion
|
|
28
|
-
export {
|
|
26
|
+
export { localeArKw as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import locale from "./ar.mjs";
|
|
2
|
+
import { cloneLocale, setLocaleProperty } from "../plugins/locale/index.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/locales/ar-ly.ts
|
|
5
|
+
/**
|
|
6
|
+
* Arabic (Lybia) [ar-LY]
|
|
7
|
+
*/
|
|
8
|
+
const localeArLy = cloneLocale(locale);
|
|
9
|
+
setLocaleProperty(localeArLy, "name", "ar-LY");
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
export { localeArLy as default };
|