esday 1.1.0 → 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 +8 -0
- package/README.md +4 -0
- 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/{DE-bYjyv.js → BzQsG1-n.js} +21 -21
- 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/{CStrb5bT.js → RZP9wuxV.js} +8 -10
- 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 +21 -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 -2
- package/plugins/index.d.ts +2 -2
- package/plugins/index.js +3 -3
- 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 -2
- 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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [1.1.1](https://github.com/BePo65/esday/compare/v1.1.0...v1.1.1) (2026-11-19)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
* change .innerText to .textContent ([40ff34b](https://github.com/BePo65/esday/commit/40ff34b84939deb3b263d28528672996595d691c))
|
|
10
|
+
* fix error parsing date string with format ([7606e61](https://github.com/BePo65/esday/commit/7606e618509b994449cd68575768dc316ee170d3))
|
|
11
|
+
* update locales to changes in moment@2.31.0 ([05a9409](https://github.com/BePo65/esday/commit/05a94097f6e3204292da1c7f6e3454f9ef380b52))
|
|
12
|
+
|
|
5
13
|
## [1.1.0](https://github.com/BePo65/esday/compare/v1.0.1...v1.1.0) (2026-08-01)
|
|
6
14
|
|
|
7
15
|
### Features
|
package/README.md
CHANGED
|
@@ -69,3 +69,7 @@ This project also partially contains code derived or copied from the following p
|
|
|
69
69
|
|
|
70
70
|
- [Day.js](https://github.com/iamkun/dayjs)
|
|
71
71
|
- [Moment.js](https://github.com/moment/moment)
|
|
72
|
+
|
|
73
|
+
## Hints
|
|
74
|
+
|
|
75
|
+
`typescript` cannot be updated to version 7.0, as this tsdown does not run with typescript@7.0 (requires typescript@7.1).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/common/str-utils.ts
|
|
2
2
|
/**
|
|
3
3
|
* Pad the start of a string with a specified character
|
|
4
4
|
* @param origin the string or number to pad
|
|
@@ -51,5 +51,4 @@ function padZoneStr(utcOffset) {
|
|
|
51
51
|
const minuteOffset = Math.trunc(minutes % 60);
|
|
52
52
|
return `${negMinutes <= 0 ? "+" : "-"}${padStart(hourOffset, 2, "0")}:${padStart(minuteOffset, 2, "0")}`;
|
|
53
53
|
}
|
|
54
|
-
//#endregion
|
|
55
54
|
export { padStart as n, padZoneStr as r, padNumberWithLeadingZeros as t };
|
|
@@ -55,5 +55,4 @@ var constants_default = {
|
|
|
55
55
|
INVALID_DATE_STRING,
|
|
56
56
|
REGEX_PARSE_DEFAULT: /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[T\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/i
|
|
57
57
|
};
|
|
58
|
-
//#endregion
|
|
59
58
|
export { MIN as a, QUARTER as c, YEAR as d, constants_default as f, ISOWEEK as i, SECOND as l, HOUR as n, MONTH as o, INVALID_DATE_STRING as r, MS as s, DAY_OF_MONTH as t, WEEK as u };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { f as constants_default } from "./
|
|
2
|
-
import { a as isUndefined, n as isEmptyObject, o as isValidDate, r as isObject, t as isArray } from "./
|
|
3
|
-
import { n as normalizeUnitWithPlurals, t as normalizeUnit } from "./
|
|
4
|
-
import { i as setUnitInDate, r as prettyUnitsDate, t as getUnitInDate } from "./
|
|
5
|
-
import { t as createInstanceFromExist } from "./
|
|
6
|
-
import { n as padStart, r as padZoneStr } from "./
|
|
7
|
-
|
|
1
|
+
import { f as constants_default } from "./BfEWL_VC.js";
|
|
2
|
+
import { a as isUndefined, n as isEmptyObject, o as isValidDate, r as isObject, t as isArray } from "./BtFAvcS3.js";
|
|
3
|
+
import { n as normalizeUnitWithPlurals, t as normalizeUnit } from "./DLzmBvJ7.js";
|
|
4
|
+
import { i as setUnitInDate, r as prettyUnitsDate, t as getUnitInDate } from "./DThHId1s.js";
|
|
5
|
+
import { t as createInstanceFromExist } from "./SIX-1Rv6.js";
|
|
6
|
+
import { n as padStart, r as padZoneStr } from "./9Re3Ck2t.js";
|
|
7
|
+
// src/core/Impl/add.ts
|
|
8
8
|
function addImpl(that, value, units) {
|
|
9
9
|
const $d = that["$d"];
|
|
10
10
|
const unit = normalizeUnitWithPlurals(units);
|
|
@@ -22,8 +22,8 @@ function addImpl(that, value, units) {
|
|
|
22
22
|
case constants_default.SECOND:
|
|
23
23
|
case constants_default.MS: {
|
|
24
24
|
const step = {
|
|
25
|
-
minute:
|
|
26
|
-
hour:
|
|
25
|
+
minute: 6e4,
|
|
26
|
+
hour: 36e5,
|
|
27
27
|
second: 1e3
|
|
28
28
|
}[unit] || 1;
|
|
29
29
|
const nextTimeStamp = $d.getTime() + value * step;
|
|
@@ -32,8 +32,7 @@ function addImpl(that, value, units) {
|
|
|
32
32
|
default: return that.clone();
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
|
|
36
|
-
//#region src/core/Impl/diff.ts
|
|
35
|
+
// src/core/Impl/diff.ts
|
|
37
36
|
/**
|
|
38
37
|
* get difference between 2 dates as months.
|
|
39
38
|
* As implemented by moment.js, the algorithm is optimized to ensure that two months
|
|
@@ -89,14 +88,11 @@ function diffImpl(that, date, units, asFloat = false) {
|
|
|
89
88
|
case constants_default.SECOND:
|
|
90
89
|
result = diffInMs / constants_default.MILLISECONDS_A_SECOND;
|
|
91
90
|
break;
|
|
92
|
-
default:
|
|
93
|
-
result = diffInMs;
|
|
94
|
-
break;
|
|
91
|
+
default: result = diffInMs;
|
|
95
92
|
}
|
|
96
93
|
return asFloat ? result : absFloor(result);
|
|
97
94
|
}
|
|
98
|
-
|
|
99
|
-
//#region src/core/Impl/format.ts
|
|
95
|
+
// src/core/Impl/format.ts
|
|
100
96
|
const formattingSeparatorsRegex = "\\[([^\\]]+)\\]";
|
|
101
97
|
let formattingTokensRegex;
|
|
102
98
|
const formatTokensDefinitions = {
|
|
@@ -151,8 +147,7 @@ function formatImpl(that, formatStr) {
|
|
|
151
147
|
};
|
|
152
148
|
return activeFormatString.replace(formattingTokensRegex, (match, $1) => $1 || matches(match));
|
|
153
149
|
}
|
|
154
|
-
|
|
155
|
-
//#region src/core/Impl/parse.ts
|
|
150
|
+
// src/core/Impl/parse.ts
|
|
156
151
|
/**
|
|
157
152
|
* Create a Date object from an array of date components (year, month, ...).
|
|
158
153
|
* The month is 0 based (0..11).
|
|
@@ -175,8 +170,7 @@ function parseArrayToDate(dateArray) {
|
|
|
175
170
|
});
|
|
176
171
|
return this.dateFromDateComponents(...dateArrayTuple);
|
|
177
172
|
}
|
|
178
|
-
|
|
179
|
-
//#region src/core/Impl/startOf.ts
|
|
173
|
+
// src/core/Impl/startOf.ts
|
|
180
174
|
function startOfImpl(that, unit, reverse = false) {
|
|
181
175
|
const result = that.clone();
|
|
182
176
|
const setterFunc = result["$set"];
|
|
@@ -217,31 +211,24 @@ function startOfImpl(that, unit, reverse = false) {
|
|
|
217
211
|
case constants_default.MIN:
|
|
218
212
|
instanceFactorySet(constants_default.SECOND, 2);
|
|
219
213
|
break;
|
|
220
|
-
case constants_default.SECOND:
|
|
221
|
-
instanceFactorySet(constants_default.MS, 3);
|
|
222
|
-
break;
|
|
223
|
-
default: break;
|
|
214
|
+
case constants_default.SECOND: instanceFactorySet(constants_default.MS, 3);
|
|
224
215
|
}
|
|
225
216
|
return result;
|
|
226
217
|
}
|
|
227
|
-
|
|
228
|
-
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/checkPrivateRedeclaration.js
|
|
218
|
+
// \0@oxc-project+runtime@0.158.0/helpers/esm/checkPrivateRedeclaration.js
|
|
229
219
|
function _checkPrivateRedeclaration(e, t) {
|
|
230
220
|
if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
231
221
|
}
|
|
232
|
-
|
|
233
|
-
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/classPrivateMethodInitSpec.js
|
|
222
|
+
// \0@oxc-project+runtime@0.158.0/helpers/esm/classPrivateMethodInitSpec.js
|
|
234
223
|
function _classPrivateMethodInitSpec(e, a) {
|
|
235
224
|
_checkPrivateRedeclaration(e, a), a.add(e);
|
|
236
225
|
}
|
|
237
|
-
|
|
238
|
-
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/assertClassBrand.js
|
|
226
|
+
// \0@oxc-project+runtime@0.158.0/helpers/esm/assertClassBrand.js
|
|
239
227
|
function _assertClassBrand(e, t, n) {
|
|
240
228
|
if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
|
|
241
229
|
throw new TypeError("Private element is not present on this object");
|
|
242
230
|
}
|
|
243
|
-
|
|
244
|
-
//#region src/core/EsDay.ts
|
|
231
|
+
// src/core/EsDay.ts
|
|
245
232
|
var _EsDay_brand = /* @__PURE__ */ new WeakSet();
|
|
246
233
|
var EsDay = class EsDay {
|
|
247
234
|
constructor(d, conf) {
|
|
@@ -444,8 +431,7 @@ for (const key of prettyUnitsDate) EsDay.prototype[key] = function(...args) {
|
|
|
444
431
|
if (args?.length) return this.set(key, ...args);
|
|
445
432
|
return this.get(key);
|
|
446
433
|
};
|
|
447
|
-
|
|
448
|
-
//#region src/core/factory.ts
|
|
434
|
+
// src/core/factory.ts
|
|
449
435
|
const esday = (d, ...others) => {
|
|
450
436
|
if (d instanceof EsDay) return d.clone();
|
|
451
437
|
const conf = {};
|
|
@@ -467,5 +453,4 @@ esday.extend = (plugin, option) => {
|
|
|
467
453
|
}
|
|
468
454
|
return esday;
|
|
469
455
|
};
|
|
470
|
-
//#endregion
|
|
471
456
|
export { _checkPrivateRedeclaration as i, EsDay as n, _assertClassBrand as r, esday as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/common/is.ts
|
|
2
2
|
function isUndefined(value) {
|
|
3
3
|
return value === void 0;
|
|
4
4
|
}
|
|
@@ -20,5 +20,4 @@ function isArray(value) {
|
|
|
20
20
|
function isValidDate(value) {
|
|
21
21
|
return !Number.isNaN(value.valueOf());
|
|
22
22
|
}
|
|
23
|
-
//#endregion
|
|
24
23
|
export { isUndefined as a, isString as i, isEmptyObject as n, isValidDate as o, isObject as r, undefinedOr as s, isArray as t };
|
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
import { r as
|
|
2
|
-
import { a as isUndefined, r as isObject } from "./
|
|
3
|
-
import { n as normalizeUnitWithPlurals, r as normalizeUnitWithPluralsToPlural } from "./
|
|
4
|
-
import { n as padStart } from "./
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { i as _checkPrivateRedeclaration, r as _assertClassBrand, t as esday } from "./Bk-WlP29.js";
|
|
2
|
+
import { a as isUndefined, r as isObject } from "./BtFAvcS3.js";
|
|
3
|
+
import { n as normalizeUnitWithPlurals, r as normalizeUnitWithPluralsToPlural } from "./DLzmBvJ7.js";
|
|
4
|
+
import { n as padStart } from "./9Re3Ck2t.js";
|
|
5
|
+
import { r as INVALID_DATE_STRING } from "./BfEWL_VC.js";
|
|
6
|
+
// \0@oxc-project+runtime@0.158.0/helpers/esm/classPrivateFieldInitSpec.js
|
|
7
7
|
function _classPrivateFieldInitSpec(e, t, a) {
|
|
8
8
|
_checkPrivateRedeclaration(e, t), t.set(e, a);
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/classPrivateFieldSet2.js
|
|
10
|
+
// \0@oxc-project+runtime@0.158.0/helpers/esm/classPrivateFieldSet2.js
|
|
12
11
|
function _classPrivateFieldSet2(s, a, r) {
|
|
13
12
|
return s.set(_assertClassBrand(s, a), r), r;
|
|
14
13
|
}
|
|
15
|
-
|
|
16
|
-
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/classPrivateFieldGet2.js
|
|
14
|
+
// \0@oxc-project+runtime@0.158.0/helpers/esm/classPrivateFieldGet2.js
|
|
17
15
|
function _classPrivateFieldGet2(s, a) {
|
|
18
16
|
return s.get(_assertClassBrand(s, a));
|
|
19
17
|
}
|
|
20
|
-
|
|
21
|
-
//#region src/plugins/duration/index.ts
|
|
18
|
+
// src/plugins/duration/index.ts
|
|
22
19
|
/** = 0:
|
|
23
20
|
* Duration plugin
|
|
24
21
|
*
|
|
@@ -86,14 +83,16 @@ var DurationImpl = class DurationImpl {
|
|
|
86
83
|
const key = stringKey;
|
|
87
84
|
parsedInputRaw[key] = +value[key];
|
|
88
85
|
}
|
|
89
|
-
} else if (typeof value === "number")
|
|
90
|
-
|
|
91
|
-
|
|
86
|
+
} else if (typeof value === "number") {
|
|
87
|
+
if (isUndefined(normalizedUnit)) parsedInputRaw.milliseconds = value;
|
|
88
|
+
else parsedInputRaw[this.toKeyOfDurationCache(normalizedUnit)] = value;
|
|
89
|
+
} else if (typeof value === "string") {
|
|
92
90
|
let parsedIso;
|
|
93
91
|
let parsedAsp;
|
|
94
|
-
if (numbersOnlyRegex.test(value))
|
|
95
|
-
|
|
96
|
-
|
|
92
|
+
if (numbersOnlyRegex.test(value)) {
|
|
93
|
+
if (isUndefined(normalizedUnit)) parsedInputRaw.milliseconds = +value;
|
|
94
|
+
else parsedInputRaw[this.toKeyOfDurationCache(normalizedUnit)] = +value;
|
|
95
|
+
} else if (parsedIso = iso8601Regex.exec(value)) {
|
|
97
96
|
const sign = parsedIso[1] === "-" ? -1 : 1;
|
|
98
97
|
const durationDetailsKeys = [
|
|
99
98
|
"years",
|
|
@@ -111,8 +110,10 @@ var DurationImpl = class DurationImpl {
|
|
|
111
110
|
const sign = parsedAsp[1] === "-" ? -1 : 1;
|
|
112
111
|
const durationParts = parsedAsp.slice(2).map((value, index) => {
|
|
113
112
|
let valueAsNumber = 0;
|
|
114
|
-
if (!isUndefined(value) && Number.isFinite(Number(value)))
|
|
115
|
-
|
|
113
|
+
if (!isUndefined(value) && Number.isFinite(Number(value))) {
|
|
114
|
+
if (index !== 4) valueAsNumber = this.absFloor(Number(value)) * sign;
|
|
115
|
+
else valueAsNumber = Math.round(Number(value) * 1e3) * sign;
|
|
116
|
+
}
|
|
116
117
|
return valueAsNumber;
|
|
117
118
|
});
|
|
118
119
|
[parsedInputRaw.days, parsedInputRaw.hours, parsedInputRaw.minutes, parsedInputRaw.seconds, parsedInputRaw.milliseconds] = durationParts;
|
|
@@ -469,5 +470,4 @@ const durationPlugin = (_, _dayClass, dayFactory) => {
|
|
|
469
470
|
return d instanceof DurationImpl;
|
|
470
471
|
};
|
|
471
472
|
};
|
|
472
|
-
//#endregion
|
|
473
473
|
export { durationPlugin as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as MIN, c as QUARTER, d as YEAR, i as ISOWEEK, l as SECOND, n as HOUR, o as MONTH, s as MS, t as DAY_OF_MONTH, u as WEEK } from "./
|
|
2
|
-
|
|
1
|
+
import { a as MIN, c as QUARTER, d as YEAR, i as ISOWEEK, l as SECOND, n as HOUR, o as MONTH, s as MS, t as DAY_OF_MONTH, u as WEEK } from "./BfEWL_VC.js";
|
|
2
|
+
// src/common/units.ts
|
|
3
3
|
const UNIT_MAP_SHORT_TO_LONG = {
|
|
4
4
|
y: YEAR,
|
|
5
5
|
Q: QUARTER,
|
|
@@ -78,5 +78,4 @@ function normalizeUnitWithPluralsToPlural(unit) {
|
|
|
78
78
|
}
|
|
79
79
|
return normalizedUnit;
|
|
80
80
|
}
|
|
81
|
-
//#endregion
|
|
82
81
|
export { normalizeUnitWithPlurals as n, normalizeUnitWithPluralsToPlural as r, normalizeUnit as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as isArray } from "./
|
|
2
|
-
import { n as normalizeUnitWithPlurals } from "./
|
|
3
|
-
|
|
1
|
+
import { t as isArray } from "./BtFAvcS3.js";
|
|
2
|
+
import { n as normalizeUnitWithPlurals } from "./DLzmBvJ7.js";
|
|
3
|
+
// src/common/date-fields.ts
|
|
4
4
|
/**
|
|
5
5
|
* Map units to fields of a javascript Date object.
|
|
6
6
|
*/
|
|
@@ -33,5 +33,4 @@ function setUnitInDateUTC(date, unit, value) {
|
|
|
33
33
|
date[`setUTC${unitToField(unit)}`](...isArray(value) ? value : [value]);
|
|
34
34
|
return date;
|
|
35
35
|
}
|
|
36
|
-
//#endregion
|
|
37
36
|
export { setUnitInDateUTC as a, setUnitInDate as i, getUnitInDateUTC as n, prettyUnitsDate as r, getUnitInDate as t };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/common/units.d.ts
|
|
2
1
|
declare const UNIT_MAP_SHORT_TO_LONG: {
|
|
3
2
|
readonly y: "year";
|
|
4
3
|
readonly Q: "quarter";
|
|
@@ -73,12 +72,8 @@ type UnitSecond = UnionUnitSingular<'s'>;
|
|
|
73
72
|
type UnitSeconds = UnionUnitPlural<'s'>;
|
|
74
73
|
type UnitMs = UnionUnitSingular<'ms'>;
|
|
75
74
|
type UnitMss = UnionUnitPlural<'ms'>;
|
|
76
|
-
//#endregion
|
|
77
|
-
//#region src/types/util-types.d.ts
|
|
78
75
|
type SimpleType = string | number | boolean | null | undefined;
|
|
79
76
|
type SimpleObject = Record<string, SimpleType | string[] | Record<string, SimpleType>>;
|
|
80
|
-
//#endregion
|
|
81
|
-
//#region src/types/core.d.ts
|
|
82
77
|
type EsDayFactoryParserFn = (d?: DateType, ...others: (SimpleType | string[] | {
|
|
83
78
|
[key: string]: SimpleType;
|
|
84
79
|
})[]) => EsDay;
|
|
@@ -150,8 +145,6 @@ interface ConfigurationObject {
|
|
|
150
145
|
args_2?: SimpleType | string[] | Record<string, SimpleType>;
|
|
151
146
|
args_3?: SimpleType | string[] | Record<string, SimpleType>;
|
|
152
147
|
}
|
|
153
|
-
//#endregion
|
|
154
|
-
//#region src/core/EsDay.d.ts
|
|
155
148
|
declare interface EsDay {
|
|
156
149
|
year: (() => number) & ((year: number, month?: number, date?: number) => EsDay);
|
|
157
150
|
month: (() => number) & ((month: number, date?: number) => EsDay);
|
|
@@ -232,5 +225,4 @@ declare class EsDay {
|
|
|
232
225
|
toString(): string;
|
|
233
226
|
protected $set(unit: UnitTypeGetSet | UnitsObjectTypeSet, values: number[]): this;
|
|
234
227
|
}
|
|
235
|
-
//#endregion
|
|
236
228
|
export { UnitMs as A, UnitDates as C, UnitIsoWeeks as D, UnitIsoWeek as E, UnitTypeCore as F, UnitTypeGetSet as I, UnitTypePlurals as L, UnitSecond as M, UnitType as N, UnitMin as O, UnitTypeAddSub as P, UnitWeek as R, UnitDate as S, UnitHour as T, LongUnit as _, EsDayFactory as a, PrettyUnitFromPlurals as b, FormattingTokenDefinitions as c, ParsingObjectPlurals as d, ParsingObjectShort as f, SimpleType as g, SimpleObject as h, DateType as i, UnitQuarter as j, UnitMonth as k, ParsingObject as l, UnitsObjectTypeSet as m, ConfigurationObject as n, EsDayFactoryParserFn as o, UnitsObjectTypeAddSub as p, DateFromDateComponents as r, EsDayPlugin as s, EsDay as t, ParsingObjectLong as u, PrettyUnitAsPlural as v, UnitDay as w, ShortUnit as x, PrettyUnitAsSingular as y, UnitYear as z };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { n as
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { t as esday } from "./Bk-WlP29.js";
|
|
2
|
+
import { f as constants_default } from "./BfEWL_VC.js";
|
|
3
|
+
import { n as isEmptyObject, r as isObject } from "./BtFAvcS3.js";
|
|
4
|
+
import { n as normalizeUnitWithPlurals } from "./DLzmBvJ7.js";
|
|
5
|
+
// src/plugins/timezone/timezone-util.ts
|
|
6
6
|
/**
|
|
7
7
|
* Cache for Intl.DateTimeFormat instances for formatting date and time
|
|
8
8
|
* used to improve performance.
|
|
@@ -68,8 +68,7 @@ function getTimezoneNameFormat(timezone, localeName = TzDefaultTimezoneLocale) {
|
|
|
68
68
|
}
|
|
69
69
|
return dtf;
|
|
70
70
|
}
|
|
71
|
-
|
|
72
|
-
//#region src/plugins/timezone/index.ts
|
|
71
|
+
// src/plugins/timezone/index.ts
|
|
73
72
|
/**
|
|
74
73
|
* timezone plugin
|
|
75
74
|
*
|
|
@@ -94,7 +93,7 @@ const UNIT_ARRAY_MAP = {
|
|
|
94
93
|
minute: 4,
|
|
95
94
|
second: 5
|
|
96
95
|
};
|
|
97
|
-
const maxDstDiff =
|
|
96
|
+
const maxDstDiff = 72e5;
|
|
98
97
|
const typeToPos = {
|
|
99
98
|
year: 0,
|
|
100
99
|
month: 1,
|
|
@@ -270,7 +269,7 @@ const timezonePLugin = (_, dayClass, esdayFactory) => {
|
|
|
270
269
|
let timestampAsEpoch = timestamp.valueOf();
|
|
271
270
|
const msOfTimestamp = timestampAsEpoch % 1e3;
|
|
272
271
|
timestampAsEpoch -= msOfTimestamp;
|
|
273
|
-
return (utcTs - timestampAsEpoch) /
|
|
272
|
+
return (utcTs - timestampAsEpoch) / 6e4;
|
|
274
273
|
};
|
|
275
274
|
/**
|
|
276
275
|
* Move to the earlier date in an DST overlap, if we are in an overlap. Otherwise return input date.
|
|
@@ -450,5 +449,4 @@ const timezonePLugin = (_, dayClass, esdayFactory) => {
|
|
|
450
449
|
};
|
|
451
450
|
esdayFactory.addFormatTokenDefinitions(additionalTokens);
|
|
452
451
|
};
|
|
453
|
-
//#endregion
|
|
454
452
|
export { timezonePLugin as t };
|
package/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as UnitMs, E as UnitIsoWeek, F as UnitTypeCore, I as UnitTypeGetSet, M as UnitSecond, N as UnitType, O as UnitMin, P as UnitTypeAddSub, R as UnitWeek, S as UnitDate, T as UnitHour, _ as LongUnit, a as EsDayFactory, b as PrettyUnitFromPlurals, c as FormattingTokenDefinitions, d as ParsingObjectPlurals, f as ParsingObjectShort, g as SimpleType, h as SimpleObject, i as DateType, j as UnitQuarter, k as UnitMonth, l as ParsingObject, m as UnitsObjectTypeSet, n as ConfigurationObject, o as EsDayFactoryParserFn, p as UnitsObjectTypeAddSub, r as DateFromDateComponents, s as EsDayPlugin, t as EsDay, u as ParsingObjectLong, v as PrettyUnitAsPlural, w as UnitDay, x as ShortUnit, y as PrettyUnitAsSingular, z as UnitYear } from "./chunks/
|
|
2
|
-
import { t as esday } from "./chunks/
|
|
1
|
+
import { A as UnitMs, E as UnitIsoWeek, F as UnitTypeCore, I as UnitTypeGetSet, M as UnitSecond, N as UnitType, O as UnitMin, P as UnitTypeAddSub, R as UnitWeek, S as UnitDate, T as UnitHour, _ as LongUnit, a as EsDayFactory, b as PrettyUnitFromPlurals, c as FormattingTokenDefinitions, d as ParsingObjectPlurals, f as ParsingObjectShort, g as SimpleType, h as SimpleObject, i as DateType, j as UnitQuarter, k as UnitMonth, l as ParsingObject, m as UnitsObjectTypeSet, n as ConfigurationObject, o as EsDayFactoryParserFn, p as UnitsObjectTypeAddSub, r as DateFromDateComponents, s as EsDayPlugin, t as EsDay, u as ParsingObjectLong, v as PrettyUnitAsPlural, w as UnitDay, x as ShortUnit, y as PrettyUnitAsSingular, z as UnitYear } from "./chunks/MfctHIHI.js";
|
|
2
|
+
import { t as esday } from "./chunks/DBmUXISx.js";
|
|
3
3
|
export { ConfigurationObject, DateFromDateComponents, DateType, EsDay, EsDayFactory, EsDayFactoryParserFn, EsDayPlugin, FormattingTokenDefinitions, type LongUnit, ParsingObject, ParsingObjectLong, ParsingObjectPlurals, ParsingObjectShort, type PrettyUnitAsPlural, type PrettyUnitAsSingular, type PrettyUnitFromPlurals, type ShortUnit, type SimpleObject, type SimpleType, type UnitDate, type UnitDay, type UnitHour, type UnitIsoWeek, type UnitMin, type UnitMonth, type UnitMs, type UnitQuarter, type UnitSecond, type UnitType, type UnitTypeAddSub, type UnitTypeCore, type UnitTypeGetSet, type UnitWeek, type UnitYear, UnitsObjectTypeAddSub, UnitsObjectTypeSet, esday };
|
package/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { EsDay, esday };
|
|
1
|
+
export { n as EsDay, t as esday } from "./chunks/Bk-WlP29.js";
|
package/locales/af.d.ts
CHANGED
package/locales/af.js
CHANGED
package/locales/am.d.ts
CHANGED
package/locales/am.js
CHANGED
package/locales/ar-dz.d.ts
CHANGED
package/locales/ar-dz.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import locale from "./ar.js";
|
|
2
2
|
import { cloneLocale, setLocaleProperty } from "../plugins/locale/index.js";
|
|
3
|
-
|
|
3
|
+
// src/locales/ar-dz.ts
|
|
4
4
|
/**
|
|
5
5
|
* Arabic (Algeria) [ar-DZ]
|
|
6
6
|
*/
|
|
@@ -24,5 +24,4 @@ setLocaleProperty(localeArDz, "months", months);
|
|
|
24
24
|
setLocaleProperty(localeArDz, "monthsShort", months);
|
|
25
25
|
setLocaleProperty(localeArDz, "weekStart", 0);
|
|
26
26
|
setLocaleProperty(localeArDz, "yearStart", 4);
|
|
27
|
-
//#endregion
|
|
28
27
|
export { localeArDz as default };
|
package/locales/ar-iq.d.ts
CHANGED
package/locales/ar-iq.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import locale from "./ar.js";
|
|
2
2
|
import { cloneLocale, setLocaleProperty } from "../plugins/locale/index.js";
|
|
3
|
-
|
|
3
|
+
// src/locales/ar-iq.ts
|
|
4
4
|
/**
|
|
5
5
|
* Arabic (Iraq) [ar-IQ]
|
|
6
6
|
*/
|
|
7
7
|
const localeArIq = cloneLocale(locale);
|
|
8
8
|
setLocaleProperty(localeArIq, "name", "ar-IQ");
|
|
9
|
-
//#endregion
|
|
10
9
|
export { localeArIq as default };
|
package/locales/ar-kw.d.ts
CHANGED
package/locales/ar-kw.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import locale from "./ar.js";
|
|
2
2
|
import { cloneLocale, setLocaleProperty } from "../plugins/locale/index.js";
|
|
3
|
-
|
|
3
|
+
// src/locales/ar-kw.ts
|
|
4
4
|
/**
|
|
5
5
|
* Arabic (Kuwait) [ar-KW]
|
|
6
6
|
*/
|
|
@@ -20,5 +20,4 @@ setLocaleProperty(localeArKw, "name", "ar-KW");
|
|
|
20
20
|
setLocaleProperty(localeArKw, "weekStart", 0);
|
|
21
21
|
setLocaleProperty(localeArKw, "formats", formats);
|
|
22
22
|
setLocaleProperty(localeArKw, "calendar", calendar);
|
|
23
|
-
//#endregion
|
|
24
23
|
export { localeArKw as default };
|
package/locales/ar-ly.d.ts
CHANGED
package/locales/ar-ly.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import locale from "./ar.js";
|
|
2
2
|
import { cloneLocale, setLocaleProperty } from "../plugins/locale/index.js";
|
|
3
|
-
|
|
3
|
+
// src/locales/ar-ly.ts
|
|
4
4
|
/**
|
|
5
5
|
* Arabic (Lybia) [ar-LY]
|
|
6
6
|
*/
|
|
7
7
|
const localeArLy = cloneLocale(locale);
|
|
8
8
|
setLocaleProperty(localeArLy, "name", "ar-LY");
|
|
9
|
-
//#endregion
|
|
10
9
|
export { localeArLy as default };
|
package/locales/ar-ma.d.ts
CHANGED
package/locales/ar-ma.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import locale from "./ar.js";
|
|
2
2
|
import { cloneLocale, setLocaleProperty } from "../plugins/locale/index.js";
|
|
3
|
-
|
|
3
|
+
// src/locales/ar-ma.ts
|
|
4
4
|
/**
|
|
5
5
|
* Arabic (Morocco) [ar-MA]
|
|
6
6
|
*/
|
|
@@ -21,5 +21,4 @@ setLocaleProperty(localeArMa, "weekStart", 1);
|
|
|
21
21
|
setLocaleProperty(localeArMa, "yearStart", 4);
|
|
22
22
|
setLocaleProperty(localeArMa, "formats", formats);
|
|
23
23
|
setLocaleProperty(localeArMa, "calendar", calendar);
|
|
24
|
-
//#endregion
|
|
25
24
|
export { localeArMa as default };
|
package/locales/ar-sa.d.ts
CHANGED
package/locales/ar-sa.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import locale from "./ar.js";
|
|
2
2
|
import { cloneLocale, setLocaleProperty } from "../plugins/locale/index.js";
|
|
3
|
-
|
|
3
|
+
// src/locales/ar-sa.ts
|
|
4
4
|
/**
|
|
5
5
|
* Arabic (Saudi Arabia) [ar-SA]
|
|
6
6
|
*/
|
|
@@ -21,5 +21,4 @@ setLocaleProperty(localeArSa, "weekStart", 0);
|
|
|
21
21
|
setLocaleProperty(localeArSa, "yearStart", 6);
|
|
22
22
|
setLocaleProperty(localeArSa, "formats", formats);
|
|
23
23
|
setLocaleProperty(localeArSa, "calendar", calendar);
|
|
24
|
-
//#endregion
|
|
25
24
|
export { localeArSa as default };
|
package/locales/ar-tn.d.ts
CHANGED
package/locales/ar-tn.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import locale from "./ar.js";
|
|
2
2
|
import { cloneLocale, setLocaleProperty } from "../plugins/locale/index.js";
|
|
3
|
-
|
|
3
|
+
// src/locales/ar-tn.ts
|
|
4
4
|
/**
|
|
5
5
|
* Arabic (Tunisia) [ar-TN]
|
|
6
6
|
*/
|
|
@@ -21,5 +21,4 @@ setLocaleProperty(localeArTn, "weekStart", 1);
|
|
|
21
21
|
setLocaleProperty(localeArTn, "yearStart", 4);
|
|
22
22
|
setLocaleProperty(localeArTn, "formats", formats);
|
|
23
23
|
setLocaleProperty(localeArTn, "calendar", calendar);
|
|
24
|
-
//#endregion
|
|
25
24
|
export { localeArTn as default };
|
package/locales/ar.d.ts
CHANGED
package/locales/ar.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locales/ar.ts
|
|
2
2
|
const arabicToEnglishNumbersMap = {
|
|
3
3
|
"١": "1",
|
|
4
4
|
"٢": "2",
|
|
@@ -193,5 +193,4 @@ const locale = {
|
|
|
193
193
|
preParse: (dateString) => dateString.replace(/[١٢٣٤٥٦٧٨٩٠]/g, (match) => arabicToEnglishNumbersMap[match]).replace(/،/g, ","),
|
|
194
194
|
postFormat: (formattedDate) => formattedDate.replace(/\d/g, (match) => englishToArabicNumbersMap[Number(match)]).replace(/,/g, "،")
|
|
195
195
|
};
|
|
196
|
-
//#endregion
|
|
197
196
|
export { locale as default };
|