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,8 +1,6 @@
1
- import { EsDayPlugin } from "../../chunks/DqhiVwLi.js";
2
- import "../../chunks/MtjcOKi-.js";
1
+ import { o as EsDayPlugin } from "../../chunks/CODi8AFH.js";
3
2
 
4
3
  //#region src/plugins/pluralGetSet/index.d.ts
5
-
6
4
  declare module 'esday' {
7
5
  interface EsDay {
8
6
  years: (() => number) & ((year: number, month?: number, date?: number) => EsDay);
@@ -10,7 +10,6 @@ const pluralGetSetPlugin = (_, dayClass, _dayFactory) => {
10
10
  proto.seconds = proto.second;
11
11
  proto.milliseconds = proto.millisecond;
12
12
  };
13
- var pluralGetSet_default = pluralGetSetPlugin;
14
13
 
15
14
  //#endregion
16
- export { pluralGetSet_default as default };
15
+ export { pluralGetSetPlugin as default };
@@ -1,8 +1,6 @@
1
- import { EsDayPlugin } from "../../chunks/DqhiVwLi.js";
2
- import "../../chunks/MtjcOKi-.js";
1
+ import { o as EsDayPlugin } from "../../chunks/CODi8AFH.js";
3
2
 
4
3
  //#region src/plugins/quarterOfYear/index.d.ts
5
-
6
4
  declare module 'esday' {
7
5
  interface EsDay {
8
6
  quarter(): number;
@@ -1,6 +1,6 @@
1
- import { constants_default } from "../../chunks/Y32qdU_5.js";
2
- import { isObject } from "../../chunks/Cb5SvF6r.js";
3
- import { normalizeUnitWithPlurals } from "../../chunks/DjY7KvwG.js";
1
+ import { p as constants_default } from "../../chunks/BkjWOpMU.js";
2
+ import { r as isObject } from "../../chunks/v_QBn7Xm.js";
3
+ import { n as normalizeUnitWithPlurals } from "../../chunks/AyQQ6US-.js";
4
4
 
5
5
  //#region src/plugins/quarterOfYear/index.ts
6
6
  const quarterOfYearPlugin = (_, dayClass, dayFactory) => {
@@ -13,15 +13,13 @@ const quarterOfYearPlugin = (_, dayClass, dayFactory) => {
13
13
  const oldAdd = proto.add;
14
14
  proto.add = function(value, unit) {
15
15
  if (!isObject(value) && unit !== void 0) {
16
- const unitLong = normalizeUnitWithPlurals(unit);
17
- if (unitLong === constants_default.QUARTER) return this.add(value * 3, constants_default.MONTH);
16
+ if (normalizeUnitWithPlurals(unit) === constants_default.QUARTER) return this.add(value * 3, constants_default.MONTH);
18
17
  }
19
18
  return oldAdd.call(this, value, unit);
20
19
  };
21
20
  const oldStartOf = proto.startOf;
22
21
  proto.startOf = function(units) {
23
- const unit = normalizeUnitWithPlurals(units);
24
- if (unit === constants_default.QUARTER) {
22
+ if (normalizeUnitWithPlurals(units) === constants_default.QUARTER) {
25
23
  const quarter = this.quarter() - 1;
26
24
  return this.month(quarter * 3).startOf(constants_default.MONTH).startOf(constants_default.DAY);
27
25
  }
@@ -29,8 +27,7 @@ const quarterOfYearPlugin = (_, dayClass, dayFactory) => {
29
27
  };
30
28
  const oldEndOf = proto.endOf;
31
29
  proto.endOf = function(units) {
32
- const unit = normalizeUnitWithPlurals(units);
33
- if (unit === constants_default.QUARTER) {
30
+ if (normalizeUnitWithPlurals(units) === constants_default.QUARTER) {
34
31
  const quarter = this.quarter() - 1;
35
32
  return this.month(quarter * 3 + 2).endOf(constants_default.MONTH).endOf(constants_default.DAY);
36
33
  }
@@ -38,21 +35,17 @@ const quarterOfYearPlugin = (_, dayClass, dayFactory) => {
38
35
  };
39
36
  const oldGet = proto.get;
40
37
  proto.get = function(unit) {
41
- const normalizedUnit = normalizeUnitWithPlurals(unit);
42
- if (normalizedUnit === constants_default.QUARTER) return this.quarter();
38
+ if (normalizeUnitWithPlurals(unit) === constants_default.QUARTER) return this.quarter();
43
39
  return oldGet.call(this, unit);
44
40
  };
45
41
  const old$set = proto["$set"];
46
42
  proto["$set"] = function(unit, values) {
47
- if (isObject(unit)) return this.clone();
48
- const normalizedUnit = normalizeUnitWithPlurals(unit);
49
- if (normalizedUnit === constants_default.QUARTER) return this.quarter(values[0]);
43
+ if (isObject(unit)) return this;
44
+ if (normalizeUnitWithPlurals(unit) === constants_default.QUARTER) return this.quarter(values[0]);
50
45
  return old$set.call(this, unit, values);
51
46
  };
52
- const additionalTokens = { Q: (sourceDate) => sourceDate.quarter().toString() };
53
- dayFactory.addFormatTokenDefinitions(additionalTokens);
47
+ dayFactory.addFormatTokenDefinitions({ Q: (sourceDate) => sourceDate.quarter().toString() });
54
48
  };
55
- var quarterOfYear_default = quarterOfYearPlugin;
56
49
 
57
50
  //#endregion
58
- export { quarterOfYear_default as default };
51
+ export { quarterOfYearPlugin as default };
@@ -0,0 +1,47 @@
1
+ import { o as EsDayPlugin, r as DateType } from "../../chunks/CODi8AFH.js";
2
+ import { Locale } from "../locale/index.mjs";
3
+
4
+ //#region src/plugins/relativeTime/index.d.ts
5
+ declare module 'esday' {
6
+ interface EsDay {
7
+ to: (referenceDate: DateType, withoutSuffix?: boolean) => string;
8
+ from: (referenceDate: DateType, withoutSuffix?: boolean) => string;
9
+ toNow: (withoutSuffix?: boolean) => string;
10
+ fromNow: (withoutSuffix?: boolean) => string;
11
+ }
12
+ interface EsDayFactory {
13
+ relativeTimeThreshold(unit: ThresholdRelativeTimeKeys): boolean | number | null;
14
+ relativeTimeThreshold(unit: ThresholdRelativeTimeKeys, limit: number | null): boolean;
15
+ relativeTimeRounding(): RelativeTimeRound;
16
+ relativeTimeRounding(roundingFunction: RelativeTimeRound): boolean;
17
+ formatDifference: (diffAsUnits: DiffAsUnit, withoutSuffix: boolean, locale: Locale, thresholds?: ThresholdRelativeTime) => string;
18
+ defaultThresholds: () => ThresholdRelativeTime;
19
+ globalThresholds: () => ThresholdRelativeTime;
20
+ }
21
+ }
22
+ type ThresholdRelativeTime = {
23
+ ss?: number | null;
24
+ s?: number | null;
25
+ m?: number | null;
26
+ h?: number | null;
27
+ d?: number | null;
28
+ w?: number | null;
29
+ M?: number | null;
30
+ };
31
+ type DiffAsUnit = {
32
+ s: number;
33
+ m: number;
34
+ h: number;
35
+ d: number;
36
+ w: number;
37
+ M: number;
38
+ y: number;
39
+ };
40
+ type ThresholdRelativeTimeKeys = keyof ThresholdRelativeTime;
41
+ type RelativeTimeRound = (value: number) => number;
42
+ declare const relativeTimePlugin: EsDayPlugin<{
43
+ thresholds?: ThresholdRelativeTime;
44
+ rounding?: (valueToRound: number) => number;
45
+ }>;
46
+ //#endregion
47
+ export { DiffAsUnit, RelativeTimeRound, ThresholdRelativeTime, ThresholdRelativeTimeKeys, relativeTimePlugin as default };
@@ -0,0 +1,187 @@
1
+ import { p as constants_default } from "../../chunks/BkjWOpMU.js";
2
+ import { t as createInstanceFromExist } from "../../chunks/Shk32pTP.js";
3
+
4
+ //#region src/plugins/relativeTime/index.ts
5
+ const relativeTimePlugin = (options, dayClass, dayFactory) => {
6
+ const defaultRelativeTimeDef = {
7
+ future: "in %s",
8
+ past: "%s ago",
9
+ s: "a few seconds",
10
+ ss: "%d seconds",
11
+ m: "a minute",
12
+ mm: "%d minutes",
13
+ h: "an hour",
14
+ hh: "%d hours",
15
+ d: "a day",
16
+ dd: "%d days",
17
+ w: "a week",
18
+ ww: "%d weeks",
19
+ M: "a month",
20
+ MM: "%d months",
21
+ y: "a year",
22
+ yy: "%d years"
23
+ };
24
+ const defaultThresholds = {
25
+ ss: 44,
26
+ s: 45,
27
+ m: 45,
28
+ h: 22,
29
+ d: 26,
30
+ w: null,
31
+ M: 11
32
+ };
33
+ dayFactory.defaultThresholds = () => structuredClone(defaultThresholds);
34
+ const thresholds = options.thresholds ?? defaultThresholds;
35
+ dayFactory.globalThresholds = () => structuredClone(thresholds);
36
+ /**
37
+ * Format object containing a time difference as human readable length of time.
38
+ * @param diffAsUnits - object containing the time difference calculated for different units
39
+ * @param withoutSuffix - format without 'in ---' or '... ago'
40
+ * @param locale - locale to use to get format definitions for relativeTime
41
+ * @param thresholds - thresholds, which define when a unit is considered a minute, an hour and so on
42
+ * @returns difference formatted as human string (e.g. 5 days ago)
43
+ */
44
+ function formatDifference(diffAsUnits, withoutSuffix, locale, thresholds = defaultThresholds) {
45
+ const isFuture = diffAsUnits.s > 0;
46
+ const relativeTimeDef = locale?.relativeTime ?? defaultRelativeTimeDef;
47
+ let out = "";
48
+ let selectedKeyAndValue = {
49
+ key: "",
50
+ value: 0
51
+ };
52
+ if (rounding(abs(diffAsUnits.s)) <= (thresholds.ss ?? 0)) {
53
+ selectedKeyAndValue.key = "s";
54
+ selectedKeyAndValue.value = rounding(abs(diffAsUnits.s));
55
+ } else if (rounding(abs(diffAsUnits.s)) < (thresholds.s ?? -1)) {
56
+ selectedKeyAndValue.key = "ss";
57
+ selectedKeyAndValue.value = rounding(abs(diffAsUnits.s));
58
+ } else if (rounding(abs(diffAsUnits.m)) <= 1) {
59
+ selectedKeyAndValue.key = "m";
60
+ selectedKeyAndValue.value = void 0;
61
+ } else if (rounding(abs(diffAsUnits.m)) < (thresholds.m ?? -1)) {
62
+ selectedKeyAndValue.key = "mm";
63
+ selectedKeyAndValue.value = rounding(abs(diffAsUnits.m));
64
+ } else if (rounding(abs(diffAsUnits.h)) <= 1) {
65
+ selectedKeyAndValue.key = "h";
66
+ selectedKeyAndValue.value = void 0;
67
+ } else if (rounding(abs(diffAsUnits.h)) < (thresholds.h ?? -1)) {
68
+ selectedKeyAndValue.key = "hh";
69
+ selectedKeyAndValue.value = rounding(abs(diffAsUnits.h));
70
+ } else if (rounding(abs(diffAsUnits.d)) <= 1) {
71
+ selectedKeyAndValue.key = "d";
72
+ selectedKeyAndValue.value = void 0;
73
+ } else if (rounding(abs(diffAsUnits.d)) < (thresholds.d ?? -1)) {
74
+ selectedKeyAndValue.key = "dd";
75
+ selectedKeyAndValue.value = rounding(abs(diffAsUnits.d));
76
+ } else if (thresholds.w !== null && rounding(abs(diffAsUnits.w)) <= 1) {
77
+ selectedKeyAndValue.key = "w";
78
+ selectedKeyAndValue.value = void 0;
79
+ } else if (thresholds.w !== null && rounding(abs(diffAsUnits.w)) < (thresholds.w ?? -1)) {
80
+ selectedKeyAndValue.key = "ww";
81
+ selectedKeyAndValue.value = rounding(abs(diffAsUnits.w));
82
+ } else if (rounding(abs(diffAsUnits.M)) <= 1) {
83
+ selectedKeyAndValue.key = "M";
84
+ selectedKeyAndValue.value = void 0;
85
+ } else if (rounding(abs(diffAsUnits.M)) < (thresholds.M ?? -1)) {
86
+ selectedKeyAndValue.key = "MM";
87
+ selectedKeyAndValue.value = rounding(abs(diffAsUnits.M));
88
+ } else if (rounding(abs(diffAsUnits.y)) <= 1) {
89
+ selectedKeyAndValue.key = "y";
90
+ selectedKeyAndValue.value = void 0;
91
+ } else {
92
+ selectedKeyAndValue.key = "yy";
93
+ selectedKeyAndValue.value = rounding(abs(diffAsUnits.y));
94
+ }
95
+ const format = relativeTimeDef[selectedKeyAndValue.key];
96
+ const outputDiffAbs = rounding(abs(selectedKeyAndValue.value ?? 1));
97
+ out = typeof format === "string" ? format.replace("%d", `${outputDiffAbs}`) : format(outputDiffAbs, withoutSuffix, selectedKeyAndValue.key, isFuture);
98
+ const postFormat = locale?.postFormat;
99
+ if (postFormat) out = postFormat(out);
100
+ if (withoutSuffix) return out;
101
+ const suffix = isFuture ? relativeTimeDef.future : relativeTimeDef.past;
102
+ return typeof suffix === "function" ? suffix(out, withoutSuffix, isFuture ? "future" : "past", isFuture) : suffix.replace("%s", out);
103
+ }
104
+ dayFactory.formatDifference = formatDifference;
105
+ const proto = dayClass.prototype;
106
+ const abs = Math.abs;
107
+ let rounding = options.rounding ?? Math.round;
108
+ /**
109
+ * Set a threshold for relative time strings
110
+ * @param unit - unit of threshold to get / set (ss,s,m,h,d,w,M)
111
+ * @param limit - new threshold value
112
+ * @returns false=unknown unit; true=threshold successfully set; current threshold (number | null)
113
+ */
114
+ dayFactory.relativeTimeThreshold = (unit, limit) => {
115
+ if (thresholds[unit] === void 0) return false;
116
+ if (limit === void 0) return thresholds[unit];
117
+ thresholds[unit] = limit;
118
+ if (unit === "s") if (limit !== null) thresholds.ss = limit - 1;
119
+ else thresholds.ss = null;
120
+ return true;
121
+ };
122
+ /**
123
+ * Gets or sets the rounding function for relative time strings
124
+ * @param roundingFunction - rounding function
125
+ * @returns - the rounding function (getter) or true=rounding function successfully set
126
+ */
127
+ dayFactory.relativeTimeRounding = (roundingFunction) => {
128
+ if (roundingFunction === void 0) return rounding;
129
+ if (typeof roundingFunction === "function") {
130
+ rounding = roundingFunction;
131
+ return true;
132
+ }
133
+ return false;
134
+ };
135
+ /**
136
+ * Calculate the difference between instance and referenceDate in given units
137
+ * as fractional value for 'from' and 'to'
138
+ * @param instance - date to calculate difference for
139
+ * @param referenceDate - base date for calculating the difference
140
+ * @param unit - unit of the difference
141
+ * @param isFrom - difference for 'from'?
142
+ * @returns difference as float
143
+ */
144
+ function differenceInUnits(instance, referenceDate, unit, isFrom) {
145
+ return isFrom ? referenceDate.diff(instance, unit, true) : instance.diff(referenceDate, unit, true);
146
+ }
147
+ /**
148
+ * Format instance date as relative to reference date as
149
+ * human readable length of time.
150
+ * @param reference - date the output relates to
151
+ * @param withoutSuffix - format without 'in ---' or '... ago'
152
+ * @param this - date to format
153
+ * @param isFrom - format as 'from' or 'fromNow'
154
+ * @returns difference formatted as human string (e.g. 5 days ago)
155
+ */
156
+ function fromToBase(reference, withoutSuffix, isFrom) {
157
+ const referenceDate = dayFactory(reference);
158
+ if (!(this.isValid() && referenceDate.isValid())) return constants_default.INVALID_DATE_STRING;
159
+ const locale = this.localeObject?.();
160
+ return formatDifference({
161
+ s: differenceInUnits(this, referenceDate, "s", isFrom),
162
+ m: differenceInUnits(this, referenceDate, "m", isFrom),
163
+ h: differenceInUnits(this, referenceDate, "h", isFrom),
164
+ d: differenceInUnits(this, referenceDate, "d", isFrom),
165
+ w: differenceInUnits(this, referenceDate, "w", isFrom),
166
+ M: differenceInUnits(this, referenceDate, "M", isFrom),
167
+ y: differenceInUnits(this, referenceDate, "y", isFrom)
168
+ }, withoutSuffix, locale, thresholds);
169
+ }
170
+ proto.to = function(referenceDate, withoutSuffix) {
171
+ return fromToBase.call(this, referenceDate, withoutSuffix ?? false, true);
172
+ };
173
+ proto.from = function(referenceDate, withoutSuffix) {
174
+ return fromToBase.call(this, referenceDate, withoutSuffix ?? false, false);
175
+ };
176
+ proto.toNow = function(withoutSuffix) {
177
+ const now = createInstanceFromExist(/* @__PURE__ */ new Date(), this);
178
+ return this.to(now, withoutSuffix);
179
+ };
180
+ proto.fromNow = function(withoutSuffix) {
181
+ const now = createInstanceFromExist(/* @__PURE__ */ new Date(), this);
182
+ return this.from(now, withoutSuffix);
183
+ };
184
+ };
185
+
186
+ //#endregion
187
+ export { relativeTimePlugin as default };
@@ -0,0 +1,6 @@
1
+ import { o as EsDayPlugin } from "../../chunks/CODi8AFH.js";
2
+
3
+ //#region src/plugins/timezone/index.d.ts
4
+ declare const timezonePLugin: EsDayPlugin<{}>;
5
+ //#endregion
6
+ export { timezonePLugin as default };