esday 0.5.0 → 0.6.3
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 +37 -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/chunks/CXWzCl3n.js +481 -0
- 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.ts +3 -3
- package/index.js +1 -571
- package/locales/af.d.ts +1 -3
- package/locales/af.js +4 -2
- package/locales/am.d.ts +1 -3
- package/locales/am.js +4 -2
- package/locales/ar-dz.d.ts +1 -3
- package/locales/ar-dz.js +7 -9
- package/locales/ar-iq.d.ts +1 -3
- package/locales/ar-iq.js +7 -9
- package/locales/ar-kw.d.ts +1 -3
- package/locales/ar-kw.js +7 -9
- package/locales/ar-ly.d.ts +1 -3
- package/locales/ar-ly.js +7 -9
- package/locales/ar-ma.d.ts +1 -3
- package/locales/ar-ma.js +7 -9
- package/locales/ar-sa.d.ts +1 -3
- package/locales/ar-sa.js +7 -9
- package/locales/ar-tn.d.ts +1 -3
- package/locales/ar-tn.js +7 -9
- package/locales/ar.d.ts +1 -3
- package/locales/ar.js +197 -2
- package/locales/az.d.ts +1 -3
- package/locales/az.js +4 -2
- package/locales/be.d.ts +1 -3
- package/locales/be.js +55 -59
- package/locales/bg.d.ts +1 -3
- package/locales/bg.js +4 -2
- package/locales/bi.d.ts +1 -3
- package/locales/bi.js +4 -2
- package/locales/bm.d.ts +1 -3
- package/locales/bm.js +4 -2
- package/locales/bn-bd.d.ts +1 -3
- package/locales/bn-bd.js +7 -9
- package/locales/bn.d.ts +1 -3
- package/locales/bn.js +136 -2
- package/locales/bo.d.ts +1 -3
- package/locales/bo.js +4 -2
- package/locales/br.d.ts +1 -3
- package/locales/br.js +10 -9
- package/locales/bs.d.ts +1 -3
- package/locales/bs.js +4 -2
- package/locales/ca.d.ts +1 -3
- package/locales/ca.js +35 -36
- package/locales/cs.d.ts +1 -3
- package/locales/cs.js +38 -34
- package/locales/cv.d.ts +1 -3
- package/locales/cv.js +4 -2
- package/locales/cy.d.ts +1 -3
- package/locales/cy.js +4 -2
- package/locales/da.d.ts +1 -3
- package/locales/da.js +4 -2
- package/locales/de-at.d.ts +1 -3
- package/locales/de-at.js +7 -9
- package/locales/de-ch.d.ts +1 -3
- package/locales/de-ch.js +7 -9
- package/locales/de.d.ts +1 -3
- package/locales/de.js +130 -2
- package/locales/dv.d.ts +1 -3
- package/locales/dv.js +4 -2
- package/locales/el.d.ts +1 -3
- package/locales/el.js +4 -2
- package/locales/en-au.d.ts +1 -3
- package/locales/en-au.js +7 -8
- package/locales/en-ca.d.ts +1 -3
- package/locales/en-ca.js +7 -8
- package/locales/en-gb.d.ts +1 -3
- package/locales/en-gb.js +9 -8
- package/locales/en-ie.d.ts +1 -3
- package/locales/en-ie.js +7 -8
- package/locales/en-il.d.ts +1 -3
- package/locales/en-il.js +7 -8
- package/locales/en-in.d.ts +1 -3
- package/locales/en-in.js +7 -8
- package/locales/en-nz.d.ts +1 -3
- package/locales/en-nz.js +7 -8
- package/locales/en-sg.d.ts +1 -3
- package/locales/en-sg.js +7 -8
- package/locales/en-tt.d.ts +1 -3
- package/locales/en-tt.js +7 -8
- package/locales/en-us.d.ts +1 -3
- package/locales/en-us.js +7 -8
- package/locales/en.d.ts +1 -3
- package/locales/en.js +116 -2
- package/locales/eo.d.ts +1 -3
- package/locales/eo.js +4 -2
- package/locales/es-do.d.ts +1 -3
- package/locales/es-do.js +7 -9
- package/locales/es-mx.d.ts +1 -3
- package/locales/es-mx.js +7 -9
- package/locales/es-pr.d.ts +1 -3
- package/locales/es-pr.js +7 -9
- package/locales/es-us.d.ts +1 -3
- package/locales/es-us.js +7 -9
- package/locales/es.d.ts +1 -3
- package/locales/es.js +117 -2
- package/locales/et.d.ts +1 -3
- package/locales/et.js +6 -2
- package/locales/eu.d.ts +1 -3
- package/locales/eu.js +4 -2
- package/locales/fa.d.ts +1 -3
- package/locales/fa.js +4 -2
- package/locales/fi.d.ts +1 -3
- package/locales/fi.js +8 -2
- package/locales/fil.d.ts +1 -3
- package/locales/fil.js +4 -2
- package/locales/fo.d.ts +1 -3
- package/locales/fo.js +4 -2
- package/locales/fr-ca.d.ts +1 -3
- package/locales/fr-ca.js +7 -9
- package/locales/fr-ch.d.ts +1 -3
- package/locales/fr-ch.js +7 -9
- package/locales/fr.d.ts +1 -3
- package/locales/fr.js +109 -2
- package/locales/fy.d.ts +1 -3
- package/locales/fy.js +4 -2
- package/locales/ga.d.ts +1 -3
- package/locales/ga.js +4 -2
- package/locales/gd.d.ts +1 -3
- package/locales/gd.js +4 -2
- package/locales/gl.d.ts +1 -3
- package/locales/gl.js +4 -2
- package/locales/gom-deva.d.ts +1 -3
- package/locales/gom-deva.js +34 -32
- package/locales/gom-latn.d.ts +1 -3
- package/locales/gom-latn.js +34 -32
- package/locales/gu.d.ts +1 -3
- package/locales/gu.js +4 -2
- package/locales/he.d.ts +1 -3
- package/locales/he.js +8 -5
- package/locales/hi.d.ts +1 -3
- package/locales/hi.js +34 -35
- package/locales/hr.d.ts +1 -3
- package/locales/hr.js +10 -4
- package/locales/ht.d.ts +1 -3
- package/locales/ht.js +4 -2
- package/locales/hu.d.ts +1 -3
- package/locales/hu.js +6 -2
- package/locales/hy-am.d.ts +1 -3
- package/locales/hy-am.js +34 -35
- package/locales/id.d.ts +1 -3
- package/locales/id.js +4 -2
- package/locales/is.d.ts +1 -3
- package/locales/is.js +14 -2
- package/locales/it-ch.d.ts +1 -3
- package/locales/it-ch.js +4 -9
- package/locales/it.d.ts +1 -3
- package/locales/it.js +120 -2
- package/locales/ja.d.ts +1 -4
- package/locales/ja.js +4 -2
- package/locales/jv.d.ts +1 -3
- package/locales/jv.js +4 -2
- package/locales/ka.d.ts +1 -3
- package/locales/ka.js +25 -26
- package/locales/kk.d.ts +1 -3
- package/locales/kk.js +4 -2
- package/locales/km.d.ts +1 -3
- package/locales/km.js +4 -2
- package/locales/kn.d.ts +1 -3
- package/locales/kn.js +4 -2
- package/locales/ko.d.ts +1 -3
- package/locales/ko.js +5 -3
- package/locales/ku.d.ts +1 -3
- package/locales/ku.js +4 -2
- package/locales/ky.d.ts +1 -3
- package/locales/ky.js +4 -2
- package/locales/lb.d.ts +1 -3
- package/locales/lb.js +5 -2
- package/locales/lo.d.ts +1 -3
- package/locales/lo.js +4 -2
- package/locales/lt.d.ts +1 -3
- package/locales/lt.js +4 -2
- package/locales/lv.d.ts +1 -3
- package/locales/lv.js +4 -2
- package/locales/me.d.ts +1 -3
- package/locales/me.js +33 -33
- package/locales/mi.d.ts +1 -3
- package/locales/mi.js +4 -2
- package/locales/mk.d.ts +1 -3
- package/locales/mk.js +4 -2
- package/locales/ml.d.ts +1 -3
- package/locales/ml.js +4 -2
- package/locales/mn.d.ts +1 -3
- package/locales/mn.js +37 -16
- package/locales/mr.d.ts +1 -3
- package/locales/mr.js +16 -2
- package/locales/ms-my.d.ts +1 -3
- package/locales/ms-my.js +7 -9
- package/locales/ms.d.ts +1 -3
- package/locales/ms.js +107 -2
- package/locales/mt.d.ts +1 -3
- package/locales/mt.js +4 -2
- package/locales/my.d.ts +1 -3
- package/locales/my.js +4 -2
- package/locales/nb.d.ts +1 -3
- package/locales/nb.js +4 -2
- package/locales/ne.d.ts +1 -3
- package/locales/ne.js +4 -2
- package/locales/nl-be.d.ts +1 -3
- package/locales/nl-be.js +7 -9
- package/locales/nl.d.ts +1 -3
- package/locales/nl.js +107 -2
- package/locales/nn.d.ts +1 -3
- package/locales/nn.js +4 -2
- package/locales/oc-lnc.d.ts +1 -3
- package/locales/oc-lnc.js +35 -36
- package/locales/pa-in.d.ts +1 -3
- package/locales/pa-in.js +4 -2
- package/locales/pl.d.ts +1 -3
- package/locales/pl.js +5 -2
- package/locales/pt-br.d.ts +1 -3
- package/locales/pt-br.js +7 -9
- package/locales/pt.d.ts +1 -3
- package/locales/pt.js +109 -2
- package/locales/rn.d.ts +1 -3
- package/locales/rn.js +4 -2
- package/locales/ro.d.ts +1 -3
- package/locales/ro.js +4 -2
- package/locales/ru.d.ts +1 -4
- package/locales/ru.js +83 -82
- package/locales/rw.d.ts +1 -3
- package/locales/rw.js +4 -2
- package/locales/sd.d.ts +1 -3
- package/locales/sd.js +4 -2
- package/locales/se.d.ts +1 -3
- package/locales/se.js +4 -2
- package/locales/si.d.ts +1 -3
- package/locales/si.js +4 -2
- package/locales/sk.d.ts +1 -3
- package/locales/sk.js +8 -2
- package/locales/sl.d.ts +1 -3
- package/locales/sl.js +8 -2
- package/locales/sq.d.ts +1 -3
- package/locales/sq.js +4 -2
- package/locales/sr-cyrl.d.ts +1 -3
- package/locales/sr-cyrl.js +16 -15
- package/locales/sr.d.ts +1 -3
- package/locales/sr.js +185 -2
- package/locales/ss.d.ts +1 -3
- package/locales/ss.js +4 -2
- package/locales/sv-fi.d.ts +1 -3
- package/locales/sv-fi.js +7 -9
- package/locales/sv.d.ts +1 -3
- package/locales/sv.js +110 -2
- package/locales/sw.d.ts +1 -3
- package/locales/sw.js +4 -2
- package/locales/ta.d.ts +1 -3
- package/locales/ta.js +4 -2
- package/locales/te.d.ts +1 -3
- package/locales/te.js +4 -2
- package/locales/tet.d.ts +1 -3
- package/locales/tet.js +5 -4
- package/locales/tg.d.ts +1 -3
- package/locales/tg.js +34 -35
- package/locales/th.d.ts +1 -3
- package/locales/th.js +4 -2
- package/locales/tk.d.ts +1 -3
- package/locales/tk.js +5 -4
- package/locales/tl-ph.d.ts +1 -3
- package/locales/tl-ph.js +4 -2
- package/locales/tlh.d.ts +1 -3
- package/locales/tlh.js +5 -2
- package/locales/tr.d.ts +1 -3
- package/locales/tr.js +5 -4
- package/locales/tzl.d.ts +1 -3
- package/locales/tzl.js +4 -2
- package/locales/tzm-latn.d.ts +1 -3
- package/locales/tzm-latn.js +9 -9
- package/locales/tzm.d.ts +1 -3
- package/locales/tzm.js +107 -2
- package/locales/ug-cn.d.ts +1 -3
- package/locales/ug-cn.js +4 -2
- package/locales/uk.d.ts +1 -3
- package/locales/uk.js +37 -32
- package/locales/ur.d.ts +1 -3
- package/locales/ur.js +4 -2
- package/locales/uz-latn.d.ts +1 -3
- package/locales/uz-latn.js +9 -9
- package/locales/uz.d.ts +1 -3
- package/locales/uz.js +107 -2
- package/locales/vi.d.ts +1 -3
- package/locales/vi.js +4 -2
- package/locales/x-pseudo.d.ts +1 -3
- package/locales/x-pseudo.js +5 -4
- package/locales/yo.d.ts +1 -3
- package/locales/yo.js +4 -2
- package/locales/zh-cn.d.ts +1 -3
- package/locales/zh-cn.js +7 -9
- package/locales/zh-hk.d.ts +1 -3
- package/locales/zh-hk.js +7 -9
- package/locales/zh-mo.d.ts +1 -3
- package/locales/zh-mo.js +7 -9
- package/locales/zh-tw.d.ts +1 -3
- package/locales/zh-tw.js +7 -9
- package/locales/zh.d.ts +1 -4
- package/locales/zh.js +128 -2
- package/package.json +29 -23
- package/plugins/advancedFormat/index.d.ts +1 -3
- package/plugins/advancedFormat/index.js +4 -6
- package/plugins/advancedParse/index.d.ts +1 -3
- package/plugins/advancedParse/index.js +21 -20
- package/plugins/calendar/index.d.ts +2 -4
- 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 +78 -0
- package/plugins/duration/index.js +477 -0
- package/plugins/isBetween/index.d.ts +1 -2
- package/plugins/isBetween/index.js +2 -3
- 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 -3
- package/plugins/isTomorrow/index.d.ts +1 -2
- package/plugins/isTomorrow/index.js +2 -3
- package/plugins/isYesterday/index.d.ts +1 -2
- package/plugins/isYesterday/index.js +2 -3
- package/plugins/isoWeek/index.d.ts +1 -3
- package/plugins/isoWeek/index.js +13 -25
- package/plugins/locale/index.d.ts +103 -3
- package/plugins/locale/index.js +140 -6
- package/plugins/localeData/index.d.ts +1 -3
- package/plugins/localeData/index.js +18 -11
- package/plugins/localizedFormat/index.d.ts +1 -3
- package/plugins/localizedFormat/index.js +5 -10
- package/plugins/localizedParse/index.d.ts +1 -3
- package/plugins/localizedParse/index.js +40 -22
- package/plugins/minMax/index.d.ts +1 -2
- package/plugins/minMax/index.js +2 -3
- package/plugins/objectSupport/index.d.ts +1 -3
- package/plugins/objectSupport/index.js +33 -38
- package/plugins/pluralGetSet/index.d.ts +1 -3
- package/plugins/pluralGetSet/index.js +1 -2
- package/plugins/quarterOfYear/index.d.ts +1 -3
- package/plugins/quarterOfYear/index.js +11 -18
- package/plugins/relativeTime/index.d.ts +32 -44
- package/plugins/relativeTime/index.js +124 -91
- package/plugins/timezone/index.d.ts +6 -0
- package/plugins/timezone/index.js +456 -0
- 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 +1 -2
- package/plugins/utc/index.js +37 -39
- package/plugins/week/index.d.ts +1 -3
- package/plugins/week/index.js +17 -27
- package/chunks/B5f9poqo.js +0 -120
- package/chunks/BDssPbM_.js +0 -106
- package/chunks/BXRGSAJG.js +0 -128
- package/chunks/BeVgU2nj.js +0 -188
- package/chunks/BtmEtAW3.js +0 -43
- package/chunks/CQ57zhVp.js +0 -106
- package/chunks/CQJ0-ZuR.js +0 -106
- package/chunks/CWqzr5E5.js +0 -108
- package/chunks/Cg4ZI9v8.js +0 -180
- package/chunks/CoBtJ4c1.js +0 -144
- package/chunks/D009Z-ld.js +0 -109
- package/chunks/DMtTiWuY.js +0 -127
- package/chunks/Dixb5KKs.js +0 -116
- package/chunks/DjY7KvwG.js +0 -28
- package/chunks/GjKpN6U-.js +0 -135
- package/chunks/St35qgL0.d.ts +0 -103
- package/chunks/br7kModF.js +0 -110
- package/chunks/l2Rxo2H0.js +0 -106
- package/chunks/tfkJ5D3p.js +0 -115
package/plugins/week/index.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { EsDayPlugin } from "../../chunks/
|
|
2
|
-
import "../../chunks/MtjcOKi-.js";
|
|
1
|
+
import { o as EsDayPlugin } from "../../chunks/CODi8AFH.js";
|
|
3
2
|
|
|
4
3
|
//#region src/plugins/week/index.d.ts
|
|
5
|
-
|
|
6
4
|
declare module 'esday' {
|
|
7
5
|
interface EsDay {
|
|
8
6
|
week(): number;
|
package/plugins/week/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { constants_default } from "../../chunks/
|
|
2
|
-
import {
|
|
3
|
-
import { normalizeUnitWithPlurals } from "../../chunks/
|
|
4
|
-
import { createInstanceFromExist } from "../../chunks/
|
|
5
|
-
import { padStart } from "../../chunks/
|
|
1
|
+
import { p as constants_default } from "../../chunks/BkjWOpMU.js";
|
|
2
|
+
import { a as isUndefined, r as isObject, t as isArray } from "../../chunks/v_QBn7Xm.js";
|
|
3
|
+
import { n as normalizeUnitWithPlurals } from "../../chunks/AyQQ6US-.js";
|
|
4
|
+
import { t as createInstanceFromExist } from "../../chunks/Shk32pTP.js";
|
|
5
|
+
import { n as padStart } from "../../chunks/CdvTtmWL.js";
|
|
6
6
|
|
|
7
7
|
//#region src/plugins/week/index.ts
|
|
8
8
|
const match1to2NoLeadingZero = /^[1-9]\d?/;
|
|
@@ -56,8 +56,7 @@ function addDayOfWeek(property, esday) {
|
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
58
|
function parseTwoDigitYear(input) {
|
|
59
|
-
const
|
|
60
|
-
const year = +inputLimited;
|
|
59
|
+
const year = +input.slice(0, 2);
|
|
61
60
|
return year + (year > 68 ? 1900 : 2e3);
|
|
62
61
|
}
|
|
63
62
|
/**
|
|
@@ -84,8 +83,7 @@ const weekPlugin = (_, dayClass, dayFactory) => {
|
|
|
84
83
|
if (!(Number.isNaN(parsedDate.valueOf()) || isUndefined(parsedElements.week)) && isUndefined(parsedElements.date)) {
|
|
85
84
|
const newEsday = createInstanceFromExist(parsedDate, this);
|
|
86
85
|
const parsedWeek = parsedElements.week;
|
|
87
|
-
|
|
88
|
-
modifiedDate = modifiedEsday.toDate();
|
|
86
|
+
modifiedDate = newEsday.week(parsedWeek).weekday(0).toDate();
|
|
89
87
|
}
|
|
90
88
|
return modifiedDate;
|
|
91
89
|
}
|
|
@@ -108,8 +106,7 @@ const weekPlugin = (_, dayClass, dayFactory) => {
|
|
|
108
106
|
const now = /* @__PURE__ */ new Date();
|
|
109
107
|
newEsday = newEsday.month(now.getMonth()).date(now.getDate());
|
|
110
108
|
}
|
|
111
|
-
|
|
112
|
-
modifiedDate = modifiedEsday.toDate();
|
|
109
|
+
modifiedDate = newEsday.weekday(newWeekday).toDate();
|
|
113
110
|
}
|
|
114
111
|
return modifiedDate;
|
|
115
112
|
}
|
|
@@ -146,6 +143,7 @@ const weekPlugin = (_, dayClass, dayFactory) => {
|
|
|
146
143
|
*/
|
|
147
144
|
function _postParseYear(parsedDate, parsedElements) {
|
|
148
145
|
let modifiedDate = parsedDate;
|
|
146
|
+
/* istanbul ignore else -- @preserve */
|
|
149
147
|
if (!(Number.isNaN(parsedDate.valueOf()) || isUndefined(parsedElements.weekYear))) {
|
|
150
148
|
const newEsday = createInstanceFromExist(parsedDate, this);
|
|
151
149
|
const parsedWeekYear = parsedElements.weekYear;
|
|
@@ -154,10 +152,7 @@ const weekPlugin = (_, dayClass, dayFactory) => {
|
|
|
154
152
|
let modifiedEsday = newEsday.weekYear(parsedWeekYear);
|
|
155
153
|
modifiedEsday = modifiedEsday.year(parsedWeekYear).month(now.getMonth()).date(now.getDate()).weekday(0);
|
|
156
154
|
modifiedDate = modifiedEsday.toDate();
|
|
157
|
-
} else if (!isUndefined(parsedElements.week))
|
|
158
|
-
const modifiedEsday = newEsday.weekYear(parsedWeekYear);
|
|
159
|
-
modifiedDate = modifiedEsday.toDate();
|
|
160
|
-
}
|
|
155
|
+
} else if (!isUndefined(parsedElements.week)) modifiedDate = newEsday.weekYear(parsedWeekYear).toDate();
|
|
161
156
|
}
|
|
162
157
|
return modifiedDate;
|
|
163
158
|
}
|
|
@@ -176,8 +171,7 @@ const weekPlugin = (_, dayClass, dayFactory) => {
|
|
|
176
171
|
const thisEndOfWeek = this.endOf(constants_default.WEEK);
|
|
177
172
|
if (nextYearStartDay.isBefore(thisEndOfWeek)) return 1;
|
|
178
173
|
}
|
|
179
|
-
const
|
|
180
|
-
const yearStartWeek = yearStartDay.startOf(constants_default.WEEK).subtract(1, constants_default.MS);
|
|
174
|
+
const yearStartWeek = this.startOf(constants_default.YEAR).date(yearStart).startOf(constants_default.WEEK).subtract(1, constants_default.MS);
|
|
181
175
|
const diffInWeek = this.diff(yearStartWeek, constants_default.WEEK, true);
|
|
182
176
|
if (diffInWeek < 0) return this.startOf(constants_default.WEEK).week();
|
|
183
177
|
return Math.ceil(diffInWeek);
|
|
@@ -276,26 +270,23 @@ const weekPlugin = (_, dayClass, dayFactory) => {
|
|
|
276
270
|
};
|
|
277
271
|
const oldGet = proto.get;
|
|
278
272
|
proto.get = function(unit) {
|
|
279
|
-
|
|
280
|
-
if (normalizedUnit === constants_default.WEEK) return this.week();
|
|
273
|
+
if (normalizeUnitWithPlurals(unit) === constants_default.WEEK) return this.week();
|
|
281
274
|
return oldGet.call(this, unit);
|
|
282
275
|
};
|
|
283
276
|
const old$set = proto["$set"];
|
|
284
277
|
proto["$set"] = function(unit, values) {
|
|
285
|
-
if (isObject(unit)) return this
|
|
286
|
-
|
|
287
|
-
if (normalizedUnit === constants_default.WEEK) return this.week(values[0]);
|
|
278
|
+
if (isObject(unit)) return this;
|
|
279
|
+
if (normalizeUnitWithPlurals(unit) === constants_default.WEEK) return this.week(values[0]);
|
|
288
280
|
return old$set.call(this, unit, values);
|
|
289
281
|
};
|
|
290
|
-
|
|
282
|
+
dayFactory.addFormatTokenDefinitions({
|
|
291
283
|
w: (sourceDate) => sourceDate.week().toString(),
|
|
292
284
|
ww: (sourceDate) => padStart(sourceDate.week(), 2, "0"),
|
|
293
285
|
wo: (sourceDate) => toOrdinal(sourceDate, sourceDate.week()),
|
|
294
286
|
e: (sourceDate) => sourceDate.weekday().toString(),
|
|
295
287
|
gg: (sourceDate) => padStart(sourceDate.weekYear(), 2, "0").slice(-2),
|
|
296
288
|
gggg: (sourceDate) => padStart(sourceDate.weekYear(), 4, "0")
|
|
297
|
-
};
|
|
298
|
-
dayFactory.addFormatTokenDefinitions(additionalTokens);
|
|
289
|
+
});
|
|
299
290
|
const parseTokensDefinitions = {
|
|
300
291
|
d: [
|
|
301
292
|
match1to2,
|
|
@@ -354,7 +345,6 @@ const weekPlugin = (_, dayClass, dayFactory) => {
|
|
|
354
345
|
};
|
|
355
346
|
dayFactory.addParseTokenDefinitions?.(parseTokensDefinitions);
|
|
356
347
|
};
|
|
357
|
-
var week_default = weekPlugin;
|
|
358
348
|
|
|
359
349
|
//#endregion
|
|
360
|
-
export {
|
|
350
|
+
export { weekPlugin as default };
|
package/chunks/B5f9poqo.js
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
//#region src/locales/it.ts
|
|
2
|
-
const calendar = {
|
|
3
|
-
sameDay() {
|
|
4
|
-
return `[Oggi a${this.hour() > 1 ? "lle " : this.hour() === 0 ? " " : "ll'"}]LT`;
|
|
5
|
-
},
|
|
6
|
-
nextDay() {
|
|
7
|
-
return `[Domani a${this.hour() > 1 ? "lle " : this.hour() === 0 ? " " : "ll'"}]LT`;
|
|
8
|
-
},
|
|
9
|
-
nextWeek() {
|
|
10
|
-
return `dddd [a${this.hour() > 1 ? "lle " : this.hour() === 0 ? " " : "ll'"}]LT`;
|
|
11
|
-
},
|
|
12
|
-
lastDay() {
|
|
13
|
-
return `[Ieri a${this.hour() > 1 ? "lle " : this.hour() === 0 ? " " : "ll'"}]LT`;
|
|
14
|
-
},
|
|
15
|
-
lastWeek() {
|
|
16
|
-
switch (this.day()) {
|
|
17
|
-
case 0: return `[La scorsa] dddd [a${this.hour() > 1 ? "lle " : this.hour() === 0 ? " " : "ll'"}]LT`;
|
|
18
|
-
default: return `[Lo scorso] dddd [a${this.hour() > 1 ? "lle " : this.hour() === 0 ? " " : "ll'"}]LT`;
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
sameElse: "L"
|
|
22
|
-
};
|
|
23
|
-
const localeIt = {
|
|
24
|
-
name: "it",
|
|
25
|
-
weekdays: [
|
|
26
|
-
"domenica",
|
|
27
|
-
"lunedì",
|
|
28
|
-
"martedì",
|
|
29
|
-
"mercoledì",
|
|
30
|
-
"giovedì",
|
|
31
|
-
"venerdì",
|
|
32
|
-
"sabato"
|
|
33
|
-
],
|
|
34
|
-
weekdaysShort: [
|
|
35
|
-
"dom",
|
|
36
|
-
"lun",
|
|
37
|
-
"mar",
|
|
38
|
-
"mer",
|
|
39
|
-
"gio",
|
|
40
|
-
"ven",
|
|
41
|
-
"sab"
|
|
42
|
-
],
|
|
43
|
-
weekdaysMin: [
|
|
44
|
-
"do",
|
|
45
|
-
"lu",
|
|
46
|
-
"ma",
|
|
47
|
-
"me",
|
|
48
|
-
"gi",
|
|
49
|
-
"ve",
|
|
50
|
-
"sa"
|
|
51
|
-
],
|
|
52
|
-
months: [
|
|
53
|
-
"gennaio",
|
|
54
|
-
"febbraio",
|
|
55
|
-
"marzo",
|
|
56
|
-
"aprile",
|
|
57
|
-
"maggio",
|
|
58
|
-
"giugno",
|
|
59
|
-
"luglio",
|
|
60
|
-
"agosto",
|
|
61
|
-
"settembre",
|
|
62
|
-
"ottobre",
|
|
63
|
-
"novembre",
|
|
64
|
-
"dicembre"
|
|
65
|
-
],
|
|
66
|
-
monthsShort: [
|
|
67
|
-
"gen",
|
|
68
|
-
"feb",
|
|
69
|
-
"mar",
|
|
70
|
-
"apr",
|
|
71
|
-
"mag",
|
|
72
|
-
"giu",
|
|
73
|
-
"lug",
|
|
74
|
-
"ago",
|
|
75
|
-
"set",
|
|
76
|
-
"ott",
|
|
77
|
-
"nov",
|
|
78
|
-
"dic"
|
|
79
|
-
],
|
|
80
|
-
ordinal: (n) => `${n}º`,
|
|
81
|
-
weekStart: 1,
|
|
82
|
-
yearStart: 4,
|
|
83
|
-
formats: {
|
|
84
|
-
LT: "HH:mm",
|
|
85
|
-
LTS: "HH:mm:ss",
|
|
86
|
-
L: "DD/MM/YYYY",
|
|
87
|
-
LL: "D MMMM YYYY",
|
|
88
|
-
LLL: "D MMMM YYYY HH:mm",
|
|
89
|
-
LLLL: "dddd D MMMM YYYY HH:mm",
|
|
90
|
-
l: "DD/MM/YYYY",
|
|
91
|
-
ll: "D MMMM YYYY",
|
|
92
|
-
lll: "D MMMM YYYY HH:mm",
|
|
93
|
-
llll: "dddd D MMMM YYYY HH:mm"
|
|
94
|
-
},
|
|
95
|
-
calendar,
|
|
96
|
-
relativeTime: {
|
|
97
|
-
future: "tra %s",
|
|
98
|
-
past: "%s fa",
|
|
99
|
-
s: "qualche secondo",
|
|
100
|
-
ss: "%d secondi",
|
|
101
|
-
m: "un minuto",
|
|
102
|
-
mm: "%d minuti",
|
|
103
|
-
h: "un' ora",
|
|
104
|
-
hh: "%d ore",
|
|
105
|
-
d: "un giorno",
|
|
106
|
-
dd: "%d giorni",
|
|
107
|
-
M: "un mese",
|
|
108
|
-
MM: "%d mesi",
|
|
109
|
-
y: "un anno",
|
|
110
|
-
yy: "%d anni"
|
|
111
|
-
},
|
|
112
|
-
meridiem: (hour, _minute, isLowercase) => {
|
|
113
|
-
const m = hour < 12 ? "AM" : "PM";
|
|
114
|
-
return isLowercase ? m.toLowerCase() : m;
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
|
-
var it_default = localeIt;
|
|
118
|
-
|
|
119
|
-
//#endregion
|
|
120
|
-
export { it_default };
|
package/chunks/BDssPbM_.js
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
//#region src/locales/nl.ts
|
|
2
|
-
const localeNl = {
|
|
3
|
-
name: "nl",
|
|
4
|
-
weekdays: [
|
|
5
|
-
"zondag",
|
|
6
|
-
"maandag",
|
|
7
|
-
"dinsdag",
|
|
8
|
-
"woensdag",
|
|
9
|
-
"donderdag",
|
|
10
|
-
"vrijdag",
|
|
11
|
-
"zaterdag"
|
|
12
|
-
],
|
|
13
|
-
weekdaysShort: [
|
|
14
|
-
"zo.",
|
|
15
|
-
"ma.",
|
|
16
|
-
"di.",
|
|
17
|
-
"wo.",
|
|
18
|
-
"do.",
|
|
19
|
-
"vr.",
|
|
20
|
-
"za."
|
|
21
|
-
],
|
|
22
|
-
weekdaysMin: [
|
|
23
|
-
"zo",
|
|
24
|
-
"ma",
|
|
25
|
-
"di",
|
|
26
|
-
"wo",
|
|
27
|
-
"do",
|
|
28
|
-
"vr",
|
|
29
|
-
"za"
|
|
30
|
-
],
|
|
31
|
-
months: [
|
|
32
|
-
"januari",
|
|
33
|
-
"februari",
|
|
34
|
-
"maart",
|
|
35
|
-
"april",
|
|
36
|
-
"mei",
|
|
37
|
-
"juni",
|
|
38
|
-
"juli",
|
|
39
|
-
"augustus",
|
|
40
|
-
"september",
|
|
41
|
-
"oktober",
|
|
42
|
-
"november",
|
|
43
|
-
"december"
|
|
44
|
-
],
|
|
45
|
-
monthsShort: [
|
|
46
|
-
"jan",
|
|
47
|
-
"feb",
|
|
48
|
-
"mrt",
|
|
49
|
-
"apr",
|
|
50
|
-
"mei",
|
|
51
|
-
"jun",
|
|
52
|
-
"jul",
|
|
53
|
-
"aug",
|
|
54
|
-
"sep",
|
|
55
|
-
"okt",
|
|
56
|
-
"nov",
|
|
57
|
-
"dec"
|
|
58
|
-
],
|
|
59
|
-
ordinal: (n) => `[${n}${n === 1 || n === 8 || n >= 20 ? "ste" : "de"}]`,
|
|
60
|
-
weekStart: 1,
|
|
61
|
-
yearStart: 4,
|
|
62
|
-
formats: {
|
|
63
|
-
LT: "HH:mm",
|
|
64
|
-
LTS: "HH:mm:ss",
|
|
65
|
-
L: "DD-MM-YYYY",
|
|
66
|
-
LL: "D MMMM YYYY",
|
|
67
|
-
LLL: "D MMMM YYYY HH:mm",
|
|
68
|
-
LLLL: "dddd D MMMM YYYY HH:mm",
|
|
69
|
-
l: "DD-MM-YYYY",
|
|
70
|
-
ll: "D MMMM YYYY",
|
|
71
|
-
lll: "D MMMM YYYY HH:mm",
|
|
72
|
-
llll: "dddd D MMMM YYYY HH:mm"
|
|
73
|
-
},
|
|
74
|
-
calendar: {
|
|
75
|
-
sameDay: "[vandaag om] LT",
|
|
76
|
-
nextDay: "[morgen om] LT",
|
|
77
|
-
nextWeek: "dddd [om] LT",
|
|
78
|
-
lastDay: "[gisteren om] LT",
|
|
79
|
-
lastWeek: "[afgelopen] dddd [om] LT",
|
|
80
|
-
sameElse: "L"
|
|
81
|
-
},
|
|
82
|
-
relativeTime: {
|
|
83
|
-
future: "over %s",
|
|
84
|
-
past: "%s geleden",
|
|
85
|
-
s: "een paar seconden",
|
|
86
|
-
ss: "%d seconden",
|
|
87
|
-
m: "een minuut",
|
|
88
|
-
mm: "%d minuten",
|
|
89
|
-
h: "een uur",
|
|
90
|
-
hh: "%d uur",
|
|
91
|
-
d: "een dag",
|
|
92
|
-
dd: "%d dagen",
|
|
93
|
-
M: "een maand",
|
|
94
|
-
MM: "%d maanden",
|
|
95
|
-
y: "een jaar",
|
|
96
|
-
yy: "%d jaar"
|
|
97
|
-
},
|
|
98
|
-
meridiem: (hour, _minute, isLowercase) => {
|
|
99
|
-
const m = hour < 12 ? "AM" : "PM";
|
|
100
|
-
return isLowercase ? m.toLowerCase() : m;
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
var nl_default = localeNl;
|
|
104
|
-
|
|
105
|
-
//#endregion
|
|
106
|
-
export { nl_default };
|
package/chunks/BXRGSAJG.js
DELETED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
//#region src/locales/zh.ts
|
|
2
|
-
const localeZh = {
|
|
3
|
-
name: "zh",
|
|
4
|
-
weekdays: [
|
|
5
|
-
"星期日",
|
|
6
|
-
"星期一",
|
|
7
|
-
"星期二",
|
|
8
|
-
"星期三",
|
|
9
|
-
"星期四",
|
|
10
|
-
"星期五",
|
|
11
|
-
"星期六"
|
|
12
|
-
],
|
|
13
|
-
weekdaysShort: [
|
|
14
|
-
"周日",
|
|
15
|
-
"周一",
|
|
16
|
-
"周二",
|
|
17
|
-
"周三",
|
|
18
|
-
"周四",
|
|
19
|
-
"周五",
|
|
20
|
-
"周六"
|
|
21
|
-
],
|
|
22
|
-
weekdaysMin: [
|
|
23
|
-
"日",
|
|
24
|
-
"一",
|
|
25
|
-
"二",
|
|
26
|
-
"三",
|
|
27
|
-
"四",
|
|
28
|
-
"五",
|
|
29
|
-
"六"
|
|
30
|
-
],
|
|
31
|
-
months: [
|
|
32
|
-
"一月",
|
|
33
|
-
"二月",
|
|
34
|
-
"三月",
|
|
35
|
-
"四月",
|
|
36
|
-
"五月",
|
|
37
|
-
"六月",
|
|
38
|
-
"七月",
|
|
39
|
-
"八月",
|
|
40
|
-
"九月",
|
|
41
|
-
"十月",
|
|
42
|
-
"十一月",
|
|
43
|
-
"十二月"
|
|
44
|
-
],
|
|
45
|
-
monthsShort: [
|
|
46
|
-
"1月",
|
|
47
|
-
"2月",
|
|
48
|
-
"3月",
|
|
49
|
-
"4月",
|
|
50
|
-
"5月",
|
|
51
|
-
"6月",
|
|
52
|
-
"7月",
|
|
53
|
-
"8月",
|
|
54
|
-
"9月",
|
|
55
|
-
"10月",
|
|
56
|
-
"11月",
|
|
57
|
-
"12月"
|
|
58
|
-
],
|
|
59
|
-
ordinal: (number, period) => {
|
|
60
|
-
const p = period ?? "";
|
|
61
|
-
switch (p) {
|
|
62
|
-
case "d":
|
|
63
|
-
case "D":
|
|
64
|
-
case "DDD": return `${number}日`;
|
|
65
|
-
case "M": return `${number}月`;
|
|
66
|
-
case "w":
|
|
67
|
-
case "W": return `${number}周`;
|
|
68
|
-
default: return number.toString();
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
weekStart: 1,
|
|
72
|
-
yearStart: 4,
|
|
73
|
-
formats: {
|
|
74
|
-
LT: "HH:mm",
|
|
75
|
-
LTS: "HH:mm:ss",
|
|
76
|
-
L: "YYYY/MM/DD",
|
|
77
|
-
LL: "YYYY年M月D日",
|
|
78
|
-
LLL: "YYYY年M月D日Ah点mm分",
|
|
79
|
-
LLLL: "YYYY年M月D日ddddAh点mm分",
|
|
80
|
-
l: "YYYY/M/D",
|
|
81
|
-
ll: "YYYY年M月D日",
|
|
82
|
-
lll: "YYYY年M月D日 HH:mm",
|
|
83
|
-
llll: "YYYY年M月D日dddd HH:mm"
|
|
84
|
-
},
|
|
85
|
-
calendar: {
|
|
86
|
-
sameDay: "[今天]LT",
|
|
87
|
-
nextDay: "[明天]LT",
|
|
88
|
-
nextWeek(refDate) {
|
|
89
|
-
if (refDate?.week?.() !== this.week?.()) return "[下]dddLT";
|
|
90
|
-
return "[本]dddLT";
|
|
91
|
-
},
|
|
92
|
-
lastDay: "[昨天]LT",
|
|
93
|
-
lastWeek(refDate) {
|
|
94
|
-
if (this.week?.() !== refDate?.week?.()) return "[上]dddLT";
|
|
95
|
-
return "[本]dddLT";
|
|
96
|
-
},
|
|
97
|
-
sameElse: "L"
|
|
98
|
-
},
|
|
99
|
-
relativeTime: {
|
|
100
|
-
future: "%s后",
|
|
101
|
-
past: "%s前",
|
|
102
|
-
s: "几秒",
|
|
103
|
-
ss: "%d 秒",
|
|
104
|
-
m: "1 分钟",
|
|
105
|
-
mm: "%d 分钟",
|
|
106
|
-
h: "1 小时",
|
|
107
|
-
hh: "%d 小时",
|
|
108
|
-
d: "1 天",
|
|
109
|
-
dd: "%d 天",
|
|
110
|
-
M: "1 个月",
|
|
111
|
-
MM: "%d 个月",
|
|
112
|
-
y: "1 年",
|
|
113
|
-
yy: "%d 年"
|
|
114
|
-
},
|
|
115
|
-
meridiem: (hour, minute) => {
|
|
116
|
-
const hm = hour * 100 + minute;
|
|
117
|
-
if (hm < 600) return "凌晨";
|
|
118
|
-
if (hm < 900) return "早上";
|
|
119
|
-
if (hm < 1100) return "上午";
|
|
120
|
-
if (hm < 1300) return "中午";
|
|
121
|
-
if (hm < 1800) return "下午";
|
|
122
|
-
return "晚上";
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
var zh_default = localeZh;
|
|
126
|
-
|
|
127
|
-
//#endregion
|
|
128
|
-
export { zh_default };
|
package/chunks/BeVgU2nj.js
DELETED
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
//#region src/locales/ar.ts
|
|
2
|
-
const arabicToEnglishNumbersMap = {
|
|
3
|
-
"١": "1",
|
|
4
|
-
"٢": "2",
|
|
5
|
-
"٣": "3",
|
|
6
|
-
"٤": "4",
|
|
7
|
-
"٥": "5",
|
|
8
|
-
"٦": "6",
|
|
9
|
-
"٧": "7",
|
|
10
|
-
"٨": "8",
|
|
11
|
-
"٩": "9",
|
|
12
|
-
"٠": "0"
|
|
13
|
-
};
|
|
14
|
-
const englishToArabicNumbersMap = {
|
|
15
|
-
1: "١",
|
|
16
|
-
2: "٢",
|
|
17
|
-
3: "٣",
|
|
18
|
-
4: "٤",
|
|
19
|
-
5: "٥",
|
|
20
|
-
6: "٦",
|
|
21
|
-
7: "٧",
|
|
22
|
-
8: "٨",
|
|
23
|
-
9: "٩",
|
|
24
|
-
0: "٠"
|
|
25
|
-
};
|
|
26
|
-
const pluralForm = (value) => value === 0 ? 0 : value === 1 ? 1 : value === 2 ? 2 : value % 100 >= 3 && value % 100 <= 10 ? 3 : value % 100 >= 11 ? 4 : 5;
|
|
27
|
-
const plurals = {
|
|
28
|
-
s: [
|
|
29
|
-
"أقل من ثانية",
|
|
30
|
-
"ثانية واحدة",
|
|
31
|
-
["ثانيتان", "ثانيتين"],
|
|
32
|
-
"%d ثوان",
|
|
33
|
-
"%d ثانية",
|
|
34
|
-
"%d ثانية"
|
|
35
|
-
],
|
|
36
|
-
m: [
|
|
37
|
-
"أقل من دقيقة",
|
|
38
|
-
"دقيقة واحدة",
|
|
39
|
-
["دقيقتان", "دقيقتين"],
|
|
40
|
-
"%d دقائق",
|
|
41
|
-
"%d دقيقة",
|
|
42
|
-
"%d دقيقة"
|
|
43
|
-
],
|
|
44
|
-
h: [
|
|
45
|
-
"أقل من ساعة",
|
|
46
|
-
"ساعة واحدة",
|
|
47
|
-
["ساعتان", "ساعتين"],
|
|
48
|
-
"%d ساعات",
|
|
49
|
-
"%d ساعة",
|
|
50
|
-
"%d ساعة"
|
|
51
|
-
],
|
|
52
|
-
d: [
|
|
53
|
-
"أقل من يوم",
|
|
54
|
-
"يوم واحد",
|
|
55
|
-
["يومان", "يومين"],
|
|
56
|
-
"%d أيام",
|
|
57
|
-
"%d يومًا",
|
|
58
|
-
"%d يوم"
|
|
59
|
-
],
|
|
60
|
-
M: [
|
|
61
|
-
"أقل من شهر",
|
|
62
|
-
"شهر واحد",
|
|
63
|
-
["شهران", "شهرين"],
|
|
64
|
-
"%d أشهر",
|
|
65
|
-
"%d شهرا",
|
|
66
|
-
"%d شهر"
|
|
67
|
-
],
|
|
68
|
-
y: [
|
|
69
|
-
"أقل من عام",
|
|
70
|
-
"عام واحد",
|
|
71
|
-
["عامان", "عامين"],
|
|
72
|
-
"%d أعوام",
|
|
73
|
-
"%d عامًا",
|
|
74
|
-
"%d عام"
|
|
75
|
-
]
|
|
76
|
-
};
|
|
77
|
-
const pluralize = (unit) => (timeValue, withoutSuffix, _token, _isFuture) => {
|
|
78
|
-
const timeValueAsNumber = Number(timeValue);
|
|
79
|
-
const pluralFormToUse = pluralForm(timeValueAsNumber);
|
|
80
|
-
let plural = plurals[unit][pluralForm(timeValueAsNumber)];
|
|
81
|
-
if (pluralFormToUse === 2) plural = plural[withoutSuffix ? 0 : 1];
|
|
82
|
-
else plural = plural;
|
|
83
|
-
return plural.replace(/%d/i, `${timeValue}`);
|
|
84
|
-
};
|
|
85
|
-
const locale = {
|
|
86
|
-
name: "ar",
|
|
87
|
-
weekdays: [
|
|
88
|
-
"الأحد",
|
|
89
|
-
"الإثنين",
|
|
90
|
-
"الثلاثاء",
|
|
91
|
-
"الأربعاء",
|
|
92
|
-
"الخميس",
|
|
93
|
-
"الجمعة",
|
|
94
|
-
"السبت"
|
|
95
|
-
],
|
|
96
|
-
weekdaysShort: [
|
|
97
|
-
"أحد",
|
|
98
|
-
"إثنين",
|
|
99
|
-
"ثلاثاء",
|
|
100
|
-
"أربعاء",
|
|
101
|
-
"خميس",
|
|
102
|
-
"جمعة",
|
|
103
|
-
"سبت"
|
|
104
|
-
],
|
|
105
|
-
weekdaysMin: [
|
|
106
|
-
"ح",
|
|
107
|
-
"ن",
|
|
108
|
-
"ث",
|
|
109
|
-
"ر",
|
|
110
|
-
"خ",
|
|
111
|
-
"ج",
|
|
112
|
-
"س"
|
|
113
|
-
],
|
|
114
|
-
months: [
|
|
115
|
-
"يناير",
|
|
116
|
-
"فبراير",
|
|
117
|
-
"مارس",
|
|
118
|
-
"أبريل",
|
|
119
|
-
"مايو",
|
|
120
|
-
"يونيو",
|
|
121
|
-
"يوليو",
|
|
122
|
-
"أغسطس",
|
|
123
|
-
"سبتمبر",
|
|
124
|
-
"أكتوبر",
|
|
125
|
-
"نوفمبر",
|
|
126
|
-
"ديسمبر"
|
|
127
|
-
],
|
|
128
|
-
monthsShort: [
|
|
129
|
-
"يناير",
|
|
130
|
-
"فبراير",
|
|
131
|
-
"مارس",
|
|
132
|
-
"أبريل",
|
|
133
|
-
"مايو",
|
|
134
|
-
"يونيو",
|
|
135
|
-
"يوليو",
|
|
136
|
-
"أغسطس",
|
|
137
|
-
"سبتمبر",
|
|
138
|
-
"أكتوبر",
|
|
139
|
-
"نوفمبر",
|
|
140
|
-
"ديسمبر"
|
|
141
|
-
],
|
|
142
|
-
ordinal: (n) => `${n}`,
|
|
143
|
-
weekStart: 6,
|
|
144
|
-
yearStart: 1,
|
|
145
|
-
formats: {
|
|
146
|
-
LT: "HH:mm",
|
|
147
|
-
LTS: "HH:mm:ss",
|
|
148
|
-
L: "D/M/YYYY",
|
|
149
|
-
LL: "D MMMM YYYY",
|
|
150
|
-
LLL: "D MMMM YYYY HH:mm",
|
|
151
|
-
LLLL: "dddd D MMMM YYYY HH:mm",
|
|
152
|
-
l: "D/M/YYYY",
|
|
153
|
-
ll: "D MMMM YYYY",
|
|
154
|
-
lll: "D MMMM YYYY HH:mm",
|
|
155
|
-
llll: "dddd D MMMM YYYY HH:mm"
|
|
156
|
-
},
|
|
157
|
-
calendar: {
|
|
158
|
-
sameDay: "[اليوم عند الساعة] LT",
|
|
159
|
-
nextDay: "[غدًا عند الساعة] LT",
|
|
160
|
-
nextWeek: "dddd [عند الساعة] LT",
|
|
161
|
-
lastDay: "[أمس عند الساعة] LT",
|
|
162
|
-
lastWeek: "dddd [عند الساعة] LT",
|
|
163
|
-
sameElse: "L"
|
|
164
|
-
},
|
|
165
|
-
relativeTime: {
|
|
166
|
-
future: "بعد %s",
|
|
167
|
-
past: "منذ %s",
|
|
168
|
-
s: pluralize("s"),
|
|
169
|
-
ss: pluralize("s"),
|
|
170
|
-
m: pluralize("m"),
|
|
171
|
-
mm: pluralize("m"),
|
|
172
|
-
h: pluralize("h"),
|
|
173
|
-
hh: pluralize("h"),
|
|
174
|
-
d: pluralize("d"),
|
|
175
|
-
dd: pluralize("d"),
|
|
176
|
-
M: pluralize("M"),
|
|
177
|
-
MM: pluralize("M"),
|
|
178
|
-
y: pluralize("y"),
|
|
179
|
-
yy: pluralize("y")
|
|
180
|
-
},
|
|
181
|
-
meridiem: (hour, _minute, _isLowercase) => hour > 12 ? "م" : "ص",
|
|
182
|
-
preParse: (dateString) => dateString.replace(/[١٢٣٤٥٦٧٨٩٠]/g, (match) => arabicToEnglishNumbersMap[match]).replace(/،/g, ","),
|
|
183
|
-
postFormat: (formattedDate) => formattedDate.replace(/\d/g, (match) => englishToArabicNumbersMap[Number(match)]).replace(/,/g, "،")
|
|
184
|
-
};
|
|
185
|
-
var ar_default = locale;
|
|
186
|
-
|
|
187
|
-
//#endregion
|
|
188
|
-
export { ar_default };
|
package/chunks/BtmEtAW3.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { isArray } from "./Cb5SvF6r.js";
|
|
2
|
-
import { normalizeUnitWithPlurals } from "./DjY7KvwG.js";
|
|
3
|
-
|
|
4
|
-
//#region src/common/date-fields.ts
|
|
5
|
-
const UNIT_FIELD_MAP = {
|
|
6
|
-
year: "FullYear",
|
|
7
|
-
month: "Month",
|
|
8
|
-
date: "Date",
|
|
9
|
-
day: "Day",
|
|
10
|
-
hour: "Hours",
|
|
11
|
-
minute: "Minutes",
|
|
12
|
-
second: "Seconds",
|
|
13
|
-
millisecond: "Milliseconds"
|
|
14
|
-
};
|
|
15
|
-
const prettyUnitsDate = Object.keys(UNIT_FIELD_MAP);
|
|
16
|
-
function unitToField(unit) {
|
|
17
|
-
const p = normalizeUnitWithPlurals(unit);
|
|
18
|
-
return UNIT_FIELD_MAP[p];
|
|
19
|
-
}
|
|
20
|
-
function getUnitInDate(date, unit) {
|
|
21
|
-
const field = unitToField(unit);
|
|
22
|
-
const method = `get${field}`;
|
|
23
|
-
return date[method]();
|
|
24
|
-
}
|
|
25
|
-
function getUnitInDateUTC(date, unit) {
|
|
26
|
-
const field = unitToField(unit);
|
|
27
|
-
return date[`getUTC${field}`]();
|
|
28
|
-
}
|
|
29
|
-
function setUnitInDate(date, unit, value) {
|
|
30
|
-
const field = unitToField(unit);
|
|
31
|
-
const method = `set${field}`;
|
|
32
|
-
date[method](...isArray(value) ? value : [value]);
|
|
33
|
-
return date;
|
|
34
|
-
}
|
|
35
|
-
function setUnitInDateUTC(date, unit, value) {
|
|
36
|
-
const field = unitToField(unit);
|
|
37
|
-
const method = `setUTC${field}`;
|
|
38
|
-
date[method](...isArray(value) ? value : [value]);
|
|
39
|
-
return date;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
//#endregion
|
|
43
|
-
export { getUnitInDate, getUnitInDateUTC, prettyUnitsDate, setUnitInDate, setUnitInDateUTC };
|