easy-three-utils 0.0.336 → 0.0.337
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/cesium/components/index.ts +13 -0
- package/cesium/components/react/Timeline/index.tsx +19 -22
- package/cesium/index.ts +6 -4
- package/cesium/modules/dayjs/.editorconfig +7 -0
- package/cesium/modules/dayjs/CHANGELOG.md +982 -0
- package/cesium/modules/dayjs/LICENSE +21 -0
- package/cesium/modules/dayjs/README.md +180 -0
- package/cesium/modules/dayjs/dayjs.min.js +1 -0
- package/cesium/modules/dayjs/esm/constant.js +25 -0
- package/cesium/modules/dayjs/esm/index.d.ts +429 -0
- package/cesium/modules/dayjs/esm/index.js +541 -0
- package/cesium/modules/dayjs/esm/locale/af.js +39 -0
- package/cesium/modules/dayjs/esm/locale/am.js +40 -0
- package/cesium/modules/dayjs/esm/locale/ar-dz.js +41 -0
- package/cesium/modules/dayjs/esm/locale/ar-iq.js +42 -0
- package/cesium/modules/dayjs/esm/locale/ar-kw.js +41 -0
- package/cesium/modules/dayjs/esm/locale/ar-ly.js +27 -0
- package/cesium/modules/dayjs/esm/locale/ar-ma.js +42 -0
- package/cesium/modules/dayjs/esm/locale/ar-sa.js +41 -0
- package/cesium/modules/dayjs/esm/locale/ar-tn.js +42 -0
- package/cesium/modules/dayjs/esm/locale/ar.js +77 -0
- package/cesium/modules/dayjs/esm/locale/az.js +39 -0
- package/cesium/modules/dayjs/esm/locale/be.js +24 -0
- package/cesium/modules/dayjs/esm/locale/bg.js +55 -0
- package/cesium/modules/dayjs/esm/locale/bi.js +39 -0
- package/cesium/modules/dayjs/esm/locale/bm.js +39 -0
- package/cesium/modules/dayjs/esm/locale/bn-bd.js +81 -0
- package/cesium/modules/dayjs/esm/locale/bn.js +72 -0
- package/cesium/modules/dayjs/esm/locale/bo.js +38 -0
- package/cesium/modules/dayjs/esm/locale/br.js +93 -0
- package/cesium/modules/dayjs/esm/locale/bs.js +24 -0
- package/cesium/modules/dayjs/esm/locale/ca.js +44 -0
- package/cesium/modules/dayjs/esm/locale/cs.js +120 -0
- package/cesium/modules/dayjs/esm/locale/cv.js +24 -0
- package/cesium/modules/dayjs/esm/locale/cy.js +39 -0
- package/cesium/modules/dayjs/esm/locale/da.js +40 -0
- package/cesium/modules/dayjs/esm/locale/de-at.js +63 -0
- package/cesium/modules/dayjs/esm/locale/de-ch.js +63 -0
- package/cesium/modules/dayjs/esm/locale/de.js +64 -0
- package/cesium/modules/dayjs/esm/locale/dv.js +39 -0
- package/cesium/modules/dayjs/esm/locale/el.js +39 -0
- package/cesium/modules/dayjs/esm/locale/en-au.js +41 -0
- package/cesium/modules/dayjs/esm/locale/en-ca.js +38 -0
- package/cesium/modules/dayjs/esm/locale/en-gb.js +42 -0
- package/cesium/modules/dayjs/esm/locale/en-ie.js +39 -0
- package/cesium/modules/dayjs/esm/locale/en-il.js +38 -0
- package/cesium/modules/dayjs/esm/locale/en-in.js +42 -0
- package/cesium/modules/dayjs/esm/locale/en-nz.js +41 -0
- package/cesium/modules/dayjs/esm/locale/en-sg.js +39 -0
- package/cesium/modules/dayjs/esm/locale/en-tt.js +42 -0
- package/cesium/modules/dayjs/esm/locale/en.js +12 -0
- package/cesium/modules/dayjs/esm/locale/eo.js +39 -0
- package/cesium/modules/dayjs/esm/locale/es-do.js +39 -0
- package/cesium/modules/dayjs/esm/locale/es-mx.js +38 -0
- package/cesium/modules/dayjs/esm/locale/es-pr.js +39 -0
- package/cesium/modules/dayjs/esm/locale/es-us.js +38 -0
- package/cesium/modules/dayjs/esm/locale/es.js +39 -0
- package/cesium/modules/dayjs/esm/locale/et.js +65 -0
- package/cesium/modules/dayjs/esm/locale/eu.js +43 -0
- package/cesium/modules/dayjs/esm/locale/fa.js +39 -0
- package/cesium/modules/dayjs/esm/locale/fi.js +88 -0
- package/cesium/modules/dayjs/esm/locale/fo.js +39 -0
- package/cesium/modules/dayjs/esm/locale/fr-ca.js +38 -0
- package/cesium/modules/dayjs/esm/locale/fr-ch.js +39 -0
- package/cesium/modules/dayjs/esm/locale/fr.js +41 -0
- package/cesium/modules/dayjs/esm/locale/fy.js +39 -0
- package/cesium/modules/dayjs/esm/locale/ga.js +39 -0
- package/cesium/modules/dayjs/esm/locale/gd.js +39 -0
- package/cesium/modules/dayjs/esm/locale/gl.js +39 -0
- package/cesium/modules/dayjs/esm/locale/gom-latn.js +25 -0
- package/cesium/modules/dayjs/esm/locale/gu.js +38 -0
- package/cesium/modules/dayjs/esm/locale/he.js +78 -0
- package/cesium/modules/dayjs/esm/locale/hi.js +38 -0
- package/cesium/modules/dayjs/esm/locale/hr.js +53 -0
- package/cesium/modules/dayjs/esm/locale/ht.js +38 -0
- package/cesium/modules/dayjs/esm/locale/hu.js +61 -0
- package/cesium/modules/dayjs/esm/locale/hy-am.js +39 -0
- package/cesium/modules/dayjs/esm/locale/id.js +39 -0
- package/cesium/modules/dayjs/esm/locale/index.d.ts +11 -0
- package/cesium/modules/dayjs/esm/locale/is.js +68 -0
- package/cesium/modules/dayjs/esm/locale/it-ch.js +39 -0
- package/cesium/modules/dayjs/esm/locale/it.js +39 -0
- package/cesium/modules/dayjs/esm/locale/ja.js +45 -0
- package/cesium/modules/dayjs/esm/locale/jv.js +39 -0
- package/cesium/modules/dayjs/esm/locale/ka.js +39 -0
- package/cesium/modules/dayjs/esm/locale/kk.js +39 -0
- package/cesium/modules/dayjs/esm/locale/km.js +39 -0
- package/cesium/modules/dayjs/esm/locale/kn.js +38 -0
- package/cesium/modules/dayjs/esm/locale/ko.js +45 -0
- package/cesium/modules/dayjs/esm/locale/ku.js +77 -0
- package/cesium/modules/dayjs/esm/locale/ky.js +39 -0
- package/cesium/modules/dayjs/esm/locale/lb.js +24 -0
- package/cesium/modules/dayjs/esm/locale/lo.js +38 -0
- package/cesium/modules/dayjs/esm/locale/lt.js +70 -0
- package/cesium/modules/dayjs/esm/locale/lv.js +39 -0
- package/cesium/modules/dayjs/esm/locale/me.js +24 -0
- package/cesium/modules/dayjs/esm/locale/mi.js +39 -0
- package/cesium/modules/dayjs/esm/locale/mk.js +39 -0
- package/cesium/modules/dayjs/esm/locale/ml.js +38 -0
- package/cesium/modules/dayjs/esm/locale/mn.js +38 -0
- package/cesium/modules/dayjs/esm/locale/mr.js +23 -0
- package/cesium/modules/dayjs/esm/locale/ms-my.js +39 -0
- package/cesium/modules/dayjs/esm/locale/ms.js +39 -0
- package/cesium/modules/dayjs/esm/locale/mt.js +39 -0
- package/cesium/modules/dayjs/esm/locale/my.js +39 -0
- package/cesium/modules/dayjs/esm/locale/nb.js +40 -0
- package/cesium/modules/dayjs/esm/locale/ne.js +40 -0
- package/cesium/modules/dayjs/esm/locale/nl-be.js +39 -0
- package/cesium/modules/dayjs/esm/locale/nl.js +40 -0
- package/cesium/modules/dayjs/esm/locale/nn.js +39 -0
- package/cesium/modules/dayjs/esm/locale/oc-lnc.js +39 -0
- package/cesium/modules/dayjs/esm/locale/pa-in.js +38 -0
- package/cesium/modules/dayjs/esm/locale/pl.js +87 -0
- package/cesium/modules/dayjs/esm/locale/pt-br.js +38 -0
- package/cesium/modules/dayjs/esm/locale/pt.js +40 -0
- package/cesium/modules/dayjs/esm/locale/rn.js +39 -0
- package/cesium/modules/dayjs/esm/locale/ro.js +39 -0
- package/cesium/modules/dayjs/esm/locale/ru.js +99 -0
- package/cesium/modules/dayjs/esm/locale/rw.js +35 -0
- package/cesium/modules/dayjs/esm/locale/sd.js +39 -0
- package/cesium/modules/dayjs/esm/locale/se.js +39 -0
- package/cesium/modules/dayjs/esm/locale/si.js +38 -0
- package/cesium/modules/dayjs/esm/locale/sk.js +121 -0
- package/cesium/modules/dayjs/esm/locale/sl.js +141 -0
- package/cesium/modules/dayjs/esm/locale/sq.js +39 -0
- package/cesium/modules/dayjs/esm/locale/sr-cyrl.js +74 -0
- package/cesium/modules/dayjs/esm/locale/sr.js +74 -0
- package/cesium/modules/dayjs/esm/locale/ss.js +39 -0
- package/cesium/modules/dayjs/esm/locale/sv-fi.js +46 -0
- package/cesium/modules/dayjs/esm/locale/sv.js +44 -0
- package/cesium/modules/dayjs/esm/locale/sw.js +39 -0
- package/cesium/modules/dayjs/esm/locale/ta.js +38 -0
- package/cesium/modules/dayjs/esm/locale/te.js +38 -0
- package/cesium/modules/dayjs/esm/locale/tet.js +39 -0
- package/cesium/modules/dayjs/esm/locale/tg.js +39 -0
- package/cesium/modules/dayjs/esm/locale/th.js +38 -0
- package/cesium/modules/dayjs/esm/locale/tk.js +39 -0
- package/cesium/modules/dayjs/esm/locale/tl-ph.js +39 -0
- package/cesium/modules/dayjs/esm/locale/tlh.js +24 -0
- package/cesium/modules/dayjs/esm/locale/tr.js +39 -0
- package/cesium/modules/dayjs/esm/locale/types.d.ts +33 -0
- package/cesium/modules/dayjs/esm/locale/tzl.js +24 -0
- package/cesium/modules/dayjs/esm/locale/tzm-latn.js +39 -0
- package/cesium/modules/dayjs/esm/locale/tzm.js +39 -0
- package/cesium/modules/dayjs/esm/locale/ug-cn.js +39 -0
- package/cesium/modules/dayjs/esm/locale/uk.js +77 -0
- package/cesium/modules/dayjs/esm/locale/ur.js +39 -0
- package/cesium/modules/dayjs/esm/locale/uz-latn.js +39 -0
- package/cesium/modules/dayjs/esm/locale/uz.js +39 -0
- package/cesium/modules/dayjs/esm/locale/vi.js +43 -0
- package/cesium/modules/dayjs/esm/locale/x-pseudo.js +39 -0
- package/cesium/modules/dayjs/esm/locale/yo.js +39 -0
- package/cesium/modules/dayjs/esm/locale/zh-cn.js +67 -0
- package/cesium/modules/dayjs/esm/locale/zh-hk.js +65 -0
- package/cesium/modules/dayjs/esm/locale/zh-tw.js +65 -0
- package/cesium/modules/dayjs/esm/locale/zh.js +67 -0
- package/cesium/modules/dayjs/esm/plugin/advancedFormat/index.d.ts +4 -0
- package/cesium/modules/dayjs/esm/plugin/advancedFormat/index.js +66 -0
- package/cesium/modules/dayjs/esm/plugin/arraySupport/index.d.ts +10 -0
- package/cesium/modules/dayjs/esm/plugin/arraySupport/index.js +33 -0
- package/cesium/modules/dayjs/esm/plugin/badMutable/index.d.ts +4 -0
- package/cesium/modules/dayjs/esm/plugin/badMutable/index.js +61 -0
- package/cesium/modules/dayjs/esm/plugin/bigIntSupport/index.d.ts +11 -0
- package/cesium/modules/dayjs/esm/plugin/bigIntSupport/index.js +32 -0
- package/cesium/modules/dayjs/esm/plugin/buddhistEra/index.d.ts +4 -0
- package/cesium/modules/dayjs/esm/plugin/buddhistEra/index.js +21 -0
- package/cesium/modules/dayjs/esm/plugin/calendar/index.d.ts +10 -0
- package/cesium/modules/dayjs/esm/plugin/calendar/index.js +32 -0
- package/cesium/modules/dayjs/esm/plugin/customParseFormat/index.d.ts +8 -0
- package/cesium/modules/dayjs/esm/plugin/customParseFormat/index.js +333 -0
- package/cesium/modules/dayjs/esm/plugin/dayOfYear/index.d.ts +11 -0
- package/cesium/modules/dayjs/esm/plugin/dayOfYear/index.js +9 -0
- package/cesium/modules/dayjs/esm/plugin/devHelper/index.d.ts +4 -0
- package/cesium/modules/dayjs/esm/plugin/devHelper/index.js +38 -0
- package/cesium/modules/dayjs/esm/plugin/duration/index.d.ts +88 -0
- package/cesium/modules/dayjs/esm/plugin/duration/index.js +356 -0
- package/cesium/modules/dayjs/esm/plugin/isBetween/index.d.ts +10 -0
- package/cesium/modules/dayjs/esm/plugin/isBetween/index.js +10 -0
- package/cesium/modules/dayjs/esm/plugin/isLeapYear/index.d.ts +10 -0
- package/cesium/modules/dayjs/esm/plugin/isLeapYear/index.js +7 -0
- package/cesium/modules/dayjs/esm/plugin/isMoment/index.d.ts +10 -0
- package/cesium/modules/dayjs/esm/plugin/isMoment/index.js +5 -0
- package/cesium/modules/dayjs/esm/plugin/isSameOrAfter/index.d.ts +10 -0
- package/cesium/modules/dayjs/esm/plugin/isSameOrAfter/index.js +5 -0
- package/cesium/modules/dayjs/esm/plugin/isSameOrBefore/index.d.ts +10 -0
- package/cesium/modules/dayjs/esm/plugin/isSameOrBefore/index.js +5 -0
- package/cesium/modules/dayjs/esm/plugin/isToday/index.d.ts +10 -0
- package/cesium/modules/dayjs/esm/plugin/isToday/index.js +9 -0
- package/cesium/modules/dayjs/esm/plugin/isTomorrow/index.d.ts +10 -0
- package/cesium/modules/dayjs/esm/plugin/isTomorrow/index.js +9 -0
- package/cesium/modules/dayjs/esm/plugin/isYesterday/index.d.ts +10 -0
- package/cesium/modules/dayjs/esm/plugin/isYesterday/index.js +9 -0
- package/cesium/modules/dayjs/esm/plugin/isoWeek/index.d.ts +27 -0
- package/cesium/modules/dayjs/esm/plugin/isoWeek/index.js +57 -0
- package/cesium/modules/dayjs/esm/plugin/isoWeeksInYear/index.d.ts +10 -0
- package/cesium/modules/dayjs/esm/plugin/isoWeeksInYear/index.js +15 -0
- package/cesium/modules/dayjs/esm/plugin/localeData/index.d.ts +44 -0
- package/cesium/modules/dayjs/esm/plugin/localeData/index.js +114 -0
- package/cesium/modules/dayjs/esm/plugin/localizedFormat/index.d.ts +4 -0
- package/cesium/modules/dayjs/esm/plugin/localizedFormat/index.js +20 -0
- package/cesium/modules/dayjs/esm/plugin/localizedFormat/utils.js +20 -0
- package/cesium/modules/dayjs/esm/plugin/minMax/index.d.ts +22 -0
- package/cesium/modules/dayjs/esm/plugin/minMax/index.js +39 -0
- package/cesium/modules/dayjs/esm/plugin/negativeYear/index.d.ts +4 -0
- package/cesium/modules/dayjs/esm/plugin/negativeYear/index.js +36 -0
- package/cesium/modules/dayjs/esm/plugin/objectSupport/index.d.ts +48 -0
- package/cesium/modules/dayjs/esm/plugin/objectSupport/index.js +97 -0
- package/cesium/modules/dayjs/esm/plugin/pluralGetSet/index.d.ts +44 -0
- package/cesium/modules/dayjs/esm/plugin/pluralGetSet/index.js +7 -0
- package/cesium/modules/dayjs/esm/plugin/preParsePostFormat/index.d.ts +4 -0
- package/cesium/modules/dayjs/esm/plugin/preParsePostFormat/index.js +40 -0
- package/cesium/modules/dayjs/esm/plugin/quarterOfYear/index.d.ts +26 -0
- package/cesium/modules/dayjs/esm/plugin/quarterOfYear/index.js +41 -0
- package/cesium/modules/dayjs/esm/plugin/relativeTime/index.d.ts +24 -0
- package/cesium/modules/dayjs/esm/plugin/relativeTime/index.js +130 -0
- package/cesium/modules/dayjs/esm/plugin/timezone/index.d.ts +20 -0
- package/cesium/modules/dayjs/esm/plugin/timezone/index.js +198 -0
- package/cesium/modules/dayjs/esm/plugin/toArray/index.d.ts +10 -0
- package/cesium/modules/dayjs/esm/plugin/toArray/index.js +7 -0
- package/cesium/modules/dayjs/esm/plugin/toObject/index.d.ts +20 -0
- package/cesium/modules/dayjs/esm/plugin/toObject/index.js +15 -0
- package/cesium/modules/dayjs/esm/plugin/updateLocale/index.d.ts +8 -0
- package/cesium/modules/dayjs/esm/plugin/updateLocale/index.js +12 -0
- package/cesium/modules/dayjs/esm/plugin/utc/index.d.ts +19 -0
- package/cesium/modules/dayjs/esm/plugin/utc/index.js +188 -0
- package/cesium/modules/dayjs/esm/plugin/weekOfYear/index.d.ts +12 -0
- package/cesium/modules/dayjs/esm/plugin/weekOfYear/index.js +44 -0
- package/cesium/modules/dayjs/esm/plugin/weekYear/index.d.ts +10 -0
- package/cesium/modules/dayjs/esm/plugin/weekYear/index.js +19 -0
- package/cesium/modules/dayjs/esm/plugin/weekday/index.d.ts +12 -0
- package/cesium/modules/dayjs/esm/plugin/weekday/index.js +15 -0
- package/cesium/modules/dayjs/esm/utils.js +58 -0
- package/cesium/modules/dayjs/index.d.ts +429 -0
- package/cesium/modules/dayjs/locale/af.js +1 -0
- package/cesium/modules/dayjs/locale/am.js +1 -0
- package/cesium/modules/dayjs/locale/ar-dz.js +1 -0
- package/cesium/modules/dayjs/locale/ar-iq.js +1 -0
- package/cesium/modules/dayjs/locale/ar-kw.js +1 -0
- package/cesium/modules/dayjs/locale/ar-ly.js +1 -0
- package/cesium/modules/dayjs/locale/ar-ma.js +1 -0
- package/cesium/modules/dayjs/locale/ar-sa.js +1 -0
- package/cesium/modules/dayjs/locale/ar-tn.js +1 -0
- package/cesium/modules/dayjs/locale/ar.js +1 -0
- package/cesium/modules/dayjs/locale/az.js +1 -0
- package/cesium/modules/dayjs/locale/be.js +1 -0
- package/cesium/modules/dayjs/locale/bg.js +1 -0
- package/cesium/modules/dayjs/locale/bi.js +1 -0
- package/cesium/modules/dayjs/locale/bm.js +1 -0
- package/cesium/modules/dayjs/locale/bn-bd.js +1 -0
- package/cesium/modules/dayjs/locale/bn.js +1 -0
- package/cesium/modules/dayjs/locale/bo.js +1 -0
- package/cesium/modules/dayjs/locale/br.js +1 -0
- package/cesium/modules/dayjs/locale/bs.js +1 -0
- package/cesium/modules/dayjs/locale/ca.js +1 -0
- package/cesium/modules/dayjs/locale/cs.js +1 -0
- package/cesium/modules/dayjs/locale/cv.js +1 -0
- package/cesium/modules/dayjs/locale/cy.js +1 -0
- package/cesium/modules/dayjs/locale/da.js +1 -0
- package/cesium/modules/dayjs/locale/de-at.js +1 -0
- package/cesium/modules/dayjs/locale/de-ch.js +1 -0
- package/cesium/modules/dayjs/locale/de.js +1 -0
- package/cesium/modules/dayjs/locale/dv.js +1 -0
- package/cesium/modules/dayjs/locale/el.js +1 -0
- package/cesium/modules/dayjs/locale/en-au.js +1 -0
- package/cesium/modules/dayjs/locale/en-ca.js +1 -0
- package/cesium/modules/dayjs/locale/en-gb.js +1 -0
- package/cesium/modules/dayjs/locale/en-ie.js +1 -0
- package/cesium/modules/dayjs/locale/en-il.js +1 -0
- package/cesium/modules/dayjs/locale/en-in.js +1 -0
- package/cesium/modules/dayjs/locale/en-nz.js +1 -0
- package/cesium/modules/dayjs/locale/en-sg.js +1 -0
- package/cesium/modules/dayjs/locale/en-tt.js +1 -0
- package/cesium/modules/dayjs/locale/en.js +1 -0
- package/cesium/modules/dayjs/locale/eo.js +1 -0
- package/cesium/modules/dayjs/locale/es-do.js +1 -0
- package/cesium/modules/dayjs/locale/es-mx.js +1 -0
- package/cesium/modules/dayjs/locale/es-pr.js +1 -0
- package/cesium/modules/dayjs/locale/es-us.js +1 -0
- package/cesium/modules/dayjs/locale/es.js +1 -0
- package/cesium/modules/dayjs/locale/et.js +1 -0
- package/cesium/modules/dayjs/locale/eu.js +1 -0
- package/cesium/modules/dayjs/locale/fa.js +1 -0
- package/cesium/modules/dayjs/locale/fi.js +1 -0
- package/cesium/modules/dayjs/locale/fo.js +1 -0
- package/cesium/modules/dayjs/locale/fr-ca.js +1 -0
- package/cesium/modules/dayjs/locale/fr-ch.js +1 -0
- package/cesium/modules/dayjs/locale/fr.js +1 -0
- package/cesium/modules/dayjs/locale/fy.js +1 -0
- package/cesium/modules/dayjs/locale/ga.js +1 -0
- package/cesium/modules/dayjs/locale/gd.js +1 -0
- package/cesium/modules/dayjs/locale/gl.js +1 -0
- package/cesium/modules/dayjs/locale/gom-latn.js +1 -0
- package/cesium/modules/dayjs/locale/gu.js +1 -0
- package/cesium/modules/dayjs/locale/he.js +1 -0
- package/cesium/modules/dayjs/locale/hi.js +1 -0
- package/cesium/modules/dayjs/locale/hr.js +1 -0
- package/cesium/modules/dayjs/locale/ht.js +1 -0
- package/cesium/modules/dayjs/locale/hu.js +1 -0
- package/cesium/modules/dayjs/locale/hy-am.js +1 -0
- package/cesium/modules/dayjs/locale/id.js +1 -0
- package/cesium/modules/dayjs/locale/index.d.ts +11 -0
- package/cesium/modules/dayjs/locale/is.js +1 -0
- package/cesium/modules/dayjs/locale/it-ch.js +1 -0
- package/cesium/modules/dayjs/locale/it.js +1 -0
- package/cesium/modules/dayjs/locale/ja.js +1 -0
- package/cesium/modules/dayjs/locale/jv.js +1 -0
- package/cesium/modules/dayjs/locale/ka.js +1 -0
- package/cesium/modules/dayjs/locale/kk.js +1 -0
- package/cesium/modules/dayjs/locale/km.js +1 -0
- package/cesium/modules/dayjs/locale/kn.js +1 -0
- package/cesium/modules/dayjs/locale/ko.js +1 -0
- package/cesium/modules/dayjs/locale/ku.js +1 -0
- package/cesium/modules/dayjs/locale/ky.js +1 -0
- package/cesium/modules/dayjs/locale/lb.js +1 -0
- package/cesium/modules/dayjs/locale/lo.js +1 -0
- package/cesium/modules/dayjs/locale/lt.js +1 -0
- package/cesium/modules/dayjs/locale/lv.js +1 -0
- package/cesium/modules/dayjs/locale/me.js +1 -0
- package/cesium/modules/dayjs/locale/mi.js +1 -0
- package/cesium/modules/dayjs/locale/mk.js +1 -0
- package/cesium/modules/dayjs/locale/ml.js +1 -0
- package/cesium/modules/dayjs/locale/mn.js +1 -0
- package/cesium/modules/dayjs/locale/mr.js +1 -0
- package/cesium/modules/dayjs/locale/ms-my.js +1 -0
- package/cesium/modules/dayjs/locale/ms.js +1 -0
- package/cesium/modules/dayjs/locale/mt.js +1 -0
- package/cesium/modules/dayjs/locale/my.js +1 -0
- package/cesium/modules/dayjs/locale/nb.js +1 -0
- package/cesium/modules/dayjs/locale/ne.js +1 -0
- package/cesium/modules/dayjs/locale/nl-be.js +1 -0
- package/cesium/modules/dayjs/locale/nl.js +1 -0
- package/cesium/modules/dayjs/locale/nn.js +1 -0
- package/cesium/modules/dayjs/locale/oc-lnc.js +1 -0
- package/cesium/modules/dayjs/locale/pa-in.js +1 -0
- package/cesium/modules/dayjs/locale/pl.js +1 -0
- package/cesium/modules/dayjs/locale/pt-br.js +1 -0
- package/cesium/modules/dayjs/locale/pt.js +1 -0
- package/cesium/modules/dayjs/locale/rn.js +1 -0
- package/cesium/modules/dayjs/locale/ro.js +1 -0
- package/cesium/modules/dayjs/locale/ru.js +1 -0
- package/cesium/modules/dayjs/locale/rw.js +1 -0
- package/cesium/modules/dayjs/locale/sd.js +1 -0
- package/cesium/modules/dayjs/locale/se.js +1 -0
- package/cesium/modules/dayjs/locale/si.js +1 -0
- package/cesium/modules/dayjs/locale/sk.js +1 -0
- package/cesium/modules/dayjs/locale/sl.js +1 -0
- package/cesium/modules/dayjs/locale/sq.js +1 -0
- package/cesium/modules/dayjs/locale/sr-cyrl.js +1 -0
- package/cesium/modules/dayjs/locale/sr.js +1 -0
- package/cesium/modules/dayjs/locale/ss.js +1 -0
- package/cesium/modules/dayjs/locale/sv-fi.js +1 -0
- package/cesium/modules/dayjs/locale/sv.js +1 -0
- package/cesium/modules/dayjs/locale/sw.js +1 -0
- package/cesium/modules/dayjs/locale/ta.js +1 -0
- package/cesium/modules/dayjs/locale/te.js +1 -0
- package/cesium/modules/dayjs/locale/tet.js +1 -0
- package/cesium/modules/dayjs/locale/tg.js +1 -0
- package/cesium/modules/dayjs/locale/th.js +1 -0
- package/cesium/modules/dayjs/locale/tk.js +1 -0
- package/cesium/modules/dayjs/locale/tl-ph.js +1 -0
- package/cesium/modules/dayjs/locale/tlh.js +1 -0
- package/cesium/modules/dayjs/locale/tr.js +1 -0
- package/cesium/modules/dayjs/locale/types.d.ts +33 -0
- package/cesium/modules/dayjs/locale/tzl.js +1 -0
- package/cesium/modules/dayjs/locale/tzm-latn.js +1 -0
- package/cesium/modules/dayjs/locale/tzm.js +1 -0
- package/cesium/modules/dayjs/locale/ug-cn.js +1 -0
- package/cesium/modules/dayjs/locale/uk.js +1 -0
- package/cesium/modules/dayjs/locale/ur.js +1 -0
- package/cesium/modules/dayjs/locale/uz-latn.js +1 -0
- package/cesium/modules/dayjs/locale/uz.js +1 -0
- package/cesium/modules/dayjs/locale/vi.js +1 -0
- package/cesium/modules/dayjs/locale/x-pseudo.js +1 -0
- package/cesium/modules/dayjs/locale/yo.js +1 -0
- package/cesium/modules/dayjs/locale/zh-cn.js +1 -0
- package/cesium/modules/dayjs/locale/zh-hk.js +1 -0
- package/cesium/modules/dayjs/locale/zh-tw.js +1 -0
- package/cesium/modules/dayjs/locale/zh.js +1 -0
- package/cesium/modules/dayjs/locale.json +1 -0
- package/cesium/modules/dayjs/package.json +85 -0
- package/cesium/modules/dayjs/plugin/advancedFormat.d.ts +4 -0
- package/cesium/modules/dayjs/plugin/advancedFormat.js +1 -0
- package/cesium/modules/dayjs/plugin/arraySupport.d.ts +10 -0
- package/cesium/modules/dayjs/plugin/arraySupport.js +1 -0
- package/cesium/modules/dayjs/plugin/badMutable.d.ts +4 -0
- package/cesium/modules/dayjs/plugin/badMutable.js +1 -0
- package/cesium/modules/dayjs/plugin/bigIntSupport.d.ts +11 -0
- package/cesium/modules/dayjs/plugin/bigIntSupport.js +1 -0
- package/cesium/modules/dayjs/plugin/buddhistEra.d.ts +4 -0
- package/cesium/modules/dayjs/plugin/buddhistEra.js +1 -0
- package/cesium/modules/dayjs/plugin/calendar.d.ts +10 -0
- package/cesium/modules/dayjs/plugin/calendar.js +1 -0
- package/cesium/modules/dayjs/plugin/customParseFormat.d.ts +8 -0
- package/cesium/modules/dayjs/plugin/customParseFormat.js +1 -0
- package/cesium/modules/dayjs/plugin/dayOfYear.d.ts +11 -0
- package/cesium/modules/dayjs/plugin/dayOfYear.js +1 -0
- package/cesium/modules/dayjs/plugin/devHelper.d.ts +4 -0
- package/cesium/modules/dayjs/plugin/devHelper.js +1 -0
- package/cesium/modules/dayjs/plugin/duration.d.ts +88 -0
- package/cesium/modules/dayjs/plugin/duration.js +1 -0
- package/cesium/modules/dayjs/plugin/isBetween.d.ts +10 -0
- package/cesium/modules/dayjs/plugin/isBetween.js +1 -0
- package/cesium/modules/dayjs/plugin/isLeapYear.d.ts +10 -0
- package/cesium/modules/dayjs/plugin/isLeapYear.js +1 -0
- package/cesium/modules/dayjs/plugin/isMoment.d.ts +10 -0
- package/cesium/modules/dayjs/plugin/isMoment.js +1 -0
- package/cesium/modules/dayjs/plugin/isSameOrAfter.d.ts +10 -0
- package/cesium/modules/dayjs/plugin/isSameOrAfter.js +1 -0
- package/cesium/modules/dayjs/plugin/isSameOrBefore.d.ts +10 -0
- package/cesium/modules/dayjs/plugin/isSameOrBefore.js +1 -0
- package/cesium/modules/dayjs/plugin/isToday.d.ts +10 -0
- package/cesium/modules/dayjs/plugin/isToday.js +1 -0
- package/cesium/modules/dayjs/plugin/isTomorrow.d.ts +10 -0
- package/cesium/modules/dayjs/plugin/isTomorrow.js +1 -0
- package/cesium/modules/dayjs/plugin/isYesterday.d.ts +10 -0
- package/cesium/modules/dayjs/plugin/isYesterday.js +1 -0
- package/cesium/modules/dayjs/plugin/isoWeek.d.ts +27 -0
- package/cesium/modules/dayjs/plugin/isoWeek.js +1 -0
- package/cesium/modules/dayjs/plugin/isoWeeksInYear.d.ts +10 -0
- package/cesium/modules/dayjs/plugin/isoWeeksInYear.js +1 -0
- package/cesium/modules/dayjs/plugin/localeData.d.ts +44 -0
- package/cesium/modules/dayjs/plugin/localeData.js +1 -0
- package/cesium/modules/dayjs/plugin/localizedFormat.d.ts +4 -0
- package/cesium/modules/dayjs/plugin/localizedFormat.js +1 -0
- package/cesium/modules/dayjs/plugin/minMax.d.ts +22 -0
- package/cesium/modules/dayjs/plugin/minMax.js +1 -0
- package/cesium/modules/dayjs/plugin/negativeYear.d.ts +4 -0
- package/cesium/modules/dayjs/plugin/negativeYear.js +1 -0
- package/cesium/modules/dayjs/plugin/objectSupport.d.ts +48 -0
- package/cesium/modules/dayjs/plugin/objectSupport.js +1 -0
- package/cesium/modules/dayjs/plugin/pluralGetSet.d.ts +44 -0
- package/cesium/modules/dayjs/plugin/pluralGetSet.js +1 -0
- package/cesium/modules/dayjs/plugin/preParsePostFormat.d.ts +4 -0
- package/cesium/modules/dayjs/plugin/preParsePostFormat.js +1 -0
- package/cesium/modules/dayjs/plugin/quarterOfYear.d.ts +26 -0
- package/cesium/modules/dayjs/plugin/quarterOfYear.js +1 -0
- package/cesium/modules/dayjs/plugin/relativeTime.d.ts +24 -0
- package/cesium/modules/dayjs/plugin/relativeTime.js +1 -0
- package/cesium/modules/dayjs/plugin/timezone.d.ts +20 -0
- package/cesium/modules/dayjs/plugin/timezone.js +1 -0
- package/cesium/modules/dayjs/plugin/toArray.d.ts +10 -0
- package/cesium/modules/dayjs/plugin/toArray.js +1 -0
- package/cesium/modules/dayjs/plugin/toObject.d.ts +20 -0
- package/cesium/modules/dayjs/plugin/toObject.js +1 -0
- package/cesium/modules/dayjs/plugin/updateLocale.d.ts +8 -0
- package/cesium/modules/dayjs/plugin/updateLocale.js +1 -0
- package/cesium/modules/dayjs/plugin/utc.d.ts +19 -0
- package/cesium/modules/dayjs/plugin/utc.js +1 -0
- package/cesium/modules/dayjs/plugin/weekOfYear.d.ts +12 -0
- package/cesium/modules/dayjs/plugin/weekOfYear.js +1 -0
- package/cesium/modules/dayjs/plugin/weekYear.d.ts +10 -0
- package/cesium/modules/dayjs/plugin/weekYear.js +1 -0
- package/cesium/modules/dayjs/plugin/weekday.d.ts +12 -0
- package/cesium/modules/dayjs/plugin/weekday.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018-present, iamkun
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
English | [简体中文](./docs/zh-cn/README.zh-CN.md) | [日本語](./docs/ja/README-ja.md) | [Português Brasileiro](./docs/pt-br/README-pt-br.md) | [한국어](./docs/ko/README-ko.md) | [Español (España)](./docs/es-es/README-es-es.md) | [Русский](./docs/ru/README-ru.md) | [Türkçe](./docs/tr/README-tr.md) | [සිංහල](./docs/si/README-si.md) | [עברית](./docs/he/README-he.md)
|
|
2
|
+
|
|
3
|
+
<p align="center"><a href="https://day.js.org/" target="_blank" rel="noopener noreferrer"><img width="550"
|
|
4
|
+
src="https://user-images.githubusercontent.com/17680888/39081119-3057bbe2-456e-11e8-862c-646133ad4b43.png"
|
|
5
|
+
alt="Day.js" /></a></p>
|
|
6
|
+
<p align="center">Fast <b>2kB</b> alternative to Moment.js with the same modern API</p>
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://bundlephobia.com/package/dayjs"><img
|
|
9
|
+
src="https://img.shields.io/bundlephobia/minzip/dayjs?style=flat-square&color=%2345cc11"
|
|
10
|
+
alt="Gzip Size"></a>
|
|
11
|
+
<a href="https://www.npmjs.com/package/dayjs"><img src="https://img.shields.io/npm/v/dayjs.svg?style=flat-square&colorB=51C838"
|
|
12
|
+
alt="NPM Version"></a>
|
|
13
|
+
<a href="https://github.com/iamkun/dayjs/actions/workflows/check.yml"><img
|
|
14
|
+
src="https://img.shields.io/github/actions/workflow/status/iamkun/dayjs/check.yml?style=flat-square" alt="Build Status"></a>
|
|
15
|
+
<a href="https://codecov.io/gh/iamkun/dayjs"><img
|
|
16
|
+
src="https://img.shields.io/codecov/c/github/iamkun/dayjs/master.svg?style=flat-square" alt="Codecov"></a>
|
|
17
|
+
<a href="https://github.com/iamkun/dayjs/blob/master/LICENSE"><img
|
|
18
|
+
src="https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square" alt="License"></a>
|
|
19
|
+
<br>
|
|
20
|
+
<a href="https://saucelabs.com/u/dayjs">
|
|
21
|
+
<img width="750" src="https://user-images.githubusercontent.com/17680888/40040137-8e3323a6-584b-11e8-9dba-bbe577ee8a7b.png" alt="Sauce Test Status">
|
|
22
|
+
</a>
|
|
23
|
+
</p>
|
|
24
|
+
|
|
25
|
+
> Day.js is a minimalist JavaScript library that parses, validates, manipulates, and displays dates and times for modern browsers with a largely Moment.js-compatible API. If you use Moment.js, you already know how to use Day.js.
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
dayjs().startOf('month').add(1, 'day').set('year', 2018).format('YYYY-MM-DD HH:mm:ss');
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
* 🕒 Familiar Moment.js API & patterns
|
|
32
|
+
* 💪 Immutable
|
|
33
|
+
* 🔥 Chainable
|
|
34
|
+
* 🌐 I18n support
|
|
35
|
+
* 📦 2kb mini library
|
|
36
|
+
* 👫 All browsers supported
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Getting Started
|
|
41
|
+
|
|
42
|
+
### Documentation
|
|
43
|
+
|
|
44
|
+
You can find more details, API, and other docs on [day.js.org](https://day.js.org/) website.
|
|
45
|
+
|
|
46
|
+
### Installation
|
|
47
|
+
|
|
48
|
+
```console
|
|
49
|
+
npm install dayjs --save
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
📚[Installation Guide](https://day.js.org/docs/en/installation/installation)
|
|
53
|
+
|
|
54
|
+
### API
|
|
55
|
+
|
|
56
|
+
It's easy to use Day.js APIs to parse, validate, manipulate, and display dates and times.
|
|
57
|
+
|
|
58
|
+
```javascript
|
|
59
|
+
dayjs('2018-08-08') // parse
|
|
60
|
+
|
|
61
|
+
dayjs().format('{YYYY} MM-DDTHH:mm:ss SSS [Z] A') // display
|
|
62
|
+
|
|
63
|
+
dayjs().set('month', 3).month() // get & set
|
|
64
|
+
|
|
65
|
+
dayjs().add(1, 'year') // manipulate
|
|
66
|
+
|
|
67
|
+
dayjs().isBefore(dayjs()) // query
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
📚[API Reference](https://day.js.org/docs/en/parse/parse)
|
|
71
|
+
|
|
72
|
+
### I18n
|
|
73
|
+
|
|
74
|
+
Day.js has great support for internationalization.
|
|
75
|
+
|
|
76
|
+
But none of them will be included in your build unless you use it.
|
|
77
|
+
|
|
78
|
+
```javascript
|
|
79
|
+
import 'dayjs/locale/es' // load on demand
|
|
80
|
+
|
|
81
|
+
dayjs.locale('es') // use Spanish locale globally
|
|
82
|
+
|
|
83
|
+
dayjs('2018-05-05').locale('zh-cn').format() // use Chinese Simplified locale in a specific instance
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
📚[Internationalization](https://day.js.org/docs/en/i18n/i18n)
|
|
87
|
+
|
|
88
|
+
### Plugin
|
|
89
|
+
|
|
90
|
+
A plugin is an independent module that can be added to Day.js to extend functionality or add new features.
|
|
91
|
+
|
|
92
|
+
```javascript
|
|
93
|
+
import advancedFormat from 'dayjs/plugin/advancedFormat' // load on demand
|
|
94
|
+
|
|
95
|
+
dayjs.extend(advancedFormat) // use plugin
|
|
96
|
+
|
|
97
|
+
dayjs().format('Q Do k kk X x') // more available formats
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
📚[Plugin List](https://day.js.org/docs/en/plugin/plugin)
|
|
101
|
+
|
|
102
|
+
### Usage Trend
|
|
103
|
+
|
|
104
|
+
<a href="https://npm-compare.com/moment,dayjs/#timeRange=THREE_YEARS" target="_blank">
|
|
105
|
+
<img src="https://user-images.githubusercontent.com/3455798/270162667-c7bd2ebe-675e-45c6-a2c9-dc67f3b65d6e.png">
|
|
106
|
+
</a>
|
|
107
|
+
|
|
108
|
+
## Sponsors
|
|
109
|
+
|
|
110
|
+
Support this project by becoming a sponsor. Your logo will show up here with a link to your website.
|
|
111
|
+
|
|
112
|
+
[[Become a sponsor via Github](https://github.com/sponsors/iamkun/)] [[Become a sponsor via OpenCollective](https://opencollective.com/dayjs#sponsor)]
|
|
113
|
+
|
|
114
|
+
<a href="https://toyokumo.co.jp" target="_blank">
|
|
115
|
+
<img width="70" src="https://user-images.githubusercontent.com/17680888/197092231-2367b5eb-1e43-467e-a311-23f7cd97b086.png">
|
|
116
|
+
</a>
|
|
117
|
+
|
|
118
|
+
<a href="https://github.com/ken-swyfft" target="_blank">
|
|
119
|
+
<img width="70" src="https://avatars.githubusercontent.com/u/65305317?v=4">
|
|
120
|
+
</a>
|
|
121
|
+
|
|
122
|
+
<a href="https://opencollective.com/sight-sound" target="_blank">
|
|
123
|
+
<img width="70" src="https://images.opencollective.com/sight-sound/54f7220/logo/256.png?height=256">
|
|
124
|
+
</a>
|
|
125
|
+
|
|
126
|
+
<a href="https://www.exoflare.com/open-source/?utm_source=dayjs&utm_campaign=open_source" target="_blank">
|
|
127
|
+
<img width="70" src="https://user-images.githubusercontent.com/17680888/162761622-1407a849-0c41-4591-8aa9-f98114ec2092.png">
|
|
128
|
+
</a>
|
|
129
|
+
|
|
130
|
+
<a href="https://chudovo.com/front-end-development/" target="_blank">
|
|
131
|
+
<img width="70" src="https://images.opencollective.com/chudovo/3c866f5/logo/256.png?height=256">
|
|
132
|
+
</a>
|
|
133
|
+
|
|
134
|
+
<a href="https://github.com/radioplusexperts" target="_blank">
|
|
135
|
+
<img width="70" src="https://avatars.githubusercontent.com/u/188567998?v=4">
|
|
136
|
+
</a>
|
|
137
|
+
|
|
138
|
+
<a href="https://github.com/storyblok" target="_blank">
|
|
139
|
+
<img width="70" src="https://avatars.githubusercontent.com/u/13880908?s=200&v=4">
|
|
140
|
+
</a>
|
|
141
|
+
|
|
142
|
+
<a href="https://bestkru.com/" target="_blank">
|
|
143
|
+
<img width="70" src="https://avatars.githubusercontent.com/u/159320286" alt="BestKru">
|
|
144
|
+
</a>
|
|
145
|
+
|
|
146
|
+
<a href="https://handsontable.com/docs/react-data-grid/?utm_source=Dayjs_GH&utm_medium=sponsorship&utm_campaign=library_sponsorship" target="_blank">
|
|
147
|
+
<img width="70" src="https://github.com/user-attachments/assets/426c3476-dc34-44d1-a904-ed58dbd20dd6">
|
|
148
|
+
</a>
|
|
149
|
+
|
|
150
|
+
<a href="https://route4me.com/" target="_blank">
|
|
151
|
+
<img width="70" src="https://github.com/user-attachments/assets/3fbc86c5-98a9-49c2-beae-1969026fcd76" alt="Route Optimizer and Route Planner Software">
|
|
152
|
+
</a>
|
|
153
|
+
|
|
154
|
+
<a href="https://github.com/Nftsworld007" target="_blank">
|
|
155
|
+
<img width="70" src="https://avatars.githubusercontent.com/u/133202490">
|
|
156
|
+
</a>
|
|
157
|
+
|
|
158
|
+
<a href="https://github.com/sentdm" target="_blank">
|
|
159
|
+
<img width="70" src="https://avatars.githubusercontent.com/u/153308555?s=200&v=4">
|
|
160
|
+
</a>
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
## Contributors
|
|
164
|
+
|
|
165
|
+
This project exists thanks to all the people who contribute.
|
|
166
|
+
|
|
167
|
+
Please give us a 💖 star 💖 to support us. Thank you.
|
|
168
|
+
|
|
169
|
+
And thank you to all our backers! 🙏
|
|
170
|
+
|
|
171
|
+
<a href="https://opencollective.com/dayjs/backer/0/website?requireActive=false" target="_blank"><img width="35" src="https://opencollective.com/dayjs/backer/0/avatar.svg?requireActive=false"></a>
|
|
172
|
+
<a href="https://opencollective.com/dayjs/backer/1/website?requireActive=false" target="_blank"><img width="35" src="https://opencollective.com/dayjs/backer/1/avatar.svg?requireActive=false"></a>
|
|
173
|
+
<a href="https://opencollective.com/dayjs/backer/2/website?requireActive=false" target="_blank"><img width="35" src="https://opencollective.com/dayjs/backer/2/avatar.svg?requireActive=false"></a>
|
|
174
|
+
<a href="https://opencollective.com/dayjs/backer/3/website?requireActive=false" target="_blank"><img width="35" src="https://opencollective.com/dayjs/backer/3/avatar.svg?requireActive=false"></a>
|
|
175
|
+
<br />
|
|
176
|
+
<a href="https://opencollective.com/dayjs#backers" target="_blank"><img src="https://opencollective.com/dayjs/contributors.svg?width=890" /></a>
|
|
177
|
+
|
|
178
|
+
## License
|
|
179
|
+
|
|
180
|
+
Day.js is licensed under a [MIT License](./LICENSE).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return b.s(e.$y,4,"0");case"M":return a+1;case"MM":return b.s(a+1,2,"0");case"MMM":return h(n.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return e.$D;case"DD":return b.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,o,2);case"ddd":return h(n.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(s);case"HH":return b.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return $(s,u,!0);case"A":return $(s,u,!1);case"m":return String(u);case"mm":return b.s(u,2,"0");case"s":return String(e.$s);case"ss":return b.s(e.$s,2,"0");case"SSS":return b.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export var SECONDS_A_MINUTE = 60;
|
|
2
|
+
export var SECONDS_A_HOUR = SECONDS_A_MINUTE * 60;
|
|
3
|
+
export var SECONDS_A_DAY = SECONDS_A_HOUR * 24;
|
|
4
|
+
export var SECONDS_A_WEEK = SECONDS_A_DAY * 7;
|
|
5
|
+
export var MILLISECONDS_A_SECOND = 1e3;
|
|
6
|
+
export var MILLISECONDS_A_MINUTE = SECONDS_A_MINUTE * MILLISECONDS_A_SECOND;
|
|
7
|
+
export var MILLISECONDS_A_HOUR = SECONDS_A_HOUR * MILLISECONDS_A_SECOND;
|
|
8
|
+
export var MILLISECONDS_A_DAY = SECONDS_A_DAY * MILLISECONDS_A_SECOND;
|
|
9
|
+
export var MILLISECONDS_A_WEEK = SECONDS_A_WEEK * MILLISECONDS_A_SECOND; // English locales
|
|
10
|
+
|
|
11
|
+
export var MS = 'millisecond';
|
|
12
|
+
export var S = 'second';
|
|
13
|
+
export var MIN = 'minute';
|
|
14
|
+
export var H = 'hour';
|
|
15
|
+
export var D = 'day';
|
|
16
|
+
export var W = 'week';
|
|
17
|
+
export var M = 'month';
|
|
18
|
+
export var Q = 'quarter';
|
|
19
|
+
export var Y = 'year';
|
|
20
|
+
export var DATE = 'date';
|
|
21
|
+
export var FORMAT_DEFAULT = 'YYYY-MM-DDTHH:mm:ssZ';
|
|
22
|
+
export var INVALID_DATE_STRING = 'Invalid Date'; // regex
|
|
23
|
+
|
|
24
|
+
export var REGEX_PARSE = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/;
|
|
25
|
+
export var REGEX_FORMAT = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g;
|
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
/// <reference path="./locale/index.d.ts" />
|
|
2
|
+
|
|
3
|
+
export = dayjs;
|
|
4
|
+
|
|
5
|
+
declare function dayjs (date?: dayjs.ConfigType): dayjs.Dayjs
|
|
6
|
+
|
|
7
|
+
declare function dayjs (date?: dayjs.ConfigType, format?: dayjs.OptionType, strict?: boolean): dayjs.Dayjs
|
|
8
|
+
|
|
9
|
+
declare function dayjs (date?: dayjs.ConfigType, format?: dayjs.OptionType, locale?: string, strict?: boolean): dayjs.Dayjs
|
|
10
|
+
|
|
11
|
+
declare namespace dayjs {
|
|
12
|
+
interface ConfigTypeMap {
|
|
13
|
+
default: string | number | Date | Dayjs | null | undefined
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type ConfigType = ConfigTypeMap[keyof ConfigTypeMap]
|
|
17
|
+
|
|
18
|
+
export interface FormatObject { locale?: string, format?: string, utc?: boolean }
|
|
19
|
+
|
|
20
|
+
export type OptionType = FormatObject | string | string[]
|
|
21
|
+
|
|
22
|
+
export type UnitTypeShort = 'd' | 'D' | 'M' | 'y' | 'h' | 'm' | 's' | 'ms'
|
|
23
|
+
|
|
24
|
+
export type UnitTypeLong = 'millisecond' | 'second' | 'minute' | 'hour' | 'day' | 'month' | 'year' | 'date'
|
|
25
|
+
|
|
26
|
+
export type UnitTypeLongPlural = 'milliseconds' | 'seconds' | 'minutes' | 'hours' | 'days' | 'months' | 'years' | 'dates'
|
|
27
|
+
|
|
28
|
+
export type UnitType = UnitTypeLong | UnitTypeLongPlural | UnitTypeShort;
|
|
29
|
+
|
|
30
|
+
export type OpUnitType = UnitType | "week" | "weeks" | 'w';
|
|
31
|
+
export type QUnitType = UnitType | "quarter" | "quarters" | 'Q';
|
|
32
|
+
export type ManipulateType = Exclude<OpUnitType, 'date' | 'dates'>;
|
|
33
|
+
class Dayjs {
|
|
34
|
+
constructor (config?: ConfigType)
|
|
35
|
+
/**
|
|
36
|
+
* All Day.js objects are immutable. Still, `dayjs#clone` can create a clone of the current object if you need one.
|
|
37
|
+
* ```
|
|
38
|
+
* dayjs().clone()// => Dayjs
|
|
39
|
+
* dayjs(dayjs('2019-01-25')) // passing a Dayjs object to a constructor will also clone it
|
|
40
|
+
* ```
|
|
41
|
+
* Docs: https://day.js.org/docs/en/parse/dayjs-clone
|
|
42
|
+
*/
|
|
43
|
+
clone(): Dayjs
|
|
44
|
+
/**
|
|
45
|
+
* This returns a `boolean` indicating whether the Day.js object contains a valid date or not.
|
|
46
|
+
* ```
|
|
47
|
+
* dayjs().isValid()// => boolean
|
|
48
|
+
* ```
|
|
49
|
+
* Docs: https://day.js.org/docs/en/parse/is-valid
|
|
50
|
+
*/
|
|
51
|
+
isValid(): boolean
|
|
52
|
+
/**
|
|
53
|
+
* Get the year.
|
|
54
|
+
* ```
|
|
55
|
+
* dayjs().year()// => 2020
|
|
56
|
+
* ```
|
|
57
|
+
* Docs: https://day.js.org/docs/en/get-set/year
|
|
58
|
+
*/
|
|
59
|
+
year(): number
|
|
60
|
+
/**
|
|
61
|
+
* Set the year.
|
|
62
|
+
* ```
|
|
63
|
+
* dayjs().year(2000)// => Dayjs
|
|
64
|
+
* ```
|
|
65
|
+
* Docs: https://day.js.org/docs/en/get-set/year
|
|
66
|
+
*/
|
|
67
|
+
year(value: number): Dayjs
|
|
68
|
+
/**
|
|
69
|
+
* Get the month.
|
|
70
|
+
*
|
|
71
|
+
* Months are zero indexed, so January is month 0.
|
|
72
|
+
* ```
|
|
73
|
+
* dayjs().month()// => 0-11
|
|
74
|
+
* ```
|
|
75
|
+
* Docs: https://day.js.org/docs/en/get-set/month
|
|
76
|
+
*/
|
|
77
|
+
month(): number
|
|
78
|
+
/**
|
|
79
|
+
* Set the month.
|
|
80
|
+
*
|
|
81
|
+
* Months are zero indexed, so January is month 0.
|
|
82
|
+
*
|
|
83
|
+
* Accepts numbers from 0 to 11. If the range is exceeded, it will bubble up to the next year.
|
|
84
|
+
* ```
|
|
85
|
+
* dayjs().month(0)// => Dayjs
|
|
86
|
+
* ```
|
|
87
|
+
* Docs: https://day.js.org/docs/en/get-set/month
|
|
88
|
+
*/
|
|
89
|
+
month(value: number): Dayjs
|
|
90
|
+
/**
|
|
91
|
+
* Get the date of the month.
|
|
92
|
+
* ```
|
|
93
|
+
* dayjs().date()// => 1-31
|
|
94
|
+
* ```
|
|
95
|
+
* Docs: https://day.js.org/docs/en/get-set/date
|
|
96
|
+
*/
|
|
97
|
+
date(): number
|
|
98
|
+
/**
|
|
99
|
+
* Set the date of the month.
|
|
100
|
+
*
|
|
101
|
+
* Accepts numbers from 1 to 31. If the range is exceeded, it will bubble up to the next months.
|
|
102
|
+
* ```
|
|
103
|
+
* dayjs().date(1)// => Dayjs
|
|
104
|
+
* ```
|
|
105
|
+
* Docs: https://day.js.org/docs/en/get-set/date
|
|
106
|
+
*/
|
|
107
|
+
date(value: number): Dayjs
|
|
108
|
+
/**
|
|
109
|
+
* Get the day of the week.
|
|
110
|
+
*
|
|
111
|
+
* Returns numbers from 0 (Sunday) to 6 (Saturday).
|
|
112
|
+
* ```
|
|
113
|
+
* dayjs().day()// 0-6
|
|
114
|
+
* ```
|
|
115
|
+
* Docs: https://day.js.org/docs/en/get-set/day
|
|
116
|
+
*/
|
|
117
|
+
day(): 0 | 1 | 2 | 3 | 4 | 5 | 6
|
|
118
|
+
/**
|
|
119
|
+
* Set the day of the week.
|
|
120
|
+
*
|
|
121
|
+
* Accepts numbers from 0 (Sunday) to 6 (Saturday). If the range is exceeded, it will bubble up to next weeks.
|
|
122
|
+
* ```
|
|
123
|
+
* dayjs().day(0)// => Dayjs
|
|
124
|
+
* ```
|
|
125
|
+
* Docs: https://day.js.org/docs/en/get-set/day
|
|
126
|
+
*/
|
|
127
|
+
day(value: number): Dayjs
|
|
128
|
+
/**
|
|
129
|
+
* Get the hour.
|
|
130
|
+
* ```
|
|
131
|
+
* dayjs().hour()// => 0-23
|
|
132
|
+
* ```
|
|
133
|
+
* Docs: https://day.js.org/docs/en/get-set/hour
|
|
134
|
+
*/
|
|
135
|
+
hour(): number
|
|
136
|
+
/**
|
|
137
|
+
* Set the hour.
|
|
138
|
+
*
|
|
139
|
+
* Accepts numbers from 0 to 23. If the range is exceeded, it will bubble up to the next day.
|
|
140
|
+
* ```
|
|
141
|
+
* dayjs().hour(12)// => Dayjs
|
|
142
|
+
* ```
|
|
143
|
+
* Docs: https://day.js.org/docs/en/get-set/hour
|
|
144
|
+
*/
|
|
145
|
+
hour(value: number): Dayjs
|
|
146
|
+
/**
|
|
147
|
+
* Get the minutes.
|
|
148
|
+
* ```
|
|
149
|
+
* dayjs().minute()// => 0-59
|
|
150
|
+
* ```
|
|
151
|
+
* Docs: https://day.js.org/docs/en/get-set/minute
|
|
152
|
+
*/
|
|
153
|
+
minute(): number
|
|
154
|
+
/**
|
|
155
|
+
* Set the minutes.
|
|
156
|
+
*
|
|
157
|
+
* Accepts numbers from 0 to 59. If the range is exceeded, it will bubble up to the next hour.
|
|
158
|
+
* ```
|
|
159
|
+
* dayjs().minute(59)// => Dayjs
|
|
160
|
+
* ```
|
|
161
|
+
* Docs: https://day.js.org/docs/en/get-set/minute
|
|
162
|
+
*/
|
|
163
|
+
minute(value: number): Dayjs
|
|
164
|
+
/**
|
|
165
|
+
* Get the seconds.
|
|
166
|
+
* ```
|
|
167
|
+
* dayjs().second()// => 0-59
|
|
168
|
+
* ```
|
|
169
|
+
* Docs: https://day.js.org/docs/en/get-set/second
|
|
170
|
+
*/
|
|
171
|
+
second(): number
|
|
172
|
+
/**
|
|
173
|
+
* Set the seconds.
|
|
174
|
+
*
|
|
175
|
+
* Accepts numbers from 0 to 59. If the range is exceeded, it will bubble up to the next minutes.
|
|
176
|
+
* ```
|
|
177
|
+
* dayjs().second(1)// Dayjs
|
|
178
|
+
* ```
|
|
179
|
+
*/
|
|
180
|
+
second(value: number): Dayjs
|
|
181
|
+
/**
|
|
182
|
+
* Get the milliseconds.
|
|
183
|
+
* ```
|
|
184
|
+
* dayjs().millisecond()// => 0-999
|
|
185
|
+
* ```
|
|
186
|
+
* Docs: https://day.js.org/docs/en/get-set/millisecond
|
|
187
|
+
*/
|
|
188
|
+
millisecond(): number
|
|
189
|
+
/**
|
|
190
|
+
* Set the milliseconds.
|
|
191
|
+
*
|
|
192
|
+
* Accepts numbers from 0 to 999. If the range is exceeded, it will bubble up to the next seconds.
|
|
193
|
+
* ```
|
|
194
|
+
* dayjs().millisecond(1)// => Dayjs
|
|
195
|
+
* ```
|
|
196
|
+
* Docs: https://day.js.org/docs/en/get-set/millisecond
|
|
197
|
+
*/
|
|
198
|
+
millisecond(value: number): Dayjs
|
|
199
|
+
/**
|
|
200
|
+
* Generic setter, accepting unit as first argument, and value as second, returns a new instance with the applied changes.
|
|
201
|
+
*
|
|
202
|
+
* In general:
|
|
203
|
+
* ```
|
|
204
|
+
* dayjs().set(unit, value) === dayjs()[unit](value)
|
|
205
|
+
* ```
|
|
206
|
+
* Units are case insensitive, and support plural and short forms.
|
|
207
|
+
* ```
|
|
208
|
+
* dayjs().set('date', 1)
|
|
209
|
+
* dayjs().set('month', 3) // April
|
|
210
|
+
* dayjs().set('second', 30)
|
|
211
|
+
* ```
|
|
212
|
+
* Docs: https://day.js.org/docs/en/get-set/set
|
|
213
|
+
*/
|
|
214
|
+
set(unit: UnitType, value: number): Dayjs
|
|
215
|
+
/**
|
|
216
|
+
* String getter, returns the corresponding information getting from Day.js object.
|
|
217
|
+
*
|
|
218
|
+
* In general:
|
|
219
|
+
* ```
|
|
220
|
+
* dayjs().get(unit) === dayjs()[unit]()
|
|
221
|
+
* ```
|
|
222
|
+
* Units are case insensitive, and support plural and short forms.
|
|
223
|
+
* ```
|
|
224
|
+
* dayjs().get('year')
|
|
225
|
+
* dayjs().get('month') // start 0
|
|
226
|
+
* dayjs().get('date')
|
|
227
|
+
* ```
|
|
228
|
+
* Docs: https://day.js.org/docs/en/get-set/get
|
|
229
|
+
*/
|
|
230
|
+
get(unit: UnitType): number
|
|
231
|
+
/**
|
|
232
|
+
* Returns a cloned Day.js object with a specified amount of time added.
|
|
233
|
+
* ```
|
|
234
|
+
* dayjs().add(7, 'day')// => Dayjs
|
|
235
|
+
* ```
|
|
236
|
+
* Units are case insensitive, and support plural and short forms.
|
|
237
|
+
*
|
|
238
|
+
* Docs: https://day.js.org/docs/en/manipulate/add
|
|
239
|
+
*/
|
|
240
|
+
add(value: number, unit?: ManipulateType): Dayjs
|
|
241
|
+
/**
|
|
242
|
+
* Returns a cloned Day.js object with a specified amount of time subtracted.
|
|
243
|
+
* ```
|
|
244
|
+
* dayjs().subtract(7, 'year')// => Dayjs
|
|
245
|
+
* ```
|
|
246
|
+
* Units are case insensitive, and support plural and short forms.
|
|
247
|
+
*
|
|
248
|
+
* Docs: https://day.js.org/docs/en/manipulate/subtract
|
|
249
|
+
*/
|
|
250
|
+
subtract(value: number, unit?: ManipulateType): Dayjs
|
|
251
|
+
/**
|
|
252
|
+
* Returns a cloned Day.js object and set it to the start of a unit of time.
|
|
253
|
+
* ```
|
|
254
|
+
* dayjs().startOf('year')// => Dayjs
|
|
255
|
+
* ```
|
|
256
|
+
* Units are case insensitive, and support plural and short forms.
|
|
257
|
+
*
|
|
258
|
+
* Docs: https://day.js.org/docs/en/manipulate/start-of
|
|
259
|
+
*/
|
|
260
|
+
startOf(unit: OpUnitType): Dayjs
|
|
261
|
+
/**
|
|
262
|
+
* Returns a cloned Day.js object and set it to the end of a unit of time.
|
|
263
|
+
* ```
|
|
264
|
+
* dayjs().endOf('month')// => Dayjs
|
|
265
|
+
* ```
|
|
266
|
+
* Units are case insensitive, and support plural and short forms.
|
|
267
|
+
*
|
|
268
|
+
* Docs: https://day.js.org/docs/en/manipulate/end-of
|
|
269
|
+
*/
|
|
270
|
+
endOf(unit: OpUnitType): Dayjs
|
|
271
|
+
/**
|
|
272
|
+
* Get the formatted date according to the string of tokens passed in.
|
|
273
|
+
*
|
|
274
|
+
* To escape characters, wrap them in square brackets (e.g. [MM]).
|
|
275
|
+
* ```
|
|
276
|
+
* dayjs().format()// => current date in ISO8601, without fraction seconds e.g. '2020-04-02T08:02:17-05:00'
|
|
277
|
+
* dayjs('2019-01-25').format('[YYYYescape] YYYY-MM-DDTHH:mm:ssZ[Z]')// 'YYYYescape 2019-01-25T00:00:00-02:00Z'
|
|
278
|
+
* dayjs('2019-01-25').format('DD/MM/YYYY') // '25/01/2019'
|
|
279
|
+
* ```
|
|
280
|
+
* Docs: https://day.js.org/docs/en/display/format
|
|
281
|
+
*/
|
|
282
|
+
format(template?: string): string
|
|
283
|
+
/**
|
|
284
|
+
* This indicates the difference between two date-time in the specified unit.
|
|
285
|
+
*
|
|
286
|
+
* To get the difference in milliseconds, use `dayjs#diff`
|
|
287
|
+
* ```
|
|
288
|
+
* const date1 = dayjs('2019-01-25')
|
|
289
|
+
* const date2 = dayjs('2018-06-05')
|
|
290
|
+
* date1.diff(date2) // 20214000000 default milliseconds
|
|
291
|
+
* date1.diff() // milliseconds to current time
|
|
292
|
+
* ```
|
|
293
|
+
*
|
|
294
|
+
* To get the difference in another unit of measurement, pass that measurement as the second argument.
|
|
295
|
+
* ```
|
|
296
|
+
* const date1 = dayjs('2019-01-25')
|
|
297
|
+
* date1.diff('2018-06-05', 'month') // 7
|
|
298
|
+
* ```
|
|
299
|
+
* Units are case insensitive, and support plural and short forms.
|
|
300
|
+
*
|
|
301
|
+
* Docs: https://day.js.org/docs/en/display/difference
|
|
302
|
+
*/
|
|
303
|
+
diff(date?: ConfigType, unit?: QUnitType | OpUnitType, float?: boolean): number
|
|
304
|
+
/**
|
|
305
|
+
* This returns the number of **milliseconds** since the Unix Epoch of the Day.js object.
|
|
306
|
+
* ```
|
|
307
|
+
* dayjs('2019-01-25').valueOf() // 1548381600000
|
|
308
|
+
* +dayjs(1548381600000) // 1548381600000
|
|
309
|
+
* ```
|
|
310
|
+
* To get a Unix timestamp (the number of seconds since the epoch) from a Day.js object, you should use Unix Timestamp `dayjs#unix()`.
|
|
311
|
+
*
|
|
312
|
+
* Docs: https://day.js.org/docs/en/display/unix-timestamp-milliseconds
|
|
313
|
+
*/
|
|
314
|
+
valueOf(): number
|
|
315
|
+
/**
|
|
316
|
+
* This returns the Unix timestamp (the number of **seconds** since the Unix Epoch) of the Day.js object.
|
|
317
|
+
* ```
|
|
318
|
+
* dayjs('2019-01-25').unix() // 1548381600
|
|
319
|
+
* ```
|
|
320
|
+
* This value is floored to the nearest second, and does not include a milliseconds component.
|
|
321
|
+
*
|
|
322
|
+
* Docs: https://day.js.org/docs/en/display/unix-timestamp
|
|
323
|
+
*/
|
|
324
|
+
unix(): number
|
|
325
|
+
/**
|
|
326
|
+
* Get the number of days in the current month.
|
|
327
|
+
* ```
|
|
328
|
+
* dayjs('2019-01-25').daysInMonth() // 31
|
|
329
|
+
* ```
|
|
330
|
+
* Docs: https://day.js.org/docs/en/display/days-in-month
|
|
331
|
+
*/
|
|
332
|
+
daysInMonth(): number
|
|
333
|
+
/**
|
|
334
|
+
* To get a copy of the native `Date` object parsed from the Day.js object use `dayjs#toDate`.
|
|
335
|
+
* ```
|
|
336
|
+
* dayjs('2019-01-25').toDate()// => Date
|
|
337
|
+
* ```
|
|
338
|
+
*/
|
|
339
|
+
toDate(): Date
|
|
340
|
+
/**
|
|
341
|
+
* To serialize as an ISO 8601 string.
|
|
342
|
+
* ```
|
|
343
|
+
* dayjs('2019-01-25').toJSON() // '2019-01-25T02:00:00.000Z'
|
|
344
|
+
* ```
|
|
345
|
+
* Docs: https://day.js.org/docs/en/display/as-json
|
|
346
|
+
*/
|
|
347
|
+
toJSON(): string
|
|
348
|
+
/**
|
|
349
|
+
* To format as an ISO 8601 string.
|
|
350
|
+
* ```
|
|
351
|
+
* dayjs('2019-01-25').toISOString() // '2019-01-25T02:00:00.000Z'
|
|
352
|
+
* ```
|
|
353
|
+
* Docs: https://day.js.org/docs/en/display/as-iso-string
|
|
354
|
+
*/
|
|
355
|
+
toISOString(): string
|
|
356
|
+
/**
|
|
357
|
+
* Returns a string representation of the date.
|
|
358
|
+
* ```
|
|
359
|
+
* dayjs('2019-01-25').toString() // 'Fri, 25 Jan 2019 02:00:00 GMT'
|
|
360
|
+
* ```
|
|
361
|
+
* Docs: https://day.js.org/docs/en/display/as-string
|
|
362
|
+
*/
|
|
363
|
+
toString(): string
|
|
364
|
+
/**
|
|
365
|
+
* Get the UTC offset in minutes.
|
|
366
|
+
* ```
|
|
367
|
+
* dayjs().utcOffset()
|
|
368
|
+
* ```
|
|
369
|
+
* Docs: https://day.js.org/docs/en/manipulate/utc-offset
|
|
370
|
+
*/
|
|
371
|
+
utcOffset(): number
|
|
372
|
+
/**
|
|
373
|
+
* This indicates whether the Day.js object is before the other supplied date-time.
|
|
374
|
+
* ```
|
|
375
|
+
* dayjs().isBefore(dayjs('2011-01-01')) // default milliseconds
|
|
376
|
+
* ```
|
|
377
|
+
* If you want to limit the granularity to a unit other than milliseconds, pass it as the second parameter.
|
|
378
|
+
* ```
|
|
379
|
+
* dayjs().isBefore('2011-01-01', 'year')// => boolean
|
|
380
|
+
* ```
|
|
381
|
+
* Units are case insensitive, and support plural and short forms.
|
|
382
|
+
*
|
|
383
|
+
* Docs: https://day.js.org/docs/en/query/is-before
|
|
384
|
+
*/
|
|
385
|
+
isBefore(date?: ConfigType, unit?: OpUnitType): boolean
|
|
386
|
+
/**
|
|
387
|
+
* This indicates whether the Day.js object is the same as the other supplied date-time.
|
|
388
|
+
* ```
|
|
389
|
+
* dayjs().isSame(dayjs('2011-01-01')) // default milliseconds
|
|
390
|
+
* ```
|
|
391
|
+
* If you want to limit the granularity to a unit other than milliseconds, pass it as the second parameter.
|
|
392
|
+
* ```
|
|
393
|
+
* dayjs().isSame('2011-01-01', 'year')// => boolean
|
|
394
|
+
* ```
|
|
395
|
+
* Docs: https://day.js.org/docs/en/query/is-same
|
|
396
|
+
*/
|
|
397
|
+
isSame(date?: ConfigType, unit?: OpUnitType): boolean
|
|
398
|
+
/**
|
|
399
|
+
* This indicates whether the Day.js object is after the other supplied date-time.
|
|
400
|
+
* ```
|
|
401
|
+
* dayjs().isAfter(dayjs('2011-01-01')) // default milliseconds
|
|
402
|
+
* ```
|
|
403
|
+
* If you want to limit the granularity to a unit other than milliseconds, pass it as the second parameter.
|
|
404
|
+
* ```
|
|
405
|
+
* dayjs().isAfter('2011-01-01', 'year')// => boolean
|
|
406
|
+
* ```
|
|
407
|
+
* Units are case insensitive, and support plural and short forms.
|
|
408
|
+
*
|
|
409
|
+
* Docs: https://day.js.org/docs/en/query/is-after
|
|
410
|
+
*/
|
|
411
|
+
isAfter(date?: ConfigType, unit?: OpUnitType): boolean
|
|
412
|
+
|
|
413
|
+
locale(): string
|
|
414
|
+
|
|
415
|
+
locale(preset: string | ILocale, object?: Partial<ILocale>): Dayjs
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
export type PluginFunc<T = unknown> = (option: T, c: typeof Dayjs, d: typeof dayjs) => void
|
|
419
|
+
|
|
420
|
+
export function extend<T = unknown>(plugin: PluginFunc<T>, option?: T): Dayjs
|
|
421
|
+
|
|
422
|
+
export function locale(preset?: string | ILocale, object?: Partial<ILocale>, isLocal?: boolean): string
|
|
423
|
+
|
|
424
|
+
export function isDayjs(d: any): d is Dayjs
|
|
425
|
+
|
|
426
|
+
export function unix(t: number): Dayjs
|
|
427
|
+
|
|
428
|
+
const Ls : { [key: string] : ILocale }
|
|
429
|
+
}
|