esday 0.6.3 → 1.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/CHANGELOG.md +7 -0
- package/README.md +16 -8
- package/chunks/{CODi8AFH.d.ts → BB5OVV-y.d.ts} +7 -2
- package/chunks/{C5qDMHT5.d.ts → CBlQG2yl.d.ts} +1 -2
- package/chunks/{BkjWOpMU.js → CeKusvtV.js} +10 -19
- package/chunks/{xt8C2lbv.js → DIG_UBsE.js} +5 -6
- package/chunks/{AyQQ6US-.js → DMdr1ZL1.js} +3 -5
- package/chunks/{CdvTtmWL.js → DXFoLbHM.js} +1 -2
- package/chunks/{Shk32pTP.js → i3oEJgL3.js} +1 -2
- package/chunks/{CXWzCl3n.js → oiGWnahC.js} +12 -22
- package/index.d.ts +3 -3
- package/index.js +2 -3
- package/locales/af.d.ts +0 -1
- package/locales/af.js +1 -2
- package/locales/am.d.ts +0 -1
- package/locales/am.js +1 -2
- package/locales/ar-dz.d.ts +0 -1
- package/locales/ar-dz.js +1 -3
- package/locales/ar-iq.d.ts +0 -1
- package/locales/ar-iq.js +1 -3
- package/locales/ar-kw.d.ts +0 -1
- package/locales/ar-kw.js +1 -3
- package/locales/ar-ly.d.ts +0 -1
- package/locales/ar-ly.js +1 -3
- package/locales/ar-ma.d.ts +0 -1
- package/locales/ar-ma.js +1 -3
- package/locales/ar-sa.d.ts +0 -1
- package/locales/ar-sa.js +1 -3
- package/locales/ar-tn.d.ts +0 -1
- package/locales/ar-tn.js +1 -3
- package/locales/ar.d.ts +0 -1
- package/locales/ar.js +1 -2
- package/locales/az.d.ts +0 -1
- package/locales/az.js +1 -2
- package/locales/be.d.ts +0 -1
- package/locales/be.js +1 -2
- package/locales/bg.d.ts +0 -1
- package/locales/bg.js +1 -2
- package/locales/bi.d.ts +0 -1
- package/locales/bi.js +1 -2
- package/locales/bm.d.ts +0 -1
- package/locales/bm.js +1 -2
- package/locales/bn-bd.d.ts +0 -1
- package/locales/bn-bd.js +1 -3
- package/locales/bn.d.ts +0 -1
- package/locales/bn.js +1 -2
- package/locales/bo.d.ts +0 -1
- package/locales/bo.js +1 -2
- package/locales/br.d.ts +0 -1
- package/locales/br.js +1 -2
- package/locales/bs.d.ts +0 -1
- package/locales/bs.js +1 -2
- package/locales/ca.d.ts +0 -1
- package/locales/ca.js +1 -2
- package/locales/cs.d.ts +0 -1
- package/locales/cs.js +1 -2
- package/locales/cv.d.ts +0 -1
- package/locales/cv.js +1 -2
- package/locales/cy.d.ts +0 -1
- package/locales/cy.js +1 -2
- package/locales/da.d.ts +0 -1
- package/locales/da.js +1 -2
- package/locales/de-at.d.ts +0 -1
- package/locales/de-at.js +1 -3
- package/locales/de-ch.d.ts +0 -1
- package/locales/de-ch.js +1 -3
- package/locales/de.d.ts +0 -1
- package/locales/de.js +1 -2
- package/locales/dv.d.ts +0 -1
- package/locales/dv.js +1 -2
- package/locales/el.d.ts +0 -1
- package/locales/el.js +1 -2
- package/locales/en-au.d.ts +0 -1
- package/locales/en-au.js +1 -3
- package/locales/en-ca.d.ts +0 -1
- package/locales/en-ca.js +1 -3
- package/locales/en-gb.d.ts +0 -1
- package/locales/en-gb.js +1 -3
- package/locales/en-ie.d.ts +0 -1
- package/locales/en-ie.js +1 -3
- package/locales/en-il.d.ts +0 -1
- package/locales/en-il.js +1 -3
- package/locales/en-in.d.ts +0 -1
- package/locales/en-in.js +1 -3
- package/locales/en-nz.d.ts +0 -1
- package/locales/en-nz.js +1 -3
- package/locales/en-sg.d.ts +0 -1
- package/locales/en-sg.js +1 -3
- package/locales/en-tt.d.ts +0 -1
- package/locales/en-tt.js +1 -3
- package/locales/en-us.d.ts +0 -1
- package/locales/en-us.js +1 -3
- package/locales/en.d.ts +0 -1
- package/locales/en.js +1 -2
- package/locales/eo.d.ts +0 -1
- package/locales/eo.js +1 -2
- package/locales/es-do.d.ts +0 -1
- package/locales/es-do.js +1 -3
- package/locales/es-mx.d.ts +0 -1
- package/locales/es-mx.js +1 -3
- package/locales/es-pr.d.ts +0 -1
- package/locales/es-pr.js +1 -3
- package/locales/es-us.d.ts +0 -1
- package/locales/es-us.js +1 -3
- package/locales/es.d.ts +0 -1
- package/locales/es.js +1 -2
- package/locales/et.d.ts +0 -1
- package/locales/et.js +1 -2
- package/locales/eu.d.ts +0 -1
- package/locales/eu.js +1 -2
- package/locales/fa.d.ts +0 -1
- package/locales/fa.js +1 -2
- package/locales/fi.d.ts +0 -1
- package/locales/fi.js +1 -2
- package/locales/fil.d.ts +0 -1
- package/locales/fil.js +1 -2
- package/locales/fo.d.ts +0 -1
- package/locales/fo.js +1 -2
- package/locales/fr-ca.d.ts +0 -1
- package/locales/fr-ca.js +1 -3
- package/locales/fr-ch.d.ts +0 -1
- package/locales/fr-ch.js +1 -3
- package/locales/fr.d.ts +0 -1
- package/locales/fr.js +1 -2
- package/locales/fy.d.ts +0 -1
- package/locales/fy.js +1 -2
- package/locales/ga.d.ts +0 -1
- package/locales/ga.js +1 -2
- package/locales/gd.d.ts +0 -1
- package/locales/gd.js +1 -2
- package/locales/gl.d.ts +0 -1
- package/locales/gl.js +1 -2
- package/locales/gom-deva.d.ts +0 -1
- package/locales/gom-deva.js +1 -2
- package/locales/gom-latn.d.ts +0 -1
- package/locales/gom-latn.js +1 -2
- package/locales/gu.d.ts +0 -1
- package/locales/gu.js +1 -2
- package/locales/he.d.ts +0 -1
- package/locales/he.js +3 -3
- package/locales/hi.d.ts +0 -1
- package/locales/hi.js +1 -2
- package/locales/hr.d.ts +0 -1
- package/locales/hr.js +1 -2
- package/locales/ht.d.ts +0 -1
- package/locales/ht.js +1 -2
- package/locales/hu.d.ts +0 -1
- package/locales/hu.js +1 -2
- package/locales/hy-am.d.ts +0 -1
- package/locales/hy-am.js +1 -2
- package/locales/id.d.ts +0 -1
- package/locales/id.js +1 -2
- package/locales/is.d.ts +0 -1
- package/locales/is.js +1 -2
- package/locales/it-ch.d.ts +0 -1
- package/locales/it-ch.js +1 -3
- package/locales/it.d.ts +0 -1
- package/locales/it.js +1 -2
- package/locales/ja.d.ts +0 -1
- package/locales/ja.js +1 -2
- package/locales/jv.d.ts +0 -1
- package/locales/jv.js +1 -2
- package/locales/ka.d.ts +0 -1
- package/locales/ka.js +1 -2
- package/locales/kk.d.ts +0 -1
- package/locales/kk.js +1 -2
- package/locales/km.d.ts +0 -1
- package/locales/km.js +1 -2
- package/locales/kn.d.ts +0 -1
- package/locales/kn.js +1 -2
- package/locales/ko.d.ts +0 -1
- package/locales/ko.js +1 -2
- package/locales/ku.d.ts +0 -1
- package/locales/ku.js +1 -2
- package/locales/ky.d.ts +0 -1
- package/locales/ky.js +1 -2
- package/locales/lb.d.ts +0 -1
- package/locales/lb.js +1 -2
- package/locales/lo.d.ts +0 -1
- package/locales/lo.js +1 -2
- package/locales/lt.d.ts +0 -1
- package/locales/lt.js +1 -2
- package/locales/lv.d.ts +0 -1
- package/locales/lv.js +1 -2
- package/locales/me.d.ts +0 -1
- package/locales/me.js +1 -2
- package/locales/mi.d.ts +0 -1
- package/locales/mi.js +1 -2
- package/locales/mk.d.ts +0 -1
- package/locales/mk.js +1 -2
- package/locales/ml.d.ts +0 -1
- package/locales/ml.js +1 -2
- package/locales/mn.d.ts +0 -1
- package/locales/mn.js +1 -2
- package/locales/mr.d.ts +0 -1
- package/locales/mr.js +1 -2
- package/locales/ms-my.d.ts +0 -1
- package/locales/ms-my.js +1 -3
- package/locales/ms.d.ts +0 -1
- package/locales/ms.js +1 -2
- package/locales/mt.d.ts +0 -1
- package/locales/mt.js +1 -2
- package/locales/my.d.ts +0 -1
- package/locales/my.js +1 -2
- package/locales/nb.d.ts +0 -1
- package/locales/nb.js +1 -2
- package/locales/ne.d.ts +0 -1
- package/locales/ne.js +1 -2
- package/locales/nl-be.d.ts +0 -1
- package/locales/nl-be.js +1 -3
- package/locales/nl.d.ts +0 -1
- package/locales/nl.js +1 -2
- package/locales/nn.d.ts +0 -1
- package/locales/nn.js +1 -2
- package/locales/oc-lnc.d.ts +0 -1
- package/locales/oc-lnc.js +1 -2
- package/locales/pa-in.d.ts +0 -1
- package/locales/pa-in.js +1 -2
- package/locales/pl.d.ts +0 -1
- package/locales/pl.js +1 -2
- package/locales/pt-br.d.ts +0 -1
- package/locales/pt-br.js +1 -3
- package/locales/pt.d.ts +0 -1
- package/locales/pt.js +1 -2
- package/locales/rn.d.ts +0 -1
- package/locales/rn.js +1 -2
- package/locales/ro.d.ts +0 -1
- package/locales/ro.js +1 -2
- package/locales/ru.d.ts +0 -1
- package/locales/ru.js +1 -2
- package/locales/rw.d.ts +0 -1
- package/locales/rw.js +1 -2
- package/locales/sd.d.ts +0 -1
- package/locales/sd.js +1 -2
- package/locales/se.d.ts +0 -1
- package/locales/se.js +1 -2
- package/locales/si.d.ts +0 -1
- package/locales/si.js +1 -2
- package/locales/sk.d.ts +0 -1
- package/locales/sk.js +1 -2
- package/locales/sl.d.ts +0 -1
- package/locales/sl.js +1 -2
- package/locales/sq.d.ts +0 -1
- package/locales/sq.js +1 -2
- package/locales/sr-cyrl.d.ts +0 -1
- package/locales/sr-cyrl.js +1 -3
- package/locales/sr.d.ts +0 -1
- package/locales/sr.js +1 -2
- package/locales/ss.d.ts +0 -1
- package/locales/ss.js +1 -2
- package/locales/sv-fi.d.ts +0 -1
- package/locales/sv-fi.js +1 -3
- package/locales/sv.d.ts +0 -1
- package/locales/sv.js +1 -2
- package/locales/sw.d.ts +0 -1
- package/locales/sw.js +1 -2
- package/locales/ta.d.ts +0 -1
- package/locales/ta.js +1 -2
- package/locales/te.d.ts +0 -1
- package/locales/te.js +1 -2
- package/locales/tet.d.ts +0 -1
- package/locales/tet.js +1 -2
- package/locales/tg.d.ts +0 -1
- package/locales/tg.js +1 -2
- package/locales/th.d.ts +0 -1
- package/locales/th.js +1 -2
- package/locales/tk.d.ts +0 -1
- package/locales/tk.js +1 -2
- package/locales/tl-ph.d.ts +0 -1
- package/locales/tl-ph.js +1 -2
- package/locales/tlh.d.ts +0 -1
- package/locales/tlh.js +1 -2
- package/locales/tr.d.ts +0 -1
- package/locales/tr.js +1 -2
- package/locales/tzl.d.ts +0 -1
- package/locales/tzl.js +1 -2
- package/locales/tzm-latn.d.ts +0 -1
- package/locales/tzm-latn.js +1 -3
- package/locales/tzm.d.ts +0 -1
- package/locales/tzm.js +1 -2
- package/locales/ug-cn.d.ts +0 -1
- package/locales/ug-cn.js +1 -2
- package/locales/uk.d.ts +0 -1
- package/locales/uk.js +1 -2
- package/locales/ur.d.ts +0 -1
- package/locales/ur.js +1 -2
- package/locales/uz-latn.d.ts +0 -1
- package/locales/uz-latn.js +1 -3
- package/locales/uz.d.ts +0 -1
- package/locales/uz.js +1 -2
- package/locales/vi.d.ts +0 -1
- package/locales/vi.js +1 -2
- package/locales/x-pseudo.d.ts +0 -1
- package/locales/x-pseudo.js +1 -2
- package/locales/yo.d.ts +0 -1
- package/locales/yo.js +1 -2
- package/locales/zh-cn.d.ts +0 -1
- package/locales/zh-cn.js +1 -3
- package/locales/zh-hk.d.ts +0 -1
- package/locales/zh-hk.js +1 -3
- package/locales/zh-mo.d.ts +0 -1
- package/locales/zh-mo.js +1 -3
- package/locales/zh-tw.d.ts +0 -1
- package/locales/zh-tw.js +1 -3
- package/locales/zh.d.ts +0 -1
- package/locales/zh.js +1 -2
- package/package.json +20 -20
- package/plugins/advancedFormat/index.d.ts +1 -2
- package/plugins/advancedFormat/index.js +2 -4
- package/plugins/advancedParse/index.d.ts +1 -2
- package/plugins/advancedParse/index.js +3 -5
- package/plugins/calendar/index.d.ts +1 -2
- package/plugins/calendar/index.js +1 -2
- package/plugins/dayOfYear/index.d.ts +1 -2
- package/plugins/dayOfYear/index.js +1 -2
- package/plugins/duration/index.d.ts +1 -2
- package/plugins/duration/index.js +12 -16
- package/plugins/isBetween/index.d.ts +1 -2
- package/plugins/isBetween/index.js +2 -4
- package/plugins/isLeapYear/index.d.ts +1 -2
- package/plugins/isLeapYear/index.js +1 -2
- package/plugins/isSameOrAfter/index.d.ts +1 -2
- package/plugins/isSameOrAfter/index.js +1 -2
- package/plugins/isSameOrBefore/index.d.ts +1 -2
- package/plugins/isSameOrBefore/index.js +1 -2
- package/plugins/isToday/index.d.ts +1 -2
- package/plugins/isToday/index.js +2 -4
- package/plugins/isTomorrow/index.d.ts +1 -2
- package/plugins/isTomorrow/index.js +2 -4
- package/plugins/isYesterday/index.d.ts +1 -2
- package/plugins/isYesterday/index.js +2 -4
- package/plugins/isoWeek/index.d.ts +1 -2
- package/plugins/isoWeek/index.js +5 -7
- package/plugins/locale/index.d.ts +4 -2
- package/plugins/locale/index.js +10 -10
- package/plugins/localeData/index.d.ts +1 -2
- package/plugins/localeData/index.js +6 -6
- package/plugins/localizedFormat/index.d.ts +1 -2
- package/plugins/localizedFormat/index.js +3 -5
- package/plugins/localizedParse/index.d.ts +1 -2
- package/plugins/localizedParse/index.js +4 -5
- package/plugins/minMax/index.d.ts +1 -2
- package/plugins/minMax/index.js +2 -4
- package/plugins/objectSupport/index.d.ts +1 -2
- package/plugins/objectSupport/index.js +5 -7
- package/plugins/pluralGetSet/index.d.ts +1 -2
- package/plugins/pluralGetSet/index.js +1 -2
- package/plugins/quarterOfYear/index.d.ts +1 -2
- package/plugins/quarterOfYear/index.js +4 -6
- package/plugins/relativeTime/index.d.ts +1 -2
- package/plugins/relativeTime/index.js +3 -5
- package/plugins/timezone/index.d.ts +1 -2
- package/plugins/timezone/index.js +13 -15
- package/plugins/toArray/index.d.ts +1 -2
- package/plugins/toArray/index.js +1 -2
- package/plugins/toObject/index.d.ts +1 -2
- package/plugins/toObject/index.js +1 -2
- package/plugins/utc/index.d.ts +6 -2
- package/plugins/utc/index.js +10 -12
- package/plugins/week/index.d.ts +1 -2
- package/plugins/week/index.js +6 -8
- package/chunks/{v_QBn7Xm.js → DuRKUq5K.js} +1 -2
|
@@ -1,26 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as isUndefined, r as isObject } from "../../chunks/
|
|
3
|
-
import { n as normalizeUnitWithPlurals, r as normalizeUnitWithPluralsToPlural } from "../../chunks/
|
|
4
|
-
import { n as padStart } from "../../chunks/
|
|
5
|
-
import { i as _checkPrivateRedeclaration, r as _assertClassBrand, t as esday } from "../../chunks/
|
|
6
|
-
|
|
7
|
-
//#region \0@oxc-project+runtime@0.112.0/helpers/classPrivateFieldInitSpec.js
|
|
1
|
+
import { r as INVALID_DATE_STRING } from "../../chunks/CeKusvtV.js";
|
|
2
|
+
import { a as isUndefined, r as isObject } from "../../chunks/DuRKUq5K.js";
|
|
3
|
+
import { n as normalizeUnitWithPlurals, r as normalizeUnitWithPluralsToPlural } from "../../chunks/DMdr1ZL1.js";
|
|
4
|
+
import { n as padStart } from "../../chunks/DXFoLbHM.js";
|
|
5
|
+
import { i as _checkPrivateRedeclaration, r as _assertClassBrand, t as esday } from "../../chunks/oiGWnahC.js";
|
|
6
|
+
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/classPrivateFieldInitSpec.js
|
|
8
7
|
function _classPrivateFieldInitSpec(e, t, a) {
|
|
9
8
|
_checkPrivateRedeclaration(e, t), t.set(e, a);
|
|
10
9
|
}
|
|
11
|
-
|
|
12
10
|
//#endregion
|
|
13
|
-
//#region \0@oxc-project+runtime@0.
|
|
11
|
+
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/classPrivateFieldSet2.js
|
|
14
12
|
function _classPrivateFieldSet2(s, a, r) {
|
|
15
13
|
return s.set(_assertClassBrand(s, a), r), r;
|
|
16
14
|
}
|
|
17
|
-
|
|
18
15
|
//#endregion
|
|
19
|
-
//#region \0@oxc-project+runtime@0.
|
|
16
|
+
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/classPrivateFieldGet2.js
|
|
20
17
|
function _classPrivateFieldGet2(s, a) {
|
|
21
18
|
return s.get(_assertClassBrand(s, a));
|
|
22
19
|
}
|
|
23
|
-
|
|
24
20
|
//#endregion
|
|
25
21
|
//#region src/plugins/duration/index.ts
|
|
26
22
|
/** = 0:
|
|
@@ -456,11 +452,12 @@ var DurationImpl = class DurationImpl {
|
|
|
456
452
|
else if (value instanceof DurationImpl) durationToAdd = value;
|
|
457
453
|
else durationToAdd = new DurationImpl(value, void 0, this.locale());
|
|
458
454
|
const valuesToAdd = durationToAdd.durationBase();
|
|
459
|
-
|
|
455
|
+
const newDurationBase = {
|
|
460
456
|
milliseconds: _classPrivateFieldGet2(_timeAsMs, this) + direction * valuesToAdd.milliseconds,
|
|
461
457
|
days: _classPrivateFieldGet2(_days, this) + direction * valuesToAdd.days,
|
|
462
458
|
months: _classPrivateFieldGet2(_months, this) + direction * valuesToAdd.months
|
|
463
|
-
}
|
|
459
|
+
};
|
|
460
|
+
return new DurationImpl(newDurationBase, void 0, this.locale());
|
|
464
461
|
}
|
|
465
462
|
};
|
|
466
463
|
const durationPlugin = (_, _dayClass, dayFactory) => {
|
|
@@ -472,6 +469,5 @@ const durationPlugin = (_, _dayClass, dayFactory) => {
|
|
|
472
469
|
return d instanceof DurationImpl;
|
|
473
470
|
};
|
|
474
471
|
};
|
|
475
|
-
|
|
476
472
|
//#endregion
|
|
477
|
-
export { durationPlugin as default };
|
|
473
|
+
export { durationPlugin as default };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { N as UnitType, i as DateType, s as EsDayPlugin } from "../../chunks/BB5OVV-y.js";
|
|
3
2
|
//#region src/plugins/isBetween/index.d.ts
|
|
4
3
|
declare module 'esday' {
|
|
5
4
|
interface EsDay {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { f as constants_default } from "../../chunks/CeKusvtV.js";
|
|
3
2
|
//#region src/plugins/isBetween/index.ts
|
|
4
3
|
const isBetweenPlugin = (_, dayClass) => {
|
|
5
4
|
dayClass.prototype.isBetween = function(from, to, unit = constants_default.MS, inclusivity = "()") {
|
|
@@ -10,6 +9,5 @@ const isBetweenPlugin = (_, dayClass) => {
|
|
|
10
9
|
return isAfterFrom && isBeforeTo;
|
|
11
10
|
};
|
|
12
11
|
};
|
|
13
|
-
|
|
14
12
|
//#endregion
|
|
15
|
-
export { isBetweenPlugin as default };
|
|
13
|
+
export { isBetweenPlugin as default };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { N as UnitType, i as DateType, s as EsDayPlugin } from "../../chunks/BB5OVV-y.js";
|
|
3
2
|
//#region src/plugins/isSameOrAfter/index.d.ts
|
|
4
3
|
declare module 'esday' {
|
|
5
4
|
interface EsDay {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { N as UnitType, i as DateType, s as EsDayPlugin } from "../../chunks/BB5OVV-y.js";
|
|
3
2
|
//#region src/plugins/isSameOrBefore/index.d.ts
|
|
4
3
|
declare module 'esday' {
|
|
5
4
|
interface EsDay {
|
package/plugins/isToday/index.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { f as constants_default } from "../../chunks/CeKusvtV.js";
|
|
3
2
|
//#region src/plugins/isToday/index.ts
|
|
4
3
|
const isTodayPlugin = (_, dayClass) => {
|
|
5
4
|
dayClass.prototype.isToday = function() {
|
|
6
5
|
return this.isSame(/* @__PURE__ */ new Date(), constants_default.DAY);
|
|
7
6
|
};
|
|
8
7
|
};
|
|
9
|
-
|
|
10
8
|
//#endregion
|
|
11
|
-
export { isTodayPlugin as default };
|
|
9
|
+
export { isTodayPlugin as default };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { f as constants_default } from "../../chunks/CeKusvtV.js";
|
|
3
2
|
//#region src/plugins/isTomorrow/index.ts
|
|
4
3
|
const isTomorrowPlugin = (_, dayClass, d) => {
|
|
5
4
|
dayClass.prototype.isTomorrow = function() {
|
|
@@ -8,6 +7,5 @@ const isTomorrowPlugin = (_, dayClass, d) => {
|
|
|
8
7
|
return this.format(comparisonTemplate) === tomorrow.format(comparisonTemplate);
|
|
9
8
|
};
|
|
10
9
|
};
|
|
11
|
-
|
|
12
10
|
//#endregion
|
|
13
|
-
export { isTomorrowPlugin as default };
|
|
11
|
+
export { isTomorrowPlugin as default };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { f as constants_default } from "../../chunks/CeKusvtV.js";
|
|
3
2
|
//#region src/plugins/isYesterday/index.ts
|
|
4
3
|
const isYesterdayPlugin = (_, dayClass, d) => {
|
|
5
4
|
dayClass.prototype.isYesterday = function() {
|
|
@@ -8,6 +7,5 @@ const isYesterdayPlugin = (_, dayClass, d) => {
|
|
|
8
7
|
return this.format(comparisonTemplate) === yesterday.format(comparisonTemplate);
|
|
9
8
|
};
|
|
10
9
|
};
|
|
11
|
-
|
|
12
10
|
//#endregion
|
|
13
|
-
export { isYesterdayPlugin as default };
|
|
11
|
+
export { isYesterdayPlugin as default };
|
package/plugins/isoWeek/index.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as isUndefined } from "../../chunks/
|
|
3
|
-
import { t as createInstanceFromExist } from "../../chunks/
|
|
4
|
-
import { n as padStart } from "../../chunks/
|
|
5
|
-
|
|
1
|
+
import { f as constants_default } from "../../chunks/CeKusvtV.js";
|
|
2
|
+
import { a as isUndefined } from "../../chunks/DuRKUq5K.js";
|
|
3
|
+
import { t as createInstanceFromExist } from "../../chunks/i3oEJgL3.js";
|
|
4
|
+
import { n as padStart } from "../../chunks/DXFoLbHM.js";
|
|
6
5
|
//#region src/plugins/isoWeek/index.ts
|
|
7
6
|
const weekStart = constants_default.INDEX_MONDAY;
|
|
8
7
|
const yearStart = 4;
|
|
@@ -223,6 +222,5 @@ const isoWeekPlugin = (_, dayClass, dayFactory) => {
|
|
|
223
222
|
};
|
|
224
223
|
dayFactory.addParseTokenDefinitions?.(parseTokensDefinitions);
|
|
225
224
|
};
|
|
226
|
-
|
|
227
225
|
//#endregion
|
|
228
|
-
export { isoWeekPlugin as default };
|
|
226
|
+
export { isoWeekPlugin as default };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { s as EsDayPlugin, t as EsDay } from "../../chunks/BB5OVV-y.js";
|
|
3
2
|
//#region src/plugins/locale/types.d.ts
|
|
4
3
|
type ReadonlyTuple<T, N extends number, R extends readonly T[] = []> = R['length'] extends N ? R : ReadonlyTuple<T, N, readonly [T, ...R]>;
|
|
5
4
|
declare module 'esday' {
|
|
@@ -16,6 +15,9 @@ declare module 'esday' {
|
|
|
16
15
|
getLocale: (localeName: string) => Locale;
|
|
17
16
|
updateLocale: (localeName: string, newLocale: Partial<Locale>) => EsDayFactory;
|
|
18
17
|
}
|
|
18
|
+
interface ConfigurationObject {
|
|
19
|
+
localeName?: string;
|
|
20
|
+
}
|
|
19
21
|
}
|
|
20
22
|
type DayNames<T = string> = ReadonlyTuple<T, 7>;
|
|
21
23
|
interface DayNamesStandaloneFormat<T = DayNames<string>> {
|
package/plugins/locale/index.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { s as undefinedOr } from "../../chunks/
|
|
3
|
-
import { t as normalizeUnit } from "../../chunks/
|
|
1
|
+
import { f as constants_default } from "../../chunks/CeKusvtV.js";
|
|
2
|
+
import { s as undefinedOr } from "../../chunks/DuRKUq5K.js";
|
|
3
|
+
import { t as normalizeUnit } from "../../chunks/DMdr1ZL1.js";
|
|
4
4
|
import localeEn from "../../locales/en.js";
|
|
5
|
-
|
|
6
5
|
//#region src/plugins/locale/index.ts
|
|
7
6
|
const LocaleStore = /* @__PURE__ */ new Map();
|
|
8
7
|
let $localeGlobal = "en";
|
|
@@ -72,8 +71,8 @@ function cloneLocale(source) {
|
|
|
72
71
|
return cloneObject(source);
|
|
73
72
|
}
|
|
74
73
|
function getSetPrivateLocaleName(inst, newLocaleName) {
|
|
75
|
-
if (newLocaleName) inst["$conf"]
|
|
76
|
-
return inst["$conf"]
|
|
74
|
+
if (newLocaleName) inst["$conf"].localeName = newLocaleName;
|
|
75
|
+
return inst["$conf"].localeName || "";
|
|
77
76
|
}
|
|
78
77
|
const localePlugin = (_, dayClass, dayFactory) => {
|
|
79
78
|
dayClass.prototype.localeObject = function() {
|
|
@@ -110,10 +109,12 @@ const localePlugin = (_, dayClass, dayFactory) => {
|
|
|
110
109
|
return inst;
|
|
111
110
|
};
|
|
112
111
|
dayClass.prototype["startOf"] = function(unit) {
|
|
113
|
-
|
|
112
|
+
const inst = oldStartOf.call(this, unit);
|
|
113
|
+
return fixDiff(inst, this, unit);
|
|
114
114
|
};
|
|
115
115
|
dayClass.prototype["endOf"] = function(unit) {
|
|
116
|
-
|
|
116
|
+
const inst = oldEndOf.call(this, unit);
|
|
117
|
+
return fixDiff(inst, this, unit, true);
|
|
117
118
|
};
|
|
118
119
|
dayFactory.locale = (localeName) => {
|
|
119
120
|
if (localeName === void 0) return $localeGlobal;
|
|
@@ -136,6 +137,5 @@ const localePlugin = (_, dayClass, dayFactory) => {
|
|
|
136
137
|
return dayFactory;
|
|
137
138
|
};
|
|
138
139
|
};
|
|
139
|
-
|
|
140
140
|
//#endregion
|
|
141
|
-
export { cloneLocale, localePlugin as default, setLocaleProperty };
|
|
141
|
+
export { cloneLocale, localePlugin as default, setLocaleProperty };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { t as esday } from "../../chunks/
|
|
2
|
-
|
|
1
|
+
import { t as esday } from "../../chunks/oiGWnahC.js";
|
|
3
2
|
//#region src/plugins/localeData/index.ts
|
|
4
3
|
/**
|
|
5
4
|
* LocaleData plugin
|
|
@@ -139,10 +138,12 @@ const createLocaleDataObject = (locale) => {
|
|
|
139
138
|
const localeDataPlugin = (_, dayClass, dayFactory) => {
|
|
140
139
|
const proto = dayClass.prototype;
|
|
141
140
|
proto.localeData = function() {
|
|
142
|
-
|
|
141
|
+
const locale = this.localeObject();
|
|
142
|
+
return createLocaleDataObject(locale);
|
|
143
143
|
};
|
|
144
144
|
dayFactory.localeData = (localeName) => {
|
|
145
|
-
|
|
145
|
+
const locale = localeName !== void 0 ? dayFactory.getLocale(localeName) : dayFactory.getLocale(dayFactory.locale());
|
|
146
|
+
return createLocaleDataObject(locale);
|
|
146
147
|
};
|
|
147
148
|
dayFactory.months = () => getMonths(dayFactory.getLocale(dayFactory.locale()), "months");
|
|
148
149
|
dayFactory.monthsShort = () => getMonths(dayFactory.getLocale(dayFactory.locale()), "monthsShort");
|
|
@@ -150,6 +151,5 @@ const localeDataPlugin = (_, dayClass, dayFactory) => {
|
|
|
150
151
|
dayFactory.weekdaysShort = () => getWeekdays(dayFactory.getLocale(dayFactory.locale()), "weekdaysShort");
|
|
151
152
|
dayFactory.weekdaysMin = () => getWeekdays(dayFactory.getLocale(dayFactory.locale()), "weekdaysMin");
|
|
152
153
|
};
|
|
153
|
-
|
|
154
154
|
//#endregion
|
|
155
|
-
export { localeDataPlugin as default };
|
|
155
|
+
export { localeDataPlugin as default };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { i as isString, t as isArray } from "../../chunks/
|
|
2
|
-
import { t as padNumberWithLeadingZeros } from "../../chunks/
|
|
3
|
-
|
|
1
|
+
import { i as isString, t as isArray } from "../../chunks/DuRKUq5K.js";
|
|
2
|
+
import { t as padNumberWithLeadingZeros } from "../../chunks/DXFoLbHM.js";
|
|
4
3
|
//#region src/plugins/localizedFormat/index.ts
|
|
5
4
|
/**
|
|
6
5
|
* Create a function that will format the day of week value from the sourceDate
|
|
@@ -78,6 +77,5 @@ const localizedFormatPlugin = (_, dayClass, dayFactory) => {
|
|
|
78
77
|
return this.localeObject?.().postFormat?.(formattedValue) ?? formattedValue;
|
|
79
78
|
};
|
|
80
79
|
};
|
|
81
|
-
|
|
82
80
|
//#endregion
|
|
83
|
-
export { localizedFormatPlugin as default };
|
|
81
|
+
export { localizedFormatPlugin as default };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { a as isUndefined, i as isString, t as isArray } from "../../chunks/
|
|
2
|
-
|
|
1
|
+
import { a as isUndefined, i as isString, t as isArray } from "../../chunks/DuRKUq5K.js";
|
|
3
2
|
//#region src/plugins/localizedParse/index.ts
|
|
4
3
|
const match2 = /\d{2}/;
|
|
5
4
|
const match1to2 = /\d\d?/;
|
|
@@ -52,7 +51,8 @@ const meridiemMatch = (locale, input, isLowerCase) => {
|
|
|
52
51
|
const addAfternoon = (isLowerCase, esday) => {
|
|
53
52
|
return function meridiemUpdater(parsedElements, input, parseOptions) {
|
|
54
53
|
const localeName = parseOptions["locale"];
|
|
55
|
-
|
|
54
|
+
const locale = esday.getLocale(localeName);
|
|
55
|
+
parsedElements.afternoon = meridiemMatch(locale, input, isLowerCase);
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
58
|
/**
|
|
@@ -212,6 +212,5 @@ const localizedParsePlugin = (_, dayClass, dayFactory) => {
|
|
|
212
212
|
}
|
|
213
213
|
};
|
|
214
214
|
};
|
|
215
|
-
|
|
216
215
|
//#endregion
|
|
217
|
-
export { localizedParsePlugin as default };
|
|
216
|
+
export { localizedParsePlugin as default };
|
package/plugins/minMax/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { t as isArray } from "../../chunks/
|
|
2
|
-
|
|
1
|
+
import { t as isArray } from "../../chunks/DuRKUq5K.js";
|
|
3
2
|
//#region src/plugins/minMax/index.ts
|
|
4
3
|
const minMaxPlugin = (_, _dayClass, dayFactory) => {
|
|
5
4
|
const sortBy = (method, dates) => {
|
|
@@ -16,6 +15,5 @@ const minMaxPlugin = (_, _dayClass, dayFactory) => {
|
|
|
16
15
|
dayFactory.max = (...dates) => sortBy("isAfter", dates);
|
|
17
16
|
dayFactory.min = (...dates) => sortBy("isBefore", dates);
|
|
18
17
|
};
|
|
19
|
-
|
|
20
18
|
//#endregion
|
|
21
|
-
export { minMaxPlugin as default };
|
|
19
|
+
export { minMaxPlugin as default };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as isEmptyObject, r as isObject } from "../../chunks/
|
|
3
|
-
import { n as normalizeUnitWithPlurals } from "../../chunks/
|
|
4
|
-
import { t as createInstanceFromExist } from "../../chunks/
|
|
5
|
-
|
|
1
|
+
import { f as constants_default } from "../../chunks/CeKusvtV.js";
|
|
2
|
+
import { n as isEmptyObject, r as isObject } from "../../chunks/DuRKUq5K.js";
|
|
3
|
+
import { n as normalizeUnitWithPlurals } from "../../chunks/DMdr1ZL1.js";
|
|
4
|
+
import { t as createInstanceFromExist } from "../../chunks/i3oEJgL3.js";
|
|
6
5
|
//#region src/plugins/objectSupport/index.ts
|
|
7
6
|
const objectSupportPlugin = (_, dayClass, _dayFactory) => {
|
|
8
7
|
const proto = dayClass.prototype;
|
|
@@ -94,6 +93,5 @@ const objectSupportPlugin = (_, dayClass, _dayFactory) => {
|
|
|
94
93
|
return oldSubtract.call(this, value, unit);
|
|
95
94
|
};
|
|
96
95
|
};
|
|
97
|
-
|
|
98
96
|
//#endregion
|
|
99
|
-
export { objectSupportPlugin as default };
|
|
97
|
+
export { objectSupportPlugin as default };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as isObject } from "../../chunks/
|
|
3
|
-
import { n as normalizeUnitWithPlurals } from "../../chunks/
|
|
4
|
-
|
|
1
|
+
import { f as constants_default } from "../../chunks/CeKusvtV.js";
|
|
2
|
+
import { r as isObject } from "../../chunks/DuRKUq5K.js";
|
|
3
|
+
import { n as normalizeUnitWithPlurals } from "../../chunks/DMdr1ZL1.js";
|
|
5
4
|
//#region src/plugins/quarterOfYear/index.ts
|
|
6
5
|
const quarterOfYearPlugin = (_, dayClass, dayFactory) => {
|
|
7
6
|
const proto = dayClass.prototype;
|
|
@@ -46,6 +45,5 @@ const quarterOfYearPlugin = (_, dayClass, dayFactory) => {
|
|
|
46
45
|
};
|
|
47
46
|
dayFactory.addFormatTokenDefinitions({ Q: (sourceDate) => sourceDate.quarter().toString() });
|
|
48
47
|
};
|
|
49
|
-
|
|
50
48
|
//#endregion
|
|
51
|
-
export { quarterOfYearPlugin as default };
|
|
49
|
+
export { quarterOfYearPlugin as default };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as DateType, s as EsDayPlugin } from "../../chunks/BB5OVV-y.js";
|
|
2
2
|
import { Locale } from "../locale/index.js";
|
|
3
|
-
|
|
4
3
|
//#region src/plugins/relativeTime/index.d.ts
|
|
5
4
|
declare module 'esday' {
|
|
6
5
|
interface EsDay {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as createInstanceFromExist } from "../../chunks/
|
|
3
|
-
|
|
1
|
+
import { f as constants_default } from "../../chunks/CeKusvtV.js";
|
|
2
|
+
import { t as createInstanceFromExist } from "../../chunks/i3oEJgL3.js";
|
|
4
3
|
//#region src/plugins/relativeTime/index.ts
|
|
5
4
|
const relativeTimePlugin = (options, dayClass, dayFactory) => {
|
|
6
5
|
const defaultRelativeTimeDef = {
|
|
@@ -182,6 +181,5 @@ const relativeTimePlugin = (options, dayClass, dayFactory) => {
|
|
|
182
181
|
return this.from(now, withoutSuffix);
|
|
183
182
|
};
|
|
184
183
|
};
|
|
185
|
-
|
|
186
184
|
//#endregion
|
|
187
|
-
export { relativeTimePlugin as default };
|
|
185
|
+
export { relativeTimePlugin as default };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as isEmptyObject, r as isObject } from "../../chunks/
|
|
3
|
-
import { n as normalizeUnitWithPlurals } from "../../chunks/
|
|
4
|
-
import { t as esday } from "../../chunks/
|
|
5
|
-
|
|
1
|
+
import { f as constants_default } from "../../chunks/CeKusvtV.js";
|
|
2
|
+
import { n as isEmptyObject, r as isObject } from "../../chunks/DuRKUq5K.js";
|
|
3
|
+
import { n as normalizeUnitWithPlurals } from "../../chunks/DMdr1ZL1.js";
|
|
4
|
+
import { t as esday } from "../../chunks/oiGWnahC.js";
|
|
6
5
|
//#region src/plugins/timezone/timezone-util.ts
|
|
7
6
|
/**
|
|
8
7
|
* Cache for Intl.DateTimeFormat instances for formatting date and time
|
|
@@ -69,7 +68,6 @@ function getTimezoneNameFormat(timezone, localeName = TzDefaultTimezoneLocale) {
|
|
|
69
68
|
}
|
|
70
69
|
return dtf;
|
|
71
70
|
}
|
|
72
|
-
|
|
73
71
|
//#endregion
|
|
74
72
|
//#region src/plugins/timezone/index.ts
|
|
75
73
|
/**
|
|
@@ -146,6 +144,7 @@ function weekdayNameToNumber(shortWeekdayName) {
|
|
|
146
144
|
case "Thu": return 4;
|
|
147
145
|
case "Fri": return 5;
|
|
148
146
|
case "Sat": return 6;
|
|
147
|
+
/* v8 ignore next -- @preserve */
|
|
149
148
|
default: return -1;
|
|
150
149
|
}
|
|
151
150
|
}
|
|
@@ -331,7 +330,7 @@ const timezonePLugin = (_, dayClass, esdayFactory) => {
|
|
|
331
330
|
const [targetTimestamp, targetOffset] = fixOffsetConvert(parsedInput.valueOf(), 0, offsetParsedInput, timezone ?? noTimezone);
|
|
332
331
|
const result = esdayFactory.utc(targetTimestamp, ...others);
|
|
333
332
|
result["$conf"].utcOffset = targetOffset;
|
|
334
|
-
result["$conf"].localOffset = result.toDate().getTimezoneOffset();
|
|
333
|
+
result["$conf"].localOffset = -1 * result.toDate().getTimezoneOffset();
|
|
335
334
|
result["$conf"].utc = targetOffset === 0;
|
|
336
335
|
if (result["$conf"].localeName !== void 0 && parsedInput["$conf"].localeName !== void 0) result["$conf"].localeName = parsedInput["$conf"].localeName;
|
|
337
336
|
result["$conf"].timezone = timezone;
|
|
@@ -349,7 +348,7 @@ const timezonePLugin = (_, dayClass, esdayFactory) => {
|
|
|
349
348
|
if (timezone === void 0) return this["$conf"].timezone;
|
|
350
349
|
const result = this.clone();
|
|
351
350
|
const tzOffsetTarget = tzOffset(this.valueOf(), timezone);
|
|
352
|
-
const localOffset = this.toDate().getTimezoneOffset();
|
|
351
|
+
const localOffset = -1 * this.toDate().getTimezoneOffset();
|
|
353
352
|
result["$conf"].localOffset = localOffset;
|
|
354
353
|
result["$conf"].utcOffset = tzOffsetTarget;
|
|
355
354
|
result["$conf"].utc = tzOffsetTarget === 0;
|
|
@@ -357,7 +356,7 @@ const timezonePLugin = (_, dayClass, esdayFactory) => {
|
|
|
357
356
|
if (keepLocalTime) {
|
|
358
357
|
const timestampSource = result.valueOf();
|
|
359
358
|
let tzOffsetSource = 0;
|
|
360
|
-
if (!this["$conf"].utc) tzOffsetSource = this["$conf"].timezone ? Number(this["$conf"].utcOffset) :
|
|
359
|
+
if (!this["$conf"].utc) tzOffsetSource = this["$conf"].timezone ? Number(this["$conf"].utcOffset) : localOffset;
|
|
361
360
|
const [timestampFixed, tzOffsetFixed] = fixOffsetConvert(timestampSource, tzOffsetSource, tzOffsetTarget, timezone);
|
|
362
361
|
result["$conf"].utcOffset = tzOffsetFixed;
|
|
363
362
|
result["$conf"].utc = tzOffsetFixed === 0;
|
|
@@ -395,19 +394,19 @@ const timezonePLugin = (_, dayClass, esdayFactory) => {
|
|
|
395
394
|
const [timestampFixed, tzOffsetFixed] = fixOffsetConvert(utcAsLocal, 0, tzOffset(utcAsLocal, timezone), timezone);
|
|
396
395
|
this.$d = new Date(timestampFixed);
|
|
397
396
|
this["$conf"].utcOffset = tzOffsetFixed;
|
|
398
|
-
this["$conf"].localOffset = this.$d.getTimezoneOffset();
|
|
397
|
+
this["$conf"].localOffset = -1 * this.$d.getTimezoneOffset();
|
|
399
398
|
this["$conf"].utc = tzOffsetFixed === 0;
|
|
400
399
|
return this;
|
|
401
400
|
};
|
|
402
401
|
const oldStartOf = dayClass.prototype.startOf;
|
|
403
402
|
proto.startOf = function(units) {
|
|
404
|
-
if (!this["$conf"]
|
|
403
|
+
if (!this["$conf"]?.["timezone"]) return oldStartOf.call(this, units);
|
|
405
404
|
const withoutTz = esdayFactory(this.format("YYYY-MM-DD HH:mm:ss:SSS"));
|
|
406
405
|
return oldStartOf.call(withoutTz, units).tz(this["$conf"]["timezone"], true);
|
|
407
406
|
};
|
|
408
407
|
const oldEndOf = dayClass.prototype.endOf;
|
|
409
408
|
proto.endOf = function(units) {
|
|
410
|
-
if (!this["$conf"]
|
|
409
|
+
if (!this["$conf"]?.["timezone"]) return oldEndOf.call(this, units);
|
|
411
410
|
const withoutTz = esdayFactory(this.format("YYYY-MM-DD HH:mm:ss:SSS"));
|
|
412
411
|
return oldEndOf.call(withoutTz, units).tz(this["$conf"]["timezone"], true);
|
|
413
412
|
};
|
|
@@ -435,7 +434,7 @@ const timezonePLugin = (_, dayClass, esdayFactory) => {
|
|
|
435
434
|
const [timestampFixed, tzOffsetFixed] = fixOffsetConvert(timestamp, tzOldOffset, tzOffset(timestamp, timezone), timezone);
|
|
436
435
|
newValue.$d = new Date(timestampFixed);
|
|
437
436
|
newValue["$conf"].utcOffset = tzOffsetFixed;
|
|
438
|
-
newValue["$conf"].localOffset = newValue.$d.getTimezoneOffset();
|
|
437
|
+
newValue["$conf"].localOffset = -1 * newValue.$d.getTimezoneOffset();
|
|
439
438
|
newValue["$conf"].utc = tzOffsetFixed === 0;
|
|
440
439
|
return newValue;
|
|
441
440
|
};
|
|
@@ -451,6 +450,5 @@ const timezonePLugin = (_, dayClass, esdayFactory) => {
|
|
|
451
450
|
};
|
|
452
451
|
esdayFactory.addFormatTokenDefinitions(additionalTokens);
|
|
453
452
|
};
|
|
454
|
-
|
|
455
453
|
//#endregion
|
|
456
|
-
export { timezonePLugin as default };
|
|
454
|
+
export { timezonePLugin as default };
|