esday 0.5.0 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (549) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/LICENSE +21 -21
  3. package/README.md +63 -51
  4. package/chunks/AyQQ6US-.js +84 -0
  5. package/chunks/{Y32qdU_5.js → BkjWOpMU.js} +7 -1
  6. package/chunks/{MtjcOKi-.d.ts → C5qDMHT5.d.ts} +2 -2
  7. package/chunks/{DqhiVwLi.d.ts → CODi8AFH.d.ts} +63 -35
  8. package/{index.js → chunks/CXWzCl3n.js} +91 -183
  9. package/chunks/{BRRrAbUl.js → CdvTtmWL.js} +2 -2
  10. package/chunks/{DXHbH1CI.js → Shk32pTP.js} +1 -1
  11. package/chunks/{Cb5SvF6r.js → v_QBn7Xm.js} +1 -1
  12. package/chunks/xt8C2lbv.js +38 -0
  13. package/index.d.mts +3 -0
  14. package/index.mjs +3 -0
  15. package/locales/af.d.mts +6 -0
  16. package/locales/{af.js → af.mjs} +4 -2
  17. package/locales/am.d.mts +6 -0
  18. package/locales/{am.js → am.mjs} +4 -2
  19. package/locales/ar-dz.d.mts +9 -0
  20. package/locales/{ar-dz.js → ar-dz.mjs} +7 -9
  21. package/locales/ar-iq.d.mts +9 -0
  22. package/locales/ar-iq.mjs +12 -0
  23. package/locales/ar-kw.d.mts +9 -0
  24. package/locales/{ar-kw.js → ar-kw.mjs} +7 -9
  25. package/locales/ar-ly.d.mts +9 -0
  26. package/locales/ar-ly.mjs +12 -0
  27. package/locales/ar-ma.d.mts +9 -0
  28. package/locales/{ar-ma.js → ar-ma.mjs} +7 -9
  29. package/locales/ar-sa.d.mts +9 -0
  30. package/locales/{ar-sa.js → ar-sa.mjs} +7 -9
  31. package/locales/ar-tn.d.mts +9 -0
  32. package/locales/{ar-tn.js → ar-tn.mjs} +7 -9
  33. package/locales/ar.d.mts +6 -0
  34. package/{chunks/BeVgU2nj.js → locales/ar.mjs} +12 -2
  35. package/locales/az.d.mts +6 -0
  36. package/locales/{az.js → az.mjs} +4 -2
  37. package/locales/be.d.mts +6 -0
  38. package/locales/{be.js → be.mjs} +55 -59
  39. package/locales/bg.d.mts +6 -0
  40. package/locales/{bg.js → bg.mjs} +4 -2
  41. package/locales/bi.d.mts +6 -0
  42. package/locales/{bi.js → bi.mjs} +4 -2
  43. package/locales/bm.d.mts +6 -0
  44. package/locales/{bm.js → bm.mjs} +4 -2
  45. package/locales/bn-bd.d.mts +9 -0
  46. package/locales/{bn-bd.js → bn-bd.mjs} +7 -9
  47. package/locales/bn.d.mts +6 -0
  48. package/{chunks/GjKpN6U-.js → locales/bn.mjs} +4 -2
  49. package/locales/bo.d.mts +6 -0
  50. package/locales/{bo.js → bo.mjs} +4 -2
  51. package/locales/br.d.mts +6 -0
  52. package/locales/{br.js → br.mjs} +10 -9
  53. package/locales/bs.d.mts +6 -0
  54. package/locales/{bs.js → bs.mjs} +4 -2
  55. package/locales/ca.d.mts +6 -0
  56. package/locales/{ca.js → ca.mjs} +35 -36
  57. package/locales/cs.d.mts +6 -0
  58. package/locales/{cs.js → cs.mjs} +38 -34
  59. package/locales/cv.d.mts +6 -0
  60. package/locales/{cv.js → cv.mjs} +4 -2
  61. package/locales/cy.d.mts +6 -0
  62. package/locales/{cy.js → cy.mjs} +4 -2
  63. package/locales/da.d.mts +6 -0
  64. package/locales/{da.js → da.mjs} +4 -2
  65. package/locales/de-at.d.mts +9 -0
  66. package/locales/{de-at.js → de-at.mjs} +7 -9
  67. package/locales/de-ch.d.mts +9 -0
  68. package/locales/de-ch.mjs +12 -0
  69. package/locales/de.d.mts +6 -0
  70. package/{chunks/DMtTiWuY.js → locales/de.mjs} +6 -2
  71. package/locales/dv.d.mts +6 -0
  72. package/locales/{dv.js → dv.mjs} +4 -2
  73. package/locales/el.d.mts +6 -0
  74. package/locales/{el.js → el.mjs} +4 -2
  75. package/locales/en-au.d.mts +9 -0
  76. package/locales/{en-au.js → en-au.mjs} +7 -8
  77. package/locales/en-ca.d.mts +9 -0
  78. package/locales/{en-ca.js → en-ca.mjs} +7 -8
  79. package/locales/{en-gb.d.ts → en-gb.d.mts} +1 -3
  80. package/locales/{en-gb.js → en-gb.mjs} +9 -8
  81. package/locales/en-ie.d.mts +9 -0
  82. package/locales/{en-ie.js → en-ie.mjs} +7 -8
  83. package/locales/en-il.d.mts +9 -0
  84. package/locales/{en-il.js → en-il.mjs} +7 -8
  85. package/locales/en-in.d.mts +9 -0
  86. package/locales/{en-in.js → en-in.mjs} +7 -8
  87. package/locales/en-nz.d.mts +9 -0
  88. package/locales/{en-nz.js → en-nz.mjs} +7 -8
  89. package/locales/en-sg.d.mts +9 -0
  90. package/locales/{en-sg.js → en-sg.mjs} +7 -8
  91. package/locales/en-tt.d.mts +9 -0
  92. package/locales/{en-tt.js → en-tt.mjs} +7 -8
  93. package/locales/en-us.d.mts +9 -0
  94. package/locales/en-us.mjs +12 -0
  95. package/locales/en.d.mts +6 -0
  96. package/{chunks/tfkJ5D3p.js → locales/en.mjs} +4 -2
  97. package/locales/eo.d.mts +6 -0
  98. package/locales/{eo.js → eo.mjs} +4 -2
  99. package/locales/es-do.d.mts +9 -0
  100. package/locales/{es-do.js → es-do.mjs} +7 -9
  101. package/locales/es-mx.d.mts +9 -0
  102. package/locales/es-mx.mjs +13 -0
  103. package/locales/es-pr.d.mts +9 -0
  104. package/locales/es-pr.mjs +16 -0
  105. package/locales/es-us.d.mts +9 -0
  106. package/locales/es-us.mjs +12 -0
  107. package/locales/es.d.mts +6 -0
  108. package/{chunks/Dixb5KKs.js → locales/es.mjs} +4 -2
  109. package/locales/et.d.mts +6 -0
  110. package/locales/{et.js → et.mjs} +6 -2
  111. package/locales/eu.d.mts +6 -0
  112. package/locales/{eu.js → eu.mjs} +4 -2
  113. package/locales/fa.d.mts +6 -0
  114. package/locales/{fa.js → fa.mjs} +4 -2
  115. package/locales/fi.d.mts +6 -0
  116. package/locales/{fi.js → fi.mjs} +8 -2
  117. package/locales/fil.d.mts +6 -0
  118. package/locales/{fil.js → fil.mjs} +4 -2
  119. package/locales/fo.d.mts +6 -0
  120. package/locales/{fo.js → fo.mjs} +4 -2
  121. package/locales/fr-ca.d.mts +9 -0
  122. package/locales/fr-ca.mjs +16 -0
  123. package/locales/fr-ch.d.mts +9 -0
  124. package/locales/fr-ch.mjs +16 -0
  125. package/locales/fr.d.mts +6 -0
  126. package/{chunks/D009Z-ld.js → locales/fr.mjs} +5 -4
  127. package/locales/fy.d.mts +6 -0
  128. package/locales/{fy.js → fy.mjs} +4 -2
  129. package/locales/ga.d.mts +6 -0
  130. package/locales/{ga.js → ga.mjs} +4 -2
  131. package/locales/gd.d.mts +6 -0
  132. package/locales/{gd.js → gd.mjs} +4 -2
  133. package/locales/gl.d.mts +6 -0
  134. package/locales/{gl.js → gl.mjs} +4 -2
  135. package/locales/gom-deva.d.mts +6 -0
  136. package/locales/{gom-deva.js → gom-deva.mjs} +34 -32
  137. package/locales/gom-latn.d.mts +6 -0
  138. package/locales/{gom-latn.js → gom-latn.mjs} +34 -32
  139. package/locales/gu.d.mts +6 -0
  140. package/locales/{gu.js → gu.mjs} +4 -2
  141. package/locales/he.d.mts +6 -0
  142. package/locales/{he.js → he.mjs} +8 -5
  143. package/locales/hi.d.mts +6 -0
  144. package/locales/{hi.js → hi.mjs} +34 -35
  145. package/locales/hr.d.mts +6 -0
  146. package/locales/{hr.js → hr.mjs} +10 -4
  147. package/locales/ht.d.mts +6 -0
  148. package/locales/{ht.js → ht.mjs} +4 -2
  149. package/locales/hu.d.mts +6 -0
  150. package/locales/{hu.js → hu.mjs} +6 -2
  151. package/locales/hy-am.d.mts +6 -0
  152. package/locales/{hy-am.js → hy-am.mjs} +34 -35
  153. package/locales/id.d.mts +6 -0
  154. package/locales/{id.js → id.mjs} +4 -2
  155. package/locales/is.d.mts +6 -0
  156. package/locales/{is.js → is.mjs} +14 -2
  157. package/locales/it-ch.d.mts +9 -0
  158. package/locales/{it-ch.js → it-ch.mjs} +4 -9
  159. package/locales/it.d.mts +6 -0
  160. package/{chunks/B5f9poqo.js → locales/it.mjs} +25 -24
  161. package/locales/{ja.d.ts → ja.d.mts} +1 -4
  162. package/locales/{ja.js → ja.mjs} +4 -2
  163. package/locales/jv.d.mts +6 -0
  164. package/locales/{jv.js → jv.mjs} +4 -2
  165. package/locales/ka.d.mts +6 -0
  166. package/locales/{ka.js → ka.mjs} +25 -26
  167. package/locales/kk.d.mts +6 -0
  168. package/locales/{kk.js → kk.mjs} +4 -2
  169. package/locales/km.d.mts +6 -0
  170. package/locales/{km.js → km.mjs} +4 -2
  171. package/locales/kn.d.mts +6 -0
  172. package/locales/{kn.js → kn.mjs} +4 -2
  173. package/locales/ko.d.mts +6 -0
  174. package/locales/{ko.js → ko.mjs} +5 -3
  175. package/locales/ku.d.mts +6 -0
  176. package/locales/{ku.js → ku.mjs} +4 -2
  177. package/locales/ky.d.mts +6 -0
  178. package/locales/{ky.js → ky.mjs} +4 -2
  179. package/locales/lb.d.mts +6 -0
  180. package/locales/{lb.js → lb.mjs} +5 -2
  181. package/locales/lo.d.mts +6 -0
  182. package/locales/{lo.js → lo.mjs} +4 -2
  183. package/locales/lt.d.mts +6 -0
  184. package/locales/{lt.js → lt.mjs} +4 -2
  185. package/locales/lv.d.mts +6 -0
  186. package/locales/{lv.js → lv.mjs} +4 -2
  187. package/locales/me.d.mts +6 -0
  188. package/locales/{me.js → me.mjs} +33 -33
  189. package/locales/mi.d.mts +6 -0
  190. package/locales/{mi.js → mi.mjs} +4 -2
  191. package/locales/mk.d.mts +6 -0
  192. package/locales/{mk.js → mk.mjs} +4 -2
  193. package/locales/ml.d.mts +6 -0
  194. package/locales/{ml.js → ml.mjs} +4 -2
  195. package/locales/mn.d.mts +6 -0
  196. package/locales/{mn.js → mn.mjs} +37 -16
  197. package/locales/mr.d.mts +6 -0
  198. package/locales/{mr.js → mr.mjs} +16 -2
  199. package/locales/ms-my.d.mts +9 -0
  200. package/locales/ms-my.mjs +12 -0
  201. package/locales/ms.d.mts +6 -0
  202. package/{chunks/CQ57zhVp.js → locales/ms.mjs} +4 -2
  203. package/locales/mt.d.mts +6 -0
  204. package/locales/{mt.js → mt.mjs} +4 -2
  205. package/locales/my.d.mts +6 -0
  206. package/locales/{my.js → my.mjs} +4 -2
  207. package/locales/nb.d.mts +6 -0
  208. package/locales/{nb.js → nb.mjs} +4 -2
  209. package/locales/ne.d.mts +6 -0
  210. package/locales/{ne.js → ne.mjs} +4 -2
  211. package/locales/nl-be.d.mts +9 -0
  212. package/locales/nl-be.mjs +16 -0
  213. package/locales/nl.d.mts +6 -0
  214. package/{chunks/BDssPbM_.js → locales/nl.mjs} +4 -2
  215. package/locales/nn.d.mts +6 -0
  216. package/locales/{nn.js → nn.mjs} +4 -2
  217. package/locales/oc-lnc.d.mts +6 -0
  218. package/locales/{oc-lnc.js → oc-lnc.mjs} +35 -36
  219. package/locales/pa-in.d.mts +6 -0
  220. package/locales/{pa-in.js → pa-in.mjs} +4 -2
  221. package/locales/pl.d.mts +6 -0
  222. package/locales/{pl.js → pl.mjs} +5 -2
  223. package/locales/pt-br.d.mts +9 -0
  224. package/locales/{pt-br.js → pt-br.mjs} +7 -9
  225. package/locales/pt.d.mts +6 -0
  226. package/{chunks/CWqzr5E5.js → locales/pt.mjs} +4 -2
  227. package/locales/rn.d.mts +6 -0
  228. package/locales/{rn.js → rn.mjs} +4 -2
  229. package/locales/ro.d.mts +6 -0
  230. package/locales/{ro.js → ro.mjs} +4 -2
  231. package/locales/{ru.d.ts → ru.d.mts} +1 -4
  232. package/locales/{ru.js → ru.mjs} +83 -82
  233. package/locales/rw.d.mts +6 -0
  234. package/locales/{rw.js → rw.mjs} +4 -2
  235. package/locales/sd.d.mts +6 -0
  236. package/locales/{sd.js → sd.mjs} +4 -2
  237. package/locales/se.d.mts +6 -0
  238. package/locales/{se.js → se.mjs} +4 -2
  239. package/locales/si.d.mts +6 -0
  240. package/locales/{si.js → si.mjs} +4 -2
  241. package/locales/sk.d.mts +6 -0
  242. package/locales/{sk.js → sk.mjs} +8 -2
  243. package/locales/sl.d.mts +6 -0
  244. package/locales/{sl.js → sl.mjs} +8 -2
  245. package/locales/sq.d.mts +6 -0
  246. package/locales/{sq.js → sq.mjs} +4 -2
  247. package/locales/sr-cyrl.d.mts +9 -0
  248. package/locales/{sr-cyrl.js → sr-cyrl.mjs} +16 -15
  249. package/locales/sr.d.mts +6 -0
  250. package/{chunks/Cg4ZI9v8.js → locales/sr.mjs} +14 -8
  251. package/locales/ss.d.mts +6 -0
  252. package/locales/{ss.js → ss.mjs} +4 -2
  253. package/locales/sv-fi.d.mts +9 -0
  254. package/locales/{sv-fi.js → sv-fi.mjs} +7 -9
  255. package/locales/sv.d.mts +6 -0
  256. package/{chunks/br7kModF.js → locales/sv.mjs} +5 -4
  257. package/locales/sw.d.mts +6 -0
  258. package/locales/{sw.js → sw.mjs} +4 -2
  259. package/locales/ta.d.mts +6 -0
  260. package/locales/{ta.js → ta.mjs} +4 -2
  261. package/locales/te.d.mts +6 -0
  262. package/locales/{te.js → te.mjs} +4 -2
  263. package/locales/tet.d.mts +6 -0
  264. package/locales/{tet.js → tet.mjs} +5 -4
  265. package/locales/tg.d.mts +6 -0
  266. package/locales/{tg.js → tg.mjs} +34 -35
  267. package/locales/th.d.mts +6 -0
  268. package/locales/{th.js → th.mjs} +4 -2
  269. package/locales/tk.d.mts +6 -0
  270. package/locales/{tk.js → tk.mjs} +5 -4
  271. package/locales/tl-ph.d.mts +6 -0
  272. package/locales/{tl-ph.js → tl-ph.mjs} +4 -2
  273. package/locales/tlh.d.mts +6 -0
  274. package/locales/{tlh.js → tlh.mjs} +5 -2
  275. package/locales/tr.d.mts +6 -0
  276. package/locales/{tr.js → tr.mjs} +5 -4
  277. package/locales/tzl.d.mts +6 -0
  278. package/locales/{tzl.js → tzl.mjs} +4 -2
  279. package/locales/tzm-latn.d.mts +9 -0
  280. package/locales/{tzm-latn.js → tzm-latn.mjs} +9 -9
  281. package/locales/tzm.d.mts +6 -0
  282. package/{chunks/l2Rxo2H0.js → locales/tzm.mjs} +4 -2
  283. package/locales/ug-cn.d.mts +6 -0
  284. package/locales/{ug-cn.js → ug-cn.mjs} +4 -2
  285. package/locales/uk.d.mts +6 -0
  286. package/locales/{uk.js → uk.mjs} +37 -32
  287. package/locales/ur.d.mts +6 -0
  288. package/locales/{ur.js → ur.mjs} +4 -2
  289. package/locales/uz-latn.d.mts +9 -0
  290. package/locales/{uz-latn.js → uz-latn.mjs} +9 -9
  291. package/locales/uz.d.mts +6 -0
  292. package/{chunks/CQJ0-ZuR.js → locales/uz.mjs} +4 -2
  293. package/locales/vi.d.mts +6 -0
  294. package/locales/{vi.js → vi.mjs} +4 -2
  295. package/locales/x-pseudo.d.mts +6 -0
  296. package/locales/{x-pseudo.js → x-pseudo.mjs} +5 -4
  297. package/locales/yo.d.mts +6 -0
  298. package/locales/{yo.js → yo.mjs} +4 -2
  299. package/locales/zh-cn.d.mts +9 -0
  300. package/locales/zh-cn.mjs +12 -0
  301. package/locales/zh-hk.d.mts +9 -0
  302. package/locales/zh-hk.mjs +21 -0
  303. package/locales/zh-mo.d.mts +9 -0
  304. package/locales/zh-mo.mjs +21 -0
  305. package/locales/zh-tw.d.mts +9 -0
  306. package/locales/zh-tw.mjs +21 -0
  307. package/locales/{zh.d.ts → zh.d.mts} +1 -4
  308. package/{chunks/BXRGSAJG.js → locales/zh.mjs} +5 -4
  309. package/package.json +29 -23
  310. package/plugins/advancedFormat/index.d.mts +6 -0
  311. package/plugins/advancedFormat/{index.js → index.mjs} +4 -6
  312. package/plugins/advancedParse/index.d.mts +6 -0
  313. package/plugins/advancedParse/{index.js → index.mjs} +21 -20
  314. package/plugins/calendar/{index.d.ts → index.d.mts} +2 -4
  315. package/plugins/calendar/{index.js → index.mjs} +1 -2
  316. package/plugins/dayOfYear/{index.d.ts → index.d.mts} +1 -2
  317. package/plugins/dayOfYear/{index.js → index.mjs} +1 -2
  318. package/plugins/duration/index.d.mts +78 -0
  319. package/plugins/duration/index.mjs +477 -0
  320. package/plugins/isBetween/{index.d.ts → index.d.mts} +1 -2
  321. package/plugins/isBetween/{index.js → index.mjs} +2 -3
  322. package/plugins/isLeapYear/{index.d.ts → index.d.mts} +1 -2
  323. package/plugins/isLeapYear/{index.js → index.mjs} +1 -2
  324. package/plugins/isSameOrAfter/{index.d.ts → index.d.mts} +1 -2
  325. package/plugins/isSameOrAfter/{index.js → index.mjs} +1 -2
  326. package/plugins/isSameOrBefore/{index.d.ts → index.d.mts} +1 -2
  327. package/plugins/isSameOrBefore/{index.js → index.mjs} +1 -2
  328. package/plugins/isToday/{index.d.ts → index.d.mts} +1 -2
  329. package/plugins/isToday/{index.js → index.mjs} +2 -3
  330. package/plugins/isTomorrow/{index.d.ts → index.d.mts} +1 -2
  331. package/plugins/isTomorrow/{index.js → index.mjs} +2 -3
  332. package/plugins/isYesterday/{index.d.ts → index.d.mts} +1 -2
  333. package/plugins/isYesterday/{index.js → index.mjs} +2 -3
  334. package/plugins/isoWeek/{index.d.ts → index.d.mts} +1 -3
  335. package/plugins/isoWeek/{index.js → index.mjs} +13 -25
  336. package/{chunks/St35qgL0.d.ts → plugins/locale/index.d.mts} +5 -4
  337. package/{chunks/CoBtJ4c1.js → plugins/locale/index.mjs} +13 -16
  338. package/plugins/localeData/index.d.mts +6 -0
  339. package/plugins/localeData/{index.js → index.mjs} +18 -11
  340. package/plugins/localizedFormat/index.d.mts +6 -0
  341. package/plugins/localizedFormat/{index.js → index.mjs} +5 -10
  342. package/plugins/localizedParse/index.d.mts +6 -0
  343. package/plugins/localizedParse/{index.js → index.mjs} +40 -22
  344. package/plugins/minMax/{index.d.ts → index.d.mts} +1 -2
  345. package/plugins/minMax/{index.js → index.mjs} +2 -3
  346. package/plugins/objectSupport/index.d.mts +6 -0
  347. package/plugins/objectSupport/{index.js → index.mjs} +33 -38
  348. package/plugins/pluralGetSet/{index.d.ts → index.d.mts} +1 -3
  349. package/plugins/pluralGetSet/{index.js → index.mjs} +1 -2
  350. package/plugins/quarterOfYear/{index.d.ts → index.d.mts} +1 -3
  351. package/plugins/quarterOfYear/{index.js → index.mjs} +11 -18
  352. package/plugins/relativeTime/index.d.mts +47 -0
  353. package/plugins/relativeTime/index.mjs +187 -0
  354. package/plugins/timezone/index.d.mts +6 -0
  355. package/plugins/timezone/index.mjs +456 -0
  356. package/plugins/toArray/{index.d.ts → index.d.mts} +1 -2
  357. package/plugins/toArray/{index.js → index.mjs} +1 -2
  358. package/plugins/toObject/{index.d.ts → index.d.mts} +1 -2
  359. package/plugins/toObject/{index.js → index.mjs} +1 -2
  360. package/plugins/utc/{index.d.ts → index.d.mts} +1 -2
  361. package/plugins/utc/{index.js → index.mjs} +37 -39
  362. package/plugins/week/{index.d.ts → index.d.mts} +1 -3
  363. package/plugins/week/{index.js → index.mjs} +17 -27
  364. package/chunks/BtmEtAW3.js +0 -43
  365. package/chunks/DjY7KvwG.js +0 -28
  366. package/index.d.ts +0 -3
  367. package/locales/af.d.ts +0 -8
  368. package/locales/am.d.ts +0 -8
  369. package/locales/ar-dz.d.ts +0 -11
  370. package/locales/ar-iq.d.ts +0 -11
  371. package/locales/ar-iq.js +0 -14
  372. package/locales/ar-kw.d.ts +0 -11
  373. package/locales/ar-ly.d.ts +0 -11
  374. package/locales/ar-ly.js +0 -14
  375. package/locales/ar-ma.d.ts +0 -11
  376. package/locales/ar-sa.d.ts +0 -11
  377. package/locales/ar-tn.d.ts +0 -11
  378. package/locales/ar.d.ts +0 -8
  379. package/locales/ar.js +0 -3
  380. package/locales/az.d.ts +0 -8
  381. package/locales/be.d.ts +0 -8
  382. package/locales/bg.d.ts +0 -8
  383. package/locales/bi.d.ts +0 -8
  384. package/locales/bm.d.ts +0 -8
  385. package/locales/bn-bd.d.ts +0 -11
  386. package/locales/bn.d.ts +0 -8
  387. package/locales/bn.js +0 -3
  388. package/locales/bo.d.ts +0 -8
  389. package/locales/br.d.ts +0 -8
  390. package/locales/bs.d.ts +0 -8
  391. package/locales/ca.d.ts +0 -8
  392. package/locales/cs.d.ts +0 -8
  393. package/locales/cv.d.ts +0 -8
  394. package/locales/cy.d.ts +0 -8
  395. package/locales/da.d.ts +0 -8
  396. package/locales/de-at.d.ts +0 -11
  397. package/locales/de-ch.d.ts +0 -11
  398. package/locales/de-ch.js +0 -14
  399. package/locales/de.d.ts +0 -8
  400. package/locales/de.js +0 -3
  401. package/locales/dv.d.ts +0 -8
  402. package/locales/el.d.ts +0 -8
  403. package/locales/en-au.d.ts +0 -11
  404. package/locales/en-ca.d.ts +0 -11
  405. package/locales/en-ie.d.ts +0 -11
  406. package/locales/en-il.d.ts +0 -11
  407. package/locales/en-in.d.ts +0 -11
  408. package/locales/en-nz.d.ts +0 -11
  409. package/locales/en-sg.d.ts +0 -11
  410. package/locales/en-tt.d.ts +0 -11
  411. package/locales/en-us.d.ts +0 -11
  412. package/locales/en-us.js +0 -13
  413. package/locales/en.d.ts +0 -8
  414. package/locales/en.js +0 -3
  415. package/locales/eo.d.ts +0 -8
  416. package/locales/es-do.d.ts +0 -11
  417. package/locales/es-mx.d.ts +0 -11
  418. package/locales/es-mx.js +0 -15
  419. package/locales/es-pr.d.ts +0 -11
  420. package/locales/es-pr.js +0 -18
  421. package/locales/es-us.d.ts +0 -11
  422. package/locales/es-us.js +0 -14
  423. package/locales/es.d.ts +0 -8
  424. package/locales/es.js +0 -3
  425. package/locales/et.d.ts +0 -8
  426. package/locales/eu.d.ts +0 -8
  427. package/locales/fa.d.ts +0 -8
  428. package/locales/fi.d.ts +0 -8
  429. package/locales/fil.d.ts +0 -8
  430. package/locales/fo.d.ts +0 -8
  431. package/locales/fr-ca.d.ts +0 -11
  432. package/locales/fr-ca.js +0 -18
  433. package/locales/fr-ch.d.ts +0 -11
  434. package/locales/fr-ch.js +0 -18
  435. package/locales/fr.d.ts +0 -8
  436. package/locales/fr.js +0 -3
  437. package/locales/fy.d.ts +0 -8
  438. package/locales/ga.d.ts +0 -8
  439. package/locales/gd.d.ts +0 -8
  440. package/locales/gl.d.ts +0 -8
  441. package/locales/gom-deva.d.ts +0 -8
  442. package/locales/gom-latn.d.ts +0 -8
  443. package/locales/gu.d.ts +0 -8
  444. package/locales/he.d.ts +0 -8
  445. package/locales/hi.d.ts +0 -8
  446. package/locales/hr.d.ts +0 -8
  447. package/locales/ht.d.ts +0 -8
  448. package/locales/hu.d.ts +0 -8
  449. package/locales/hy-am.d.ts +0 -8
  450. package/locales/id.d.ts +0 -8
  451. package/locales/is.d.ts +0 -8
  452. package/locales/it-ch.d.ts +0 -11
  453. package/locales/it.d.ts +0 -8
  454. package/locales/it.js +0 -3
  455. package/locales/jv.d.ts +0 -8
  456. package/locales/ka.d.ts +0 -8
  457. package/locales/kk.d.ts +0 -8
  458. package/locales/km.d.ts +0 -8
  459. package/locales/kn.d.ts +0 -8
  460. package/locales/ko.d.ts +0 -8
  461. package/locales/ku.d.ts +0 -8
  462. package/locales/ky.d.ts +0 -8
  463. package/locales/lb.d.ts +0 -8
  464. package/locales/lo.d.ts +0 -8
  465. package/locales/lt.d.ts +0 -8
  466. package/locales/lv.d.ts +0 -8
  467. package/locales/me.d.ts +0 -8
  468. package/locales/mi.d.ts +0 -8
  469. package/locales/mk.d.ts +0 -8
  470. package/locales/ml.d.ts +0 -8
  471. package/locales/mn.d.ts +0 -8
  472. package/locales/mr.d.ts +0 -8
  473. package/locales/ms-my.d.ts +0 -11
  474. package/locales/ms-my.js +0 -14
  475. package/locales/ms.d.ts +0 -8
  476. package/locales/ms.js +0 -3
  477. package/locales/mt.d.ts +0 -8
  478. package/locales/my.d.ts +0 -8
  479. package/locales/nb.d.ts +0 -8
  480. package/locales/ne.d.ts +0 -8
  481. package/locales/nl-be.d.ts +0 -11
  482. package/locales/nl-be.js +0 -18
  483. package/locales/nl.d.ts +0 -8
  484. package/locales/nl.js +0 -3
  485. package/locales/nn.d.ts +0 -8
  486. package/locales/oc-lnc.d.ts +0 -8
  487. package/locales/pa-in.d.ts +0 -8
  488. package/locales/pl.d.ts +0 -8
  489. package/locales/pt-br.d.ts +0 -11
  490. package/locales/pt.d.ts +0 -8
  491. package/locales/pt.js +0 -3
  492. package/locales/rn.d.ts +0 -8
  493. package/locales/ro.d.ts +0 -8
  494. package/locales/rw.d.ts +0 -8
  495. package/locales/sd.d.ts +0 -8
  496. package/locales/se.d.ts +0 -8
  497. package/locales/si.d.ts +0 -8
  498. package/locales/sk.d.ts +0 -8
  499. package/locales/sl.d.ts +0 -8
  500. package/locales/sq.d.ts +0 -8
  501. package/locales/sr-cyrl.d.ts +0 -11
  502. package/locales/sr.d.ts +0 -8
  503. package/locales/sr.js +0 -3
  504. package/locales/ss.d.ts +0 -8
  505. package/locales/sv-fi.d.ts +0 -11
  506. package/locales/sv.d.ts +0 -8
  507. package/locales/sv.js +0 -3
  508. package/locales/sw.d.ts +0 -8
  509. package/locales/ta.d.ts +0 -8
  510. package/locales/te.d.ts +0 -8
  511. package/locales/tet.d.ts +0 -8
  512. package/locales/tg.d.ts +0 -8
  513. package/locales/th.d.ts +0 -8
  514. package/locales/tk.d.ts +0 -8
  515. package/locales/tl-ph.d.ts +0 -8
  516. package/locales/tlh.d.ts +0 -8
  517. package/locales/tr.d.ts +0 -8
  518. package/locales/tzl.d.ts +0 -8
  519. package/locales/tzm-latn.d.ts +0 -11
  520. package/locales/tzm.d.ts +0 -8
  521. package/locales/tzm.js +0 -3
  522. package/locales/ug-cn.d.ts +0 -8
  523. package/locales/uk.d.ts +0 -8
  524. package/locales/ur.d.ts +0 -8
  525. package/locales/uz-latn.d.ts +0 -11
  526. package/locales/uz.d.ts +0 -8
  527. package/locales/uz.js +0 -3
  528. package/locales/vi.d.ts +0 -8
  529. package/locales/x-pseudo.d.ts +0 -8
  530. package/locales/yo.d.ts +0 -8
  531. package/locales/zh-cn.d.ts +0 -11
  532. package/locales/zh-cn.js +0 -14
  533. package/locales/zh-hk.d.ts +0 -11
  534. package/locales/zh-hk.js +0 -23
  535. package/locales/zh-mo.d.ts +0 -11
  536. package/locales/zh-mo.js +0 -23
  537. package/locales/zh-tw.d.ts +0 -11
  538. package/locales/zh-tw.js +0 -23
  539. package/locales/zh.js +0 -3
  540. package/plugins/advancedFormat/index.d.ts +0 -8
  541. package/plugins/advancedParse/index.d.ts +0 -8
  542. package/plugins/locale/index.d.ts +0 -4
  543. package/plugins/locale/index.js +0 -7
  544. package/plugins/localeData/index.d.ts +0 -8
  545. package/plugins/localizedFormat/index.d.ts +0 -8
  546. package/plugins/localizedParse/index.d.ts +0 -8
  547. package/plugins/objectSupport/index.d.ts +0 -8
  548. package/plugins/relativeTime/index.d.ts +0 -59
  549. package/plugins/relativeTime/index.js +0 -154
@@ -1,7 +1,7 @@
1
- import { constants_default } from "../../chunks/Y32qdU_5.js";
2
- import { isUndefined } from "../../chunks/Cb5SvF6r.js";
3
- import { createInstanceFromExist } from "../../chunks/DXHbH1CI.js";
4
- import { padStart } from "../../chunks/BRRrAbUl.js";
1
+ import { p as constants_default } from "../../chunks/BkjWOpMU.js";
2
+ import { a as isUndefined } from "../../chunks/v_QBn7Xm.js";
3
+ import { t as createInstanceFromExist } from "../../chunks/Shk32pTP.js";
4
+ import { n as padStart } from "../../chunks/CdvTtmWL.js";
5
5
 
6
6
  //#region src/plugins/isoWeek/index.ts
7
7
  const weekStart = constants_default.INDEX_MONDAY;
@@ -43,8 +43,7 @@ function addIsoWeekProperty(property) {
43
43
  * @returns converted 4-digit year
44
44
  */
45
45
  function parseTwoDigitYear(input) {
46
- const inputLimited = input.slice(0, 2);
47
- const year = +inputLimited;
46
+ const year = +input.slice(0, 2);
48
47
  return year + (year > 68 ? 1900 : 2e3);
49
48
  }
50
49
  /**
@@ -71,8 +70,7 @@ const isoWeekPlugin = (_, dayClass, dayFactory) => {
71
70
  if (!(Number.isNaN(parsedDate.valueOf()) || isUndefined(parsedElements.isoWeek)) && isUndefined(parsedElements.date)) {
72
71
  const newEsday = createInstanceFromExist(parsedDate, this);
73
72
  const parsedIsoWeek = parsedElements.isoWeek;
74
- const modifiedEsday = newEsday.isoWeek(parsedIsoWeek).isoWeekday(weekStart);
75
- modifiedDate = modifiedEsday.toDate();
73
+ modifiedDate = newEsday.isoWeek(parsedIsoWeek).isoWeekday(weekStart).toDate();
76
74
  }
77
75
  return modifiedDate;
78
76
  }
@@ -89,8 +87,7 @@ const isoWeekPlugin = (_, dayClass, dayFactory) => {
89
87
  if (!(Number.isNaN(parsedDate.valueOf()) || isUndefined(parsedElements.isoWeekday)) && isUndefined(parsedElements.month)) {
90
88
  const newEsday = createInstanceFromExist(parsedDate, this);
91
89
  const newIsoWeekday = parsedElements.isoWeekday;
92
- const modifiedEsday = newEsday.isoWeekday(newIsoWeekday);
93
- modifiedDate = modifiedEsday.toDate();
90
+ modifiedDate = newEsday.isoWeekday(newIsoWeekday).toDate();
94
91
  }
95
92
  return modifiedDate;
96
93
  }
@@ -111,10 +108,7 @@ const isoWeekPlugin = (_, dayClass, dayFactory) => {
111
108
  let modifiedEsday = newEsday.isoWeekYear(parsedIsoWeekYear);
112
109
  modifiedEsday = modifiedEsday.year(parsedIsoWeekYear).isoWeek(1).isoWeekday(1);
113
110
  modifiedDate = modifiedEsday.toDate();
114
- } else if (!isUndefined(parsedElements.isoWeek)) {
115
- const modifiedEsday = newEsday.isoWeekYear(parsedIsoWeekYear);
116
- modifiedDate = modifiedEsday.toDate();
117
- }
111
+ } else if (!isUndefined(parsedElements.isoWeek)) modifiedDate = newEsday.isoWeekYear(parsedIsoWeekYear).toDate();
118
112
  }
119
113
  return modifiedDate;
120
114
  }
@@ -131,8 +125,7 @@ const isoWeekPlugin = (_, dayClass, dayFactory) => {
131
125
  return this.add((newIsoWeek - this.isoWeek()) * 7, constants_default.DAY).isoWeekday(currentWeekday).hour(h, m, s, ms);
132
126
  }
133
127
  let yearStartDate = this.month(0, yearStart).hour(0, 0, 0, 0);
134
- const yearStartWeekday = yearStartDate.day();
135
- const diffToWeekStart = (7 + yearStartWeekday - weekStart) % 7;
128
+ const diffToWeekStart = (7 + yearStartDate.day() - weekStart) % 7;
136
129
  yearStartDate = yearStartDate.subtract(diffToWeekStart, constants_default.DAY);
137
130
  if (this.valueOf() < yearStartDate.valueOf()) return this.subtract(1, constants_default.YEAR).isoWeeksInYear();
138
131
  return this.diff(yearStartDate, constants_default.WEEK) + 1;
@@ -185,21 +178,17 @@ const isoWeekPlugin = (_, dayClass, dayFactory) => {
185
178
  };
186
179
  const oldEndOf = proto.endOf;
187
180
  proto.endOf = function(units) {
188
- if (units === constants_default.ISOWEEK) {
189
- const weekEnd = 7;
190
- return this.date(this.date() + (weekEnd - this.isoWeekday())).endOf(constants_default.DAY);
191
- }
181
+ if (units === constants_default.ISOWEEK) return this.date(this.date() + (7 - this.isoWeekday())).endOf(constants_default.DAY);
192
182
  return oldEndOf.call(this, units);
193
183
  };
194
- const additionalTokens = {
184
+ dayFactory.addFormatTokenDefinitions({
195
185
  W: (sourceDate) => sourceDate.isoWeek().toString(),
196
186
  WW: (sourceDate) => padStart(sourceDate.isoWeek(), 2, "0"),
197
187
  Wo: (sourceDate) => toOrdinal(sourceDate, sourceDate.isoWeek()),
198
188
  E: (sourceDate) => sourceDate.isoWeekday().toString(),
199
189
  GG: (sourceDate) => padStart(sourceDate.isoWeekYear(), 2, "0").slice(-2),
200
190
  GGGG: (sourceDate) => padStart(sourceDate.isoWeekYear(), 4, "0")
201
- };
202
- dayFactory.addFormatTokenDefinitions(additionalTokens);
191
+ });
203
192
  const parseTokensDefinitions = {
204
193
  W: [
205
194
  match1to2,
@@ -234,7 +223,6 @@ const isoWeekPlugin = (_, dayClass, dayFactory) => {
234
223
  };
235
224
  dayFactory.addParseTokenDefinitions?.(parseTokensDefinitions);
236
225
  };
237
- var isoWeek_default = isoWeekPlugin;
238
226
 
239
227
  //#endregion
240
- export { isoWeek_default as default };
228
+ export { isoWeekPlugin as default };
@@ -1,4 +1,4 @@
1
- import { EsDay, EsDayPlugin } from "./DqhiVwLi.js";
1
+ import { o as EsDayPlugin, t as EsDay } from "../../chunks/CODi8AFH.js";
2
2
 
3
3
  //#region src/plugins/locale/types.d.ts
4
4
  type ReadonlyTuple<T, N extends number, R extends readonly T[] = []> = R['length'] extends N ? R : ReadonlyTuple<T, N, readonly [T, ...R]>;
@@ -46,8 +46,8 @@ interface Calendar {
46
46
  sameElse: CalendarSpecVal;
47
47
  }
48
48
  type CalendarPartial = Partial<Calendar>;
49
- type RelativeTimeElementFunction = (timeValue: string | number, withoutSuffix: boolean, token: string, isFuture: boolean) => string;
50
- type RelativeTimeKeys = 'future' | 'past' | 's' | 'ss' | 'm' | 'mm' | 'h' | 'hh' | 'd' | 'dd' | 'M' | 'MM' | 'y' | 'yy';
49
+ type RelativeTimeKeys = 'future' | 'past' | 's' | 'ss' | 'm' | 'mm' | 'h' | 'hh' | 'd' | 'dd' | 'w' | 'ww' | 'M' | 'MM' | 'y' | 'yy';
50
+ type RelativeTimeElementFunction = (timeValue: string | number, withoutSuffix: boolean, token: RelativeTimeKeys, isFuture: boolean) => string;
51
51
  interface Locale {
52
52
  /**
53
53
  * Name of the locale
@@ -70,6 +70,7 @@ interface Locale {
70
70
  readonly weekdaysMin: DayNames;
71
71
  readonly months: MonthNames | MonthNamesStandaloneFormat | MonthNamesFunction;
72
72
  readonly monthsShort: MonthNames | MonthNamesStandaloneFormat | MonthNamesFunction;
73
+ readonly dayOfMonthOrdinalParse: RegExp;
73
74
  readonly ordinal: (number: number, period?: string) => string;
74
75
  readonly weekStart: number;
75
76
  readonly yearStart: number;
@@ -100,4 +101,4 @@ declare function setLocaleProperty(targetLocale: Locale, propName: string, newVa
100
101
  declare function cloneLocale(source: Locale): Locale;
101
102
  declare const localePlugin: EsDayPlugin<{}>;
102
103
  //#endregion
103
- export { Calendar, CalendarPartial, CalendarSpecVal, CalendarSpecValFunction, DayNames, DayNamesStandaloneFormat, Locale, LocaleFormatKeys, MonthNames, MonthNamesFunction, MonthNamesStandaloneFormat, RelativeTimeElementFunction, RelativeTimeKeys, cloneLocale, localePlugin, setLocaleProperty };
104
+ export { Calendar, CalendarPartial, CalendarSpecVal, CalendarSpecValFunction, DayNames, DayNamesStandaloneFormat, Locale, LocaleFormatKeys, MonthNames, MonthNamesFunction, MonthNamesStandaloneFormat, RelativeTimeElementFunction, RelativeTimeKeys, cloneLocale, localePlugin as default, setLocaleProperty };
@@ -1,13 +1,13 @@
1
- import { constants_default } from "./Y32qdU_5.js";
2
- import { undefinedOr } from "./Cb5SvF6r.js";
3
- import { normalizeUnit } from "./DjY7KvwG.js";
4
- import { en_default } from "./tfkJ5D3p.js";
1
+ import { p as constants_default } from "../../chunks/BkjWOpMU.js";
2
+ import { s as undefinedOr } from "../../chunks/v_QBn7Xm.js";
3
+ import { t as normalizeUnit } from "../../chunks/AyQQ6US-.js";
4
+ import localeEn from "../../locales/en.mjs";
5
5
 
6
6
  //#region src/plugins/locale/index.ts
7
7
  const LocaleStore = /* @__PURE__ */ new Map();
8
8
  let $localeGlobal = "en";
9
9
  function getLocale(name) {
10
- return LocaleStore.get(name) || en_default;
10
+ return LocaleStore.get(name) || localeEn;
11
11
  }
12
12
  function registerLocale(locale, rename) {
13
13
  LocaleStore.set(rename || locale.name, locale);
@@ -16,9 +16,8 @@ function unregisterLocale(name) {
16
16
  LocaleStore.delete(name);
17
17
  }
18
18
  function updateLocale(localeName, locale) {
19
- const existingLocale = getLocale(localeName);
20
19
  const updatedLocale = {
21
- ...existingLocale,
20
+ ...getLocale(localeName),
22
21
  ...locale
23
22
  };
24
23
  LocaleStore.set(localeName, updatedLocale);
@@ -57,6 +56,7 @@ function cloneObject(sourceObject) {
57
56
  const result = {};
58
57
  for (const [key, sourceValue] of Object.entries(sourceObject)) if (typeof sourceValue === "string" || typeof sourceValue === "number" || typeof sourceValue === "function") setObjectProperty(result, key, sourceValue);
59
58
  else if (Array.isArray(sourceValue)) setObjectProperty(result, key, structuredClone(sourceValue));
59
+ else if (sourceValue instanceof RegExp) setObjectProperty(result, key, new RegExp(sourceValue.source, sourceValue.flags));
60
60
  else if (typeof sourceValue === "object") setObjectProperty(result, key, cloneObject(sourceValue));
61
61
  return result;
62
62
  }
@@ -72,8 +72,8 @@ function cloneLocale(source) {
72
72
  return cloneObject(source);
73
73
  }
74
74
  function getSetPrivateLocaleName(inst, newLocaleName) {
75
- if (newLocaleName) inst["$conf"]["$locale_name"] = newLocaleName;
76
- return inst["$conf"]["$locale_name"] || $localeGlobal;
75
+ if (newLocaleName) inst["$conf"]["localeName"] = newLocaleName;
76
+ return inst["$conf"]["localeName"] || "";
77
77
  }
78
78
  const localePlugin = (_, dayClass, dayFactory) => {
79
79
  dayClass.prototype.localeObject = function() {
@@ -93,8 +93,8 @@ const localePlugin = (_, dayClass, dayFactory) => {
93
93
  };
94
94
  const oldParse = dayClass.prototype["$parse"];
95
95
  dayClass.prototype["$parse"] = function(d) {
96
- oldParse.call(this, d);
97
96
  getSetPrivateLocaleName(this, $localeGlobal);
97
+ oldParse.call(this, d);
98
98
  };
99
99
  const oldStartOf = dayClass.prototype["startOf"];
100
100
  const oldEndOf = dayClass.prototype["endOf"];
@@ -110,12 +110,10 @@ const localePlugin = (_, dayClass, dayFactory) => {
110
110
  return inst;
111
111
  };
112
112
  dayClass.prototype["startOf"] = function(unit) {
113
- const inst = oldStartOf.call(this, unit);
114
- return fixDiff(inst, this, unit);
113
+ return fixDiff(oldStartOf.call(this, unit), this, unit);
115
114
  };
116
115
  dayClass.prototype["endOf"] = function(unit) {
117
- const inst = oldEndOf.call(this, unit);
118
- return fixDiff(inst, this, unit, true);
116
+ return fixDiff(oldEndOf.call(this, unit), this, unit, true);
119
117
  };
120
118
  dayFactory.locale = (localeName) => {
121
119
  if (localeName === void 0) return $localeGlobal;
@@ -138,7 +136,6 @@ const localePlugin = (_, dayClass, dayFactory) => {
138
136
  return dayFactory;
139
137
  };
140
138
  };
141
- var locale_default = localePlugin;
142
139
 
143
140
  //#endregion
144
- export { cloneLocale, locale_default, setLocaleProperty };
141
+ export { cloneLocale, localePlugin as default, setLocaleProperty };
@@ -0,0 +1,6 @@
1
+ import { o as EsDayPlugin } from "../../chunks/CODi8AFH.js";
2
+
3
+ //#region src/plugins/localeData/index.d.ts
4
+ declare const localeDataPlugin: EsDayPlugin<{}>;
5
+ //#endregion
6
+ export { localeDataPlugin as default };
@@ -1,5 +1,15 @@
1
+ import { t as esday } from "../../chunks/CXWzCl3n.js";
2
+
1
3
  //#region src/plugins/localeData/index.ts
2
4
  /**
5
+ * LocaleData plugin
6
+ *
7
+ * This plugin adds 'method1', 'method2' and formatting and parsing tokens to EsDay
8
+ *
9
+ * This plugin requires the 'Locale' plugin. For using the 'weekdays' function to
10
+ * format a date, the plugin 'Week' is required too.
11
+ */
12
+ /**
3
13
  * Get list of month names or format a date as month (short or long month name).
4
14
  * @param locale - locale to use
5
15
  * @param propName - name of the property to extract
@@ -69,8 +79,7 @@ const getMonths = (locale, propName, date, format) => {
69
79
  * @returns full format of abbreviated date-time format
70
80
  */
71
81
  const getLongDateFormat = (locale, format) => {
72
- const formatsArray = locale.formats;
73
- return formatsArray[format] ?? "";
82
+ return locale.formats[format] ?? "";
74
83
  };
75
84
  /**
76
85
  * Get a locale dependant format for relative dates.
@@ -85,8 +94,10 @@ const getCalendar = (locale, key, date, now) => {
85
94
  const defaultKey = "sameElse";
86
95
  const calendarArray = locale.calendar;
87
96
  const calendarEntry = calendarArray[key ?? defaultKey] ?? calendarArray[defaultKey];
97
+ const nowDate = now ?? esday();
88
98
  if (typeof calendarEntry === "function") {
89
- if (date !== void 0) result = calendarEntry.call(date, now);
99
+ /* istanbul ignore else -- @preserve */
100
+ if (date !== void 0) result = calendarEntry.call(date, nowDate);
90
101
  } else result = calendarEntry;
91
102
  return result;
92
103
  };
@@ -101,8 +112,7 @@ const getCalendar = (locale, key, date, now) => {
101
112
  */
102
113
  const getRelativeTime = (locale, timeValue, withoutSuffix, token, isFuture) => {
103
114
  let result = "";
104
- const relativeTimeArray = locale.relativeTime;
105
- const relativeTimeEntry = relativeTimeArray[token];
115
+ const relativeTimeEntry = locale.relativeTime[token];
106
116
  if (typeof relativeTimeEntry === "function") result = relativeTimeEntry(timeValue, withoutSuffix, token, isFuture);
107
117
  else result = relativeTimeEntry.replace(/%d/i, timeValue.toString());
108
118
  return result;
@@ -129,12 +139,10 @@ const createLocaleDataObject = (locale) => {
129
139
  const localeDataPlugin = (_, dayClass, dayFactory) => {
130
140
  const proto = dayClass.prototype;
131
141
  proto.localeData = function() {
132
- const locale = this.localeObject();
133
- return createLocaleDataObject(locale);
142
+ return createLocaleDataObject(this.localeObject());
134
143
  };
135
144
  dayFactory.localeData = (localeName) => {
136
- const locale = localeName !== void 0 ? dayFactory.getLocale(localeName) : dayFactory.getLocale(dayFactory.locale());
137
- return createLocaleDataObject(locale);
145
+ return createLocaleDataObject(localeName !== void 0 ? dayFactory.getLocale(localeName) : dayFactory.getLocale(dayFactory.locale()));
138
146
  };
139
147
  dayFactory.months = () => getMonths(dayFactory.getLocale(dayFactory.locale()), "months");
140
148
  dayFactory.monthsShort = () => getMonths(dayFactory.getLocale(dayFactory.locale()), "monthsShort");
@@ -142,7 +150,6 @@ const localeDataPlugin = (_, dayClass, dayFactory) => {
142
150
  dayFactory.weekdaysShort = () => getWeekdays(dayFactory.getLocale(dayFactory.locale()), "weekdaysShort");
143
151
  dayFactory.weekdaysMin = () => getWeekdays(dayFactory.getLocale(dayFactory.locale()), "weekdaysMin");
144
152
  };
145
- var localeData_default = localeDataPlugin;
146
153
 
147
154
  //#endregion
148
- export { localeData_default as default };
155
+ export { localeDataPlugin as default };
@@ -0,0 +1,6 @@
1
+ import { o as EsDayPlugin } from "../../chunks/CODi8AFH.js";
2
+
3
+ //#region src/plugins/localizedFormat/index.d.ts
4
+ declare const localizedFormatPlugin: EsDayPlugin<{}>;
5
+ //#endregion
6
+ export { localizedFormatPlugin as default };
@@ -1,5 +1,5 @@
1
- import { isArray, isString } from "../../chunks/Cb5SvF6r.js";
2
- import { padNumberWithLeadingZeros } from "../../chunks/BRRrAbUl.js";
1
+ import { i as isString, t as isArray } from "../../chunks/v_QBn7Xm.js";
2
+ import { t as padNumberWithLeadingZeros } from "../../chunks/CdvTtmWL.js";
3
3
 
4
4
  //#region src/plugins/localizedFormat/index.ts
5
5
  /**
@@ -11,9 +11,7 @@ function addWeekday() {
11
11
  return function weekdayFormatter(sourceDate, format) {
12
12
  const weekdays = sourceDate.localeObject().weekdays;
13
13
  if (isArray(weekdays)) return weekdays[sourceDate.day()];
14
- const parseForUseFormat = weekdays.isFormat;
15
- const useFormatProperty = parseForUseFormat?.test(format);
16
- if (useFormatProperty) return weekdays.format[sourceDate.day()];
14
+ if (weekdays.isFormat?.test(format)) return weekdays.format[sourceDate.day()];
17
15
  return weekdays.standalone[sourceDate.day()];
18
16
  };
19
17
  }
@@ -29,9 +27,7 @@ function addMonth(property) {
29
27
  const months = sourceDate.localeObject()[property];
30
28
  if (isArray(months)) return months[sourceDate.month()];
31
29
  if (typeof months === "function") return months(sourceDate, format);
32
- const parseForUseFormat = months.isFormat ?? MONTHS_IN_FORMAT;
33
- const useFormatProperty = parseForUseFormat.test(format);
34
- if (useFormatProperty) return months.format[sourceDate.month()];
30
+ if ((months.isFormat ?? MONTHS_IN_FORMAT).test(format)) return months.format[sourceDate.month()];
35
31
  return months.standalone[sourceDate.month()];
36
32
  };
37
33
  }
@@ -82,7 +78,6 @@ const localizedFormatPlugin = (_, dayClass, dayFactory) => {
82
78
  return this.localeObject?.().postFormat?.(formattedValue) ?? formattedValue;
83
79
  };
84
80
  };
85
- var localizedFormat_default = localizedFormatPlugin;
86
81
 
87
82
  //#endregion
88
- export { localizedFormat_default as default };
83
+ export { localizedFormatPlugin as default };
@@ -0,0 +1,6 @@
1
+ import { o as EsDayPlugin } from "../../chunks/CODi8AFH.js";
2
+
3
+ //#region src/plugins/localizedParse/index.d.ts
4
+ declare const localizedParsePlugin: EsDayPlugin<{}>;
5
+ //#endregion
6
+ export { localizedParsePlugin as default };
@@ -1,18 +1,29 @@
1
- import { isArray, isString, isUndefined } from "../../chunks/Cb5SvF6r.js";
1
+ import { a as isUndefined, i as isString, t as isArray } from "../../chunks/v_QBn7Xm.js";
2
2
 
3
3
  //#region src/plugins/localizedParse/index.ts
4
4
  const match2 = /\d{2}/;
5
5
  const match1to2 = /\d\d?/;
6
6
  const matchWord = /\d*[^-_:/,()\s\d]+/;
7
+ const matchDayOfMonthOrdinalDefault = /\d{1,2}/;
8
+ /**
9
+ * Update parsing patterns that depend on the locale (e.g. 'Do')
10
+ * @param patterns - parseTokensDefinitions
11
+ * @param locale - locale to use
12
+ */
13
+ const updateParsingPatternsFromLocale = (patterns, locale) => {
14
+ const dayOfMonthOrdinalPattern = locale.dayOfMonthOrdinalParse;
15
+ patterns.Do[0] = dayOfMonthOrdinalPattern;
16
+ patterns.Do[1] = dayOfMonthOrdinalPattern;
17
+ };
7
18
  /**
8
19
  * Add 'input' to parsedElements as 'hours'.
9
20
  * @param parsedElements - object containing the components of a parsed date
10
21
  * @param input - parsed component of a date, to be transformed and inserted in parsedElements
11
22
  * @param options - parsing options e.g. containing the locale to use
12
23
  */
13
- function addHour(parsedElements, input, _parseOptions) {
24
+ const addHour = (parsedElements, input, _parseOptions) => {
14
25
  parsedElements["hours"] = +input;
15
- }
26
+ };
16
27
  /**
17
28
  * Convert parsed string to boolean 'afternoon'
18
29
  * @param locale - Locale to use
@@ -20,7 +31,7 @@ function addHour(parsedElements, input, _parseOptions) {
20
31
  * @param isLowerCase - should this be a lowercase meridiem string?
21
32
  * @returns is input an 'afternoon' string for given locale
22
33
  */
23
- function meridiemMatch(locale, input, isLowerCase) {
34
+ const meridiemMatch = (locale, input, isLowerCase) => {
24
35
  let isAfternoon = false;
25
36
  const { meridiem } = locale;
26
37
  if (meridiem) {
@@ -30,7 +41,7 @@ function meridiemMatch(locale, input, isLowerCase) {
30
41
  }
31
42
  } else isAfternoon = input === (isLowerCase ? "pm" : "PM");
32
43
  return isAfternoon;
33
- }
44
+ };
34
45
  /**
35
46
  * Create a function that will parse the input string as meridiem string and
36
47
  * add it to the given 'parsedElements' containing the date&time components.
@@ -38,14 +49,12 @@ function meridiemMatch(locale, input, isLowerCase) {
38
49
  * @param esday - global esday object (to get locale by its name)
39
50
  * @returns function that will add the given value to date&time component as 'afternoon'
40
51
  */
41
- function addAfternoon(isLowerCase, esday) {
52
+ const addAfternoon = (isLowerCase, esday) => {
42
53
  return function meridiemUpdater(parsedElements, input, parseOptions) {
43
54
  const localeName = parseOptions["locale"];
44
- const locale = esday.getLocale(localeName);
45
- const meridiem = meridiemMatch(locale, input, isLowerCase);
46
- if (!isUndefined(meridiem)) parsedElements.afternoon = meridiem;
55
+ parsedElements.afternoon = meridiemMatch(esday.getLocale(localeName), input, isLowerCase);
47
56
  };
48
- }
57
+ };
49
58
  /**
50
59
  * Parse day of month as ordinal number.
51
60
  * Create a function that will parse the input string as day of month as ordinal
@@ -53,7 +62,7 @@ function addAfternoon(isLowerCase, esday) {
53
62
  * @param esday - global esday object (to get locale by its name)
54
63
  * @returns function that will add the given value to date&time component as 'afternoon'
55
64
  */
56
- function addDayOfMonthOrdinal(esday) {
65
+ const addDayOfMonthOrdinal = (esday) => {
57
66
  return function monthOrdinalUpdater(parsedElements, input, parseOptions) {
58
67
  const localeName = parseOptions["locale"];
59
68
  const { ordinal } = esday.getLocale(localeName);
@@ -61,11 +70,11 @@ function addDayOfMonthOrdinal(esday) {
61
70
  const splittedInput = input.match(/^[^\d]*(\d+)[^\d]*$/);
62
71
  if (splittedInput !== null) {
63
72
  dateValue = +splittedInput[1];
64
- const dateAsOrdinal = ordinal?.(dateValue);
73
+ const dateAsOrdinal = ordinal?.(dateValue, "d");
65
74
  if (dateAsOrdinal === void 0 || dateAsOrdinal === input) parsedElements.date = dateValue;
66
75
  }
67
76
  };
68
- }
77
+ };
69
78
  /**
70
79
  * Create a function that will convert the value from the input string
71
80
  * to a month number and add it to the given 'parsedElements' containing
@@ -74,7 +83,7 @@ function addDayOfMonthOrdinal(esday) {
74
83
  * @param esday - global esday object (to get locale by its name)
75
84
  * @returns function that will add the given value to date&time component
76
85
  */
77
- function addMonth(property, esday) {
86
+ const addMonth = (property, esday) => {
78
87
  return function monthUpdater(parsedElements, input, parseOptions) {
79
88
  const localeName = parseOptions["locale"];
80
89
  const months = esday.getLocale(localeName)[property];
@@ -84,7 +93,7 @@ function addMonth(property, esday) {
84
93
  const matchIndex = monthNames.indexOf(input) + 1;
85
94
  parsedElements.month = matchIndex % 12 || matchIndex;
86
95
  };
87
- }
96
+ };
88
97
  /**
89
98
  * Replace locale dependent token in given format with values from locale definition
90
99
  * e.g. 'LTS' with 'h:mm:ss A'
@@ -92,13 +101,13 @@ function addMonth(property, esday) {
92
101
  * @param currentLocale - Locale to use
93
102
  * @returns format with locale dependent tokens replaced
94
103
  */
95
- function replaceLocaleTokens(format, currentLocale) {
104
+ const replaceLocaleTokens = (format, currentLocale) => {
96
105
  const localFormattingTokens = /(\[[^[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g;
97
106
  function replaceLongDateFormatTokens(input) {
98
107
  return currentLocale.formats[input] ?? input;
99
108
  }
100
109
  return format.replace(localFormattingTokens, replaceLongDateFormatTokens);
101
- }
110
+ };
102
111
  const localizedParsePlugin = (_, dayClass, dayFactory) => {
103
112
  const proto = dayClass.prototype;
104
113
  /**
@@ -155,8 +164,8 @@ const localizedParsePlugin = (_, dayClass, dayFactory) => {
155
164
  _postParseMeridiem
156
165
  ],
157
166
  Do: [
158
- matchWord,
159
- matchWord,
167
+ matchDayOfMonthOrdinalDefault,
168
+ matchDayOfMonthOrdinalDefault,
160
169
  addDayOfMonthOrdinal(dayFactory)
161
170
  ],
162
171
  MMM: [
@@ -180,7 +189,11 @@ const localizedParsePlugin = (_, dayClass, dayFactory) => {
180
189
  const format = this["$conf"].args_1;
181
190
  let currentLocale = this.localeObject?.();
182
191
  const arg2 = this["$conf"].args_2;
183
- if (!isUndefined(arg2) && typeof arg2 === "string") currentLocale = dayFactory.getLocale(arg2);
192
+ if (!isUndefined(arg2) && typeof arg2 === "string") {
193
+ currentLocale = dayFactory.getLocale(arg2);
194
+ this["$conf"].localeName = arg2;
195
+ }
196
+ updateParsingPatternsFromLocale(parseTokensDefinitions, currentLocale);
184
197
  const parseOptions = this["$conf"].parseOptions ?? {};
185
198
  parseOptions.locale = currentLocale.name;
186
199
  this["$conf"].parseOptions = parseOptions;
@@ -191,9 +204,14 @@ const localizedParsePlugin = (_, dayClass, dayFactory) => {
191
204
  let newDate = d;
192
205
  if (currentLocale.preParse !== void 0) newDate = currentLocale.preParse(d);
193
206
  oldParse.call(this, newDate);
207
+ if (this["$conf"].parseOptions !== void 0) {
208
+ /* istanbul ignore else -- @preserve */
209
+ if (this["$conf"].parseOptions?.locale !== void 0) delete this["$conf"].parseOptions.locale;
210
+ /* istanbul ignore else -- @preserve */
211
+ if (Object.keys(this["$conf"].parseOptions).length === 0) delete this["$conf"].parseOptions;
212
+ }
194
213
  };
195
214
  };
196
- var localizedParse_default = localizedParsePlugin;
197
215
 
198
216
  //#endregion
199
- export { localizedParse_default as default };
217
+ export { localizedParsePlugin as default };
@@ -1,5 +1,4 @@
1
- import { DateType, EsDayPlugin } from "../../chunks/DqhiVwLi.js";
2
- import "../../chunks/MtjcOKi-.js";
1
+ import { o as EsDayPlugin, r as DateType } from "../../chunks/CODi8AFH.js";
3
2
 
4
3
  //#region src/plugins/minMax/index.d.ts
5
4
  declare module 'esday' {
@@ -1,4 +1,4 @@
1
- import { isArray } from "../../chunks/Cb5SvF6r.js";
1
+ import { t as isArray } from "../../chunks/v_QBn7Xm.js";
2
2
 
3
3
  //#region src/plugins/minMax/index.ts
4
4
  const minMaxPlugin = (_, _dayClass, dayFactory) => {
@@ -16,7 +16,6 @@ const minMaxPlugin = (_, _dayClass, dayFactory) => {
16
16
  dayFactory.max = (...dates) => sortBy("isAfter", dates);
17
17
  dayFactory.min = (...dates) => sortBy("isBefore", dates);
18
18
  };
19
- var minMax_default = minMaxPlugin;
20
19
 
21
20
  //#endregion
22
- export { minMax_default as default };
21
+ export { minMaxPlugin as default };
@@ -0,0 +1,6 @@
1
+ import { o as EsDayPlugin } from "../../chunks/CODi8AFH.js";
2
+
3
+ //#region src/plugins/objectSupport/index.d.ts
4
+ declare const objectSupportPlugin: EsDayPlugin<{}>;
5
+ //#endregion
6
+ export { objectSupportPlugin as default };
@@ -1,7 +1,7 @@
1
- import { constants_default } from "../../chunks/Y32qdU_5.js";
2
- import { isEmptyObject, isObject } from "../../chunks/Cb5SvF6r.js";
3
- import { normalizeUnitWithPlurals } from "../../chunks/DjY7KvwG.js";
4
- import { createInstanceFromExist } from "../../chunks/DXHbH1CI.js";
1
+ import { p as constants_default } from "../../chunks/BkjWOpMU.js";
2
+ import { n as isEmptyObject, r as isObject } from "../../chunks/v_QBn7Xm.js";
3
+ import { n as normalizeUnitWithPlurals } from "../../chunks/AyQQ6US-.js";
4
+ import { t as createInstanceFromExist } from "../../chunks/Shk32pTP.js";
5
5
 
6
6
  //#region src/plugins/objectSupport/index.ts
7
7
  const objectSupportPlugin = (_, dayClass, _dayFactory) => {
@@ -22,36 +22,32 @@ const objectSupportPlugin = (_, dayClass, _dayFactory) => {
22
22
  ];
23
23
  const dateIncludesYear = dateKeys.includes("y") || dateKeys.includes(constants_default.YEAR) || dateKeys.includes(`${constants_default.YEAR}s`);
24
24
  const dateIncludesMonth = dateKeys.includes("M") || dateKeys.includes(constants_default.MONTH) || dateKeys.includes(`${constants_default.MONTH}s`);
25
- const dateIncludesDay = dateKeys.includes("D") || dateKeys.includes(constants_default.DAY_OF_MONTH) || dateKeys.includes(`${constants_default.DAY_OF_MONTH}s`) || dateKeys.includes("d") || dateKeys.includes(constants_default.DAY) || dateKeys.includes(`${constants_default.DAY}s`);
26
- if (dateIncludesDay && !dateIncludesMonth && !dateIncludesYear) dateArrayTuple[1] = now.month() + 1;
27
- for (const stringKey of dateKeys) {
28
- const key = normalizeUnitWithPlurals(stringKey);
29
- switch (key) {
30
- case constants_default.YEAR:
31
- dateArrayTuple[0] = Number(date[stringKey]);
32
- break;
33
- case constants_default.MONTH:
34
- dateArrayTuple[1] = Number(date[stringKey]) + 1;
35
- break;
36
- case constants_default.DAY:
37
- case constants_default.DAY_OF_MONTH:
38
- dateArrayTuple[2] = Number(date[stringKey]);
39
- break;
40
- case constants_default.HOUR:
41
- dateArrayTuple[3] = Number(date[stringKey]);
42
- break;
43
- case constants_default.MIN:
44
- dateArrayTuple[4] = Number(date[stringKey]);
45
- break;
46
- case constants_default.SECOND:
47
- dateArrayTuple[5] = Number(date[stringKey]);
48
- break;
49
- case constants_default.MS:
50
- dateArrayTuple[6] = Number(date[stringKey]);
51
- break;
52
- }
25
+ if ((dateKeys.includes("D") || dateKeys.includes(constants_default.DAY_OF_MONTH) || dateKeys.includes(`${constants_default.DAY_OF_MONTH}s`) || dateKeys.includes("d") || dateKeys.includes(constants_default.DAY) || dateKeys.includes(`${constants_default.DAY}s`)) && !dateIncludesMonth && !dateIncludesYear) dateArrayTuple[1] = now.month() + 1;
26
+ for (const stringKey of dateKeys) switch (normalizeUnitWithPlurals(stringKey)) {
27
+ case constants_default.YEAR:
28
+ dateArrayTuple[0] = Number(date[stringKey]);
29
+ break;
30
+ case constants_default.MONTH:
31
+ dateArrayTuple[1] = Number(date[stringKey]) + 1;
32
+ break;
33
+ case constants_default.DAY:
34
+ case constants_default.DAY_OF_MONTH:
35
+ dateArrayTuple[2] = Number(date[stringKey]);
36
+ break;
37
+ case constants_default.HOUR:
38
+ dateArrayTuple[3] = Number(date[stringKey]);
39
+ break;
40
+ case constants_default.MIN:
41
+ dateArrayTuple[4] = Number(date[stringKey]);
42
+ break;
43
+ case constants_default.SECOND:
44
+ dateArrayTuple[5] = Number(date[stringKey]);
45
+ break;
46
+ case constants_default.MS:
47
+ dateArrayTuple[6] = Number(date[stringKey]);
48
+ break;
53
49
  }
54
- this["$d"] = this.dateFromDateComponents(...dateArrayTuple);
50
+ this.$d = this.dateFromDateComponents(...dateArrayTuple);
55
51
  } else oldParse.call(this, date);
56
52
  };
57
53
  const old$set = proto["$set"];
@@ -63,7 +59,7 @@ const objectSupportPlugin = (_, dayClass, _dayFactory) => {
63
59
  for (const stringKey of keys) {
64
60
  const key = stringKey;
65
61
  const valueToSet = valuesToSet[key];
66
- result = old$set.call(result, key, [valueToSet]);
62
+ if (valueToSet !== void 0) result = result.set(key, valueToSet);
67
63
  }
68
64
  return result;
69
65
  }
@@ -77,7 +73,7 @@ const objectSupportPlugin = (_, dayClass, _dayFactory) => {
77
73
  for (const stringKey of keys) {
78
74
  const key = stringKey;
79
75
  const valueToAdd = value[key];
80
- result = oldAdd.call(result, valueToAdd, key);
76
+ if (valueToAdd !== void 0) result = result.add(valueToAdd, key);
81
77
  }
82
78
  return result;
83
79
  }
@@ -91,14 +87,13 @@ const objectSupportPlugin = (_, dayClass, _dayFactory) => {
91
87
  for (const stringKey of keys) {
92
88
  const key = stringKey;
93
89
  const valueToSubtract = value[key];
94
- result = oldSubtract.call(result, valueToSubtract, key);
90
+ if (valueToSubtract !== void 0) result = result.subtract(valueToSubtract, key);
95
91
  }
96
92
  return result;
97
93
  }
98
94
  return oldSubtract.call(this, value, unit);
99
95
  };
100
96
  };
101
- var objectSupport_default = objectSupportPlugin;
102
97
 
103
98
  //#endregion
104
- export { objectSupport_default as default };
99
+ export { objectSupportPlugin as default };