@gobrand/tiempo 2.8.0 → 2.9.0

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 (446) hide show
  1. package/dist/addDays.js +3 -2
  2. package/dist/addHours.js +3 -2
  3. package/dist/addMicroseconds.js +3 -2
  4. package/dist/addMilliseconds.js +3 -2
  5. package/dist/addMinutes.js +3 -2
  6. package/dist/addMonths.js +3 -2
  7. package/dist/addNanoseconds.js +3 -2
  8. package/dist/addSeconds.js +3 -2
  9. package/dist/addWeeks.js +3 -2
  10. package/dist/addYears.js +3 -2
  11. package/dist/{chunk-OLEOU3XE.js → chunk-2J434XZJ.js} +5 -3
  12. package/dist/chunk-2J434XZJ.js.map +1 -0
  13. package/dist/{chunk-RW3C2677.js → chunk-3QC5YINX.js} +2 -3
  14. package/dist/chunk-3QC5YINX.js.map +1 -0
  15. package/dist/{chunk-YIT6EMBC.js → chunk-3WWRI3NR.js} +2 -3
  16. package/dist/chunk-3WWRI3NR.js.map +1 -0
  17. package/dist/{chunk-X26WIJ6L.js → chunk-46EP6MO2.js} +7 -5
  18. package/dist/chunk-46EP6MO2.js.map +1 -0
  19. package/dist/{chunk-UBY22QWM.js → chunk-4ZRJ3EHQ.js} +4 -4
  20. package/dist/{chunk-Q2F3HEXB.js → chunk-5HVHKQTJ.js} +2 -2
  21. package/dist/{chunk-BV6CLVSI.js → chunk-76RCTVBW.js} +3 -4
  22. package/dist/chunk-76RCTVBW.js.map +1 -0
  23. package/dist/{chunk-O6RIN7K3.js → chunk-7LZPFGGV.js} +5 -2
  24. package/dist/chunk-7LZPFGGV.js.map +1 -0
  25. package/dist/{chunk-5C3TQSWA.js → chunk-7NQ76UHP.js} +4 -5
  26. package/dist/chunk-7NQ76UHP.js.map +1 -0
  27. package/dist/{chunk-52NEOY34.js → chunk-7XVPK2AV.js} +2 -2
  28. package/dist/{chunk-PVAOUYXF.js → chunk-AAORAX74.js} +5 -5
  29. package/dist/chunk-AAORAX74.js.map +1 -0
  30. package/dist/{chunk-776JOVV6.js → chunk-ADAN2I34.js} +2 -3
  31. package/dist/chunk-ADAN2I34.js.map +1 -0
  32. package/dist/{chunk-WUAIUEH7.js → chunk-BIH6JETG.js} +5 -2
  33. package/dist/chunk-BIH6JETG.js.map +1 -0
  34. package/dist/{chunk-DT2EWLHU.js → chunk-BOGN7JC3.js} +2 -2
  35. package/dist/{chunk-WY63VEXE.js → chunk-C5HDCIRV.js} +5 -2
  36. package/dist/chunk-C5HDCIRV.js.map +1 -0
  37. package/dist/{chunk-WVHAYLBW.js → chunk-CP4JNCMO.js} +2 -2
  38. package/dist/{chunk-HFQUXON5.js → chunk-DGRZ6HO3.js} +10 -5
  39. package/dist/chunk-DGRZ6HO3.js.map +1 -0
  40. package/dist/{chunk-MMI2HHT7.js → chunk-DHJ353HR.js} +2 -2
  41. package/dist/{chunk-4NJMCCUM.js → chunk-DJRIH2PX.js} +2 -2
  42. package/dist/{chunk-YKBP3G7L.js → chunk-DN3V4IZC.js} +2 -2
  43. package/dist/{chunk-EYO2ZJLH.js → chunk-DOGZ2WBH.js} +2 -2
  44. package/dist/{chunk-QFNGYTTH.js → chunk-DTZPE5PM.js} +5 -3
  45. package/dist/chunk-DTZPE5PM.js.map +1 -0
  46. package/dist/chunk-ERCE3YCO.js +19 -0
  47. package/dist/chunk-ERCE3YCO.js.map +1 -0
  48. package/dist/{chunk-6IP245MS.js → chunk-ESTLMF2X.js} +5 -5
  49. package/dist/chunk-ESTLMF2X.js.map +1 -0
  50. package/dist/chunk-F6EWMA4K.js +13 -0
  51. package/dist/chunk-F6EWMA4K.js.map +1 -0
  52. package/dist/{chunk-7VLSSOVC.js → chunk-FEUIZJOV.js} +3 -4
  53. package/dist/chunk-FEUIZJOV.js.map +1 -0
  54. package/dist/{chunk-ZGR4NZTS.js → chunk-FIX6LQG5.js} +2 -3
  55. package/dist/chunk-FIX6LQG5.js.map +1 -0
  56. package/dist/{chunk-L4SVABDH.js → chunk-G4COVQ5S.js} +2 -2
  57. package/dist/{chunk-LDO6PRNJ.js → chunk-GEMTHX5S.js} +2 -2
  58. package/dist/{chunk-3TSFIPUR.js → chunk-GS3J5YVW.js} +2 -3
  59. package/dist/chunk-GS3J5YVW.js.map +1 -0
  60. package/dist/{chunk-DKYVFYWM.js → chunk-GVZOCS7O.js} +5 -3
  61. package/dist/chunk-GVZOCS7O.js.map +1 -0
  62. package/dist/{chunk-BIAPE4MR.js → chunk-HHPXUFZP.js} +5 -5
  63. package/dist/chunk-HHPXUFZP.js.map +1 -0
  64. package/dist/{chunk-S63QUP4W.js → chunk-I3RXBZP5.js} +2 -2
  65. package/dist/{chunk-ADQTZVMH.js → chunk-IPWSPA4H.js} +2 -2
  66. package/dist/chunk-JVB5IARQ.js +19 -0
  67. package/dist/chunk-JVB5IARQ.js.map +1 -0
  68. package/dist/{chunk-JOD4ATPE.js → chunk-JXBC2VU2.js} +2 -2
  69. package/dist/{chunk-V27NUBXQ.js → chunk-KKMM6HYC.js} +2 -2
  70. package/dist/{chunk-A5VVBYNT.js → chunk-KONRPZXK.js} +2 -2
  71. package/dist/{chunk-CY746ZUQ.js → chunk-L2CNUS43.js} +2 -2
  72. package/dist/{chunk-KZB6NERH.js → chunk-LGLV7RIC.js} +5 -2
  73. package/dist/chunk-LGLV7RIC.js.map +1 -0
  74. package/dist/{chunk-JA7SVLAF.js → chunk-LLN2SKGE.js} +4 -4
  75. package/dist/{chunk-JNA3AFOC.js → chunk-LYPSZYIG.js} +5 -2
  76. package/dist/chunk-LYPSZYIG.js.map +1 -0
  77. package/dist/{chunk-AE36GX4F.js → chunk-MHXSUAPE.js} +5 -2
  78. package/dist/chunk-MHXSUAPE.js.map +1 -0
  79. package/dist/{chunk-BUX26GTD.js → chunk-NKWGZIOJ.js} +5 -3
  80. package/dist/chunk-NKWGZIOJ.js.map +1 -0
  81. package/dist/{chunk-VZJGCDAG.js → chunk-NT7VDFLO.js} +5 -2
  82. package/dist/chunk-NT7VDFLO.js.map +1 -0
  83. package/dist/{chunk-7ATM7AXL.js → chunk-OGNREZPA.js} +2 -2
  84. package/dist/{chunk-EZ7NVTZI.js → chunk-OKPTY2ZQ.js} +7 -5
  85. package/dist/chunk-OKPTY2ZQ.js.map +1 -0
  86. package/dist/{chunk-ISHZRFVN.js → chunk-OPACRBGV.js} +2 -2
  87. package/dist/{chunk-J6G2I2TU.js → chunk-OZYC3TAR.js} +2 -2
  88. package/dist/{chunk-2XHAHSB6.js → chunk-PBT2OZJH.js} +2 -2
  89. package/dist/{chunk-BSV32PSO.js → chunk-PEGMMWZU.js} +6 -3
  90. package/dist/chunk-PEGMMWZU.js.map +1 -0
  91. package/dist/{chunk-BH2YB4MV.js → chunk-PWPACA4G.js} +2 -2
  92. package/dist/{chunk-3A6X6WV5.js → chunk-PXF3RMFH.js} +1 -2
  93. package/dist/chunk-PXF3RMFH.js.map +1 -0
  94. package/dist/{chunk-HDBH7RTY.js → chunk-QGXK664C.js} +2 -2
  95. package/dist/{chunk-AJEIDKVJ.js → chunk-QHQACJEU.js} +5 -2
  96. package/dist/chunk-QHQACJEU.js.map +1 -0
  97. package/dist/{chunk-CHW2EN2O.js → chunk-QPGTY5DD.js} +5 -5
  98. package/dist/chunk-QPGTY5DD.js.map +1 -0
  99. package/dist/{chunk-Y7CIJQ67.js → chunk-QRLTVRYC.js} +5 -3
  100. package/dist/chunk-QRLTVRYC.js.map +1 -0
  101. package/dist/{chunk-JHRXY36W.js → chunk-QVXCG625.js} +2 -2
  102. package/dist/{chunk-OQ4CWKJT.js → chunk-R7MM4BDS.js} +2 -3
  103. package/dist/chunk-R7MM4BDS.js.map +1 -0
  104. package/dist/{chunk-EEQ3REET.js → chunk-RSY3BI3P.js} +2 -2
  105. package/dist/{chunk-NRD5HRZV.js → chunk-RTANLM3L.js} +2 -2
  106. package/dist/{chunk-OABS374T.js → chunk-RUJC6FOA.js} +2 -3
  107. package/dist/chunk-RUJC6FOA.js.map +1 -0
  108. package/dist/{chunk-BQBLSXK2.js → chunk-SDCVBRJP.js} +2 -2
  109. package/dist/{chunk-HLGMUTFK.js → chunk-SFXJV5ZT.js} +2 -3
  110. package/dist/chunk-SFXJV5ZT.js.map +1 -0
  111. package/dist/{chunk-BPZ7BRJW.js → chunk-SHDXBQ7E.js} +5 -2
  112. package/dist/chunk-SHDXBQ7E.js.map +1 -0
  113. package/dist/{chunk-VLZ3HQQA.js → chunk-SQJTTKEI.js} +2 -2
  114. package/dist/{chunk-RBEW6PXR.js → chunk-SRXD4AGD.js} +5 -2
  115. package/dist/chunk-SRXD4AGD.js.map +1 -0
  116. package/dist/{chunk-4PSMM55Q.js → chunk-SWDOKPVX.js} +7 -3
  117. package/dist/chunk-SWDOKPVX.js.map +1 -0
  118. package/dist/{chunk-UJWM2BV2.js → chunk-SY2S6MMZ.js} +10 -5
  119. package/dist/chunk-SY2S6MMZ.js.map +1 -0
  120. package/dist/{chunk-ZC6KWXCW.js → chunk-SZATPYBI.js} +36 -27
  121. package/dist/chunk-SZATPYBI.js.map +1 -0
  122. package/dist/{chunk-TGKWBQ7L.js → chunk-T6ONGPRF.js} +6 -3
  123. package/dist/chunk-T6ONGPRF.js.map +1 -0
  124. package/dist/{chunk-PPB62JYV.js → chunk-TDZ3XUH7.js} +2 -2
  125. package/dist/{chunk-G2JUEBC5.js → chunk-TIEAKS3O.js} +5 -3
  126. package/dist/chunk-TIEAKS3O.js.map +1 -0
  127. package/dist/{chunk-DFLGGK4F.js → chunk-U7ZWIAB3.js} +6 -3
  128. package/dist/chunk-U7ZWIAB3.js.map +1 -0
  129. package/dist/chunk-VOZTLX5F.js +22 -0
  130. package/dist/chunk-VOZTLX5F.js.map +1 -0
  131. package/dist/{chunk-XW5MLXX5.js → chunk-VVV5BNLP.js} +2 -2
  132. package/dist/{chunk-AJ4JBKJK.js → chunk-VXOQ7IG5.js} +1 -2
  133. package/dist/chunk-VXOQ7IG5.js.map +1 -0
  134. package/dist/{chunk-HOCNCQTC.js → chunk-W6RF44CV.js} +2 -3
  135. package/dist/chunk-W6RF44CV.js.map +1 -0
  136. package/dist/{chunk-AHMKY474.js → chunk-WJOGQ6IB.js} +2 -2
  137. package/dist/{chunk-ZJQS7ZY7.js → chunk-WLW622M7.js} +22 -21
  138. package/dist/chunk-WLW622M7.js.map +1 -0
  139. package/dist/{chunk-ZDA7GSWU.js → chunk-WNPPRDN3.js} +3 -4
  140. package/dist/chunk-WNPPRDN3.js.map +1 -0
  141. package/dist/{chunk-4E7OGJ3F.js → chunk-XONITURH.js} +5 -2
  142. package/dist/chunk-XONITURH.js.map +1 -0
  143. package/dist/{chunk-UJW2FPI4.js → chunk-XRZUPSUB.js} +2 -2
  144. package/dist/chunk-Y4HT4LCB.js +19 -0
  145. package/dist/chunk-Y4HT4LCB.js.map +1 -0
  146. package/dist/{chunk-TNCLJK4Y.js → chunk-Z2LOTP6T.js} +5 -3
  147. package/dist/chunk-Z2LOTP6T.js.map +1 -0
  148. package/dist/chunk-ZBEEQUE4.js +19 -0
  149. package/dist/chunk-ZBEEQUE4.js.map +1 -0
  150. package/dist/{chunk-FSD3DDFC.js → chunk-ZFXBHDFB.js} +5 -2
  151. package/dist/chunk-ZFXBHDFB.js.map +1 -0
  152. package/dist/{chunk-U4RNUZXO.js → chunk-ZKGR3F4F.js} +2 -2
  153. package/dist/{chunk-YQBM63DC.js → chunk-ZSRCVDZ2.js} +9 -4
  154. package/dist/chunk-ZSRCVDZ2.js.map +1 -0
  155. package/dist/differenceInDays.d.ts +5 -3
  156. package/dist/differenceInDays.d.ts.map +1 -1
  157. package/dist/differenceInDays.js +3 -2
  158. package/dist/differenceInHours.d.ts +5 -3
  159. package/dist/differenceInHours.d.ts.map +1 -1
  160. package/dist/differenceInHours.js +4 -3
  161. package/dist/differenceInMicroseconds.d.ts +1 -1
  162. package/dist/differenceInMicroseconds.d.ts.map +1 -1
  163. package/dist/differenceInMicroseconds.js +3 -2
  164. package/dist/differenceInMilliseconds.d.ts +1 -1
  165. package/dist/differenceInMilliseconds.d.ts.map +1 -1
  166. package/dist/differenceInMilliseconds.js +4 -3
  167. package/dist/differenceInMinutes.d.ts +5 -3
  168. package/dist/differenceInMinutes.d.ts.map +1 -1
  169. package/dist/differenceInMinutes.js +4 -3
  170. package/dist/differenceInMonths.d.ts +8 -5
  171. package/dist/differenceInMonths.d.ts.map +1 -1
  172. package/dist/differenceInMonths.js +3 -2
  173. package/dist/differenceInNanoseconds.d.ts +1 -1
  174. package/dist/differenceInNanoseconds.d.ts.map +1 -1
  175. package/dist/differenceInNanoseconds.js +3 -2
  176. package/dist/differenceInSeconds.d.ts +5 -3
  177. package/dist/differenceInSeconds.d.ts.map +1 -1
  178. package/dist/differenceInSeconds.js +4 -3
  179. package/dist/differenceInWeeks.d.ts +6 -4
  180. package/dist/differenceInWeeks.d.ts.map +1 -1
  181. package/dist/differenceInWeeks.js +3 -2
  182. package/dist/differenceInYears.d.ts +8 -5
  183. package/dist/differenceInYears.d.ts.map +1 -1
  184. package/dist/differenceInYears.js +3 -2
  185. package/dist/eachDayOfInterval.d.ts +1 -1
  186. package/dist/eachDayOfInterval.d.ts.map +1 -1
  187. package/dist/eachDayOfInterval.js +3 -2
  188. package/dist/eachHourOfInterval.d.ts +1 -1
  189. package/dist/eachHourOfInterval.d.ts.map +1 -1
  190. package/dist/eachHourOfInterval.js +3 -2
  191. package/dist/eachMinuteOfInterval.d.ts +1 -1
  192. package/dist/eachMinuteOfInterval.d.ts.map +1 -1
  193. package/dist/eachMinuteOfInterval.js +3 -2
  194. package/dist/eachMonthOfInterval.d.ts +1 -1
  195. package/dist/eachMonthOfInterval.d.ts.map +1 -1
  196. package/dist/eachMonthOfInterval.js +3 -2
  197. package/dist/eachWeekOfInterval.d.ts +1 -1
  198. package/dist/eachWeekOfInterval.d.ts.map +1 -1
  199. package/dist/eachWeekOfInterval.js +3 -2
  200. package/dist/eachYearOfInterval.d.ts +1 -1
  201. package/dist/eachYearOfInterval.d.ts.map +1 -1
  202. package/dist/eachYearOfInterval.js +3 -2
  203. package/dist/endOfDay.d.ts +1 -1
  204. package/dist/endOfDay.d.ts.map +1 -1
  205. package/dist/endOfDay.js +5 -4
  206. package/dist/endOfMonth.d.ts +1 -1
  207. package/dist/endOfMonth.d.ts.map +1 -1
  208. package/dist/endOfMonth.js +5 -4
  209. package/dist/endOfWeek.d.ts +1 -1
  210. package/dist/endOfWeek.d.ts.map +1 -1
  211. package/dist/endOfWeek.js +4 -3
  212. package/dist/endOfYear.d.ts +1 -1
  213. package/dist/endOfYear.d.ts.map +1 -1
  214. package/dist/endOfYear.js +5 -4
  215. package/dist/format.d.ts +1 -1
  216. package/dist/format.d.ts.map +1 -1
  217. package/dist/format.js +3 -2
  218. package/dist/formatPlainDate.d.ts +1 -1
  219. package/dist/formatPlainDate.d.ts.map +1 -1
  220. package/dist/formatPlainDate.js +2 -1
  221. package/dist/index.d.ts +1 -0
  222. package/dist/index.d.ts.map +1 -1
  223. package/dist/index.js +89 -88
  224. package/dist/intlFormatDistance.d.ts.map +1 -1
  225. package/dist/intlFormatDistance.js +11 -10
  226. package/dist/isAfter.d.ts +1 -1
  227. package/dist/isAfter.d.ts.map +1 -1
  228. package/dist/isAfter.js +4 -3
  229. package/dist/isBefore.d.ts +1 -1
  230. package/dist/isBefore.d.ts.map +1 -1
  231. package/dist/isBefore.js +4 -3
  232. package/dist/isFuture.js +5 -4
  233. package/dist/isPast.js +5 -4
  234. package/dist/isPlainDateAfter.d.ts +1 -1
  235. package/dist/isPlainDateAfter.d.ts.map +1 -1
  236. package/dist/isPlainDateAfter.js +2 -1
  237. package/dist/isPlainDateBefore.d.ts +1 -1
  238. package/dist/isPlainDateBefore.d.ts.map +1 -1
  239. package/dist/isPlainDateBefore.js +2 -1
  240. package/dist/isPlainDateEqual.d.ts +1 -1
  241. package/dist/isPlainDateEqual.d.ts.map +1 -1
  242. package/dist/isPlainDateEqual.js +2 -1
  243. package/dist/isPlainTimeAfter.d.ts +1 -1
  244. package/dist/isPlainTimeAfter.d.ts.map +1 -1
  245. package/dist/isPlainTimeAfter.js +2 -1
  246. package/dist/isPlainTimeBefore.d.ts +1 -1
  247. package/dist/isPlainTimeBefore.d.ts.map +1 -1
  248. package/dist/isPlainTimeBefore.js +2 -1
  249. package/dist/isPlainTimeEqual.d.ts +1 -1
  250. package/dist/isPlainTimeEqual.d.ts.map +1 -1
  251. package/dist/isPlainTimeEqual.js +2 -1
  252. package/dist/isSameDay.d.ts +1 -1
  253. package/dist/isSameDay.d.ts.map +1 -1
  254. package/dist/isSameDay.js +3 -2
  255. package/dist/isSameHour.js +3 -2
  256. package/dist/isSameMicrosecond.js +3 -2
  257. package/dist/isSameMillisecond.js +3 -2
  258. package/dist/isSameMinute.js +3 -2
  259. package/dist/isSameMonth.js +3 -2
  260. package/dist/isSameNanosecond.js +3 -2
  261. package/dist/isSameSecond.js +3 -2
  262. package/dist/isSameWeek.js +3 -2
  263. package/dist/isSameYear.js +3 -2
  264. package/dist/isWithinInterval.d.ts +1 -1
  265. package/dist/isWithinInterval.d.ts.map +1 -1
  266. package/dist/isWithinInterval.js +5 -4
  267. package/dist/now.d.ts +1 -1
  268. package/dist/now.d.ts.map +1 -1
  269. package/dist/now.js +2 -1
  270. package/dist/roundToNearestHour.js +3 -2
  271. package/dist/roundToNearestMinute.js +3 -2
  272. package/dist/roundToNearestSecond.js +3 -2
  273. package/dist/shared/differenceInMilliseconds.d.ts +1 -1
  274. package/dist/shared/differenceInMilliseconds.d.ts.map +1 -1
  275. package/dist/shared/differenceInMilliseconds.js +2 -1
  276. package/dist/shared/differenceOptions.d.ts +16 -0
  277. package/dist/shared/differenceOptions.d.ts.map +1 -0
  278. package/dist/shared/differenceOptions.js +1 -0
  279. package/dist/shared/differenceOptions.js.map +1 -0
  280. package/dist/shared/isAfter.d.ts +1 -1
  281. package/dist/shared/isAfter.d.ts.map +1 -1
  282. package/dist/shared/isAfter.js +2 -1
  283. package/dist/shared/isBefore.d.ts +1 -1
  284. package/dist/shared/isBefore.d.ts.map +1 -1
  285. package/dist/shared/isBefore.js +2 -1
  286. package/dist/shared/normalizeTemporalInput.d.ts +1 -1
  287. package/dist/shared/normalizeTemporalInput.d.ts.map +1 -1
  288. package/dist/shared/normalizeTemporalInput.js +2 -1
  289. package/dist/shared/normalizeWithPlainDate.d.ts +1 -1
  290. package/dist/shared/normalizeWithPlainDate.d.ts.map +1 -1
  291. package/dist/shared/normalizeWithPlainDate.js +4 -3
  292. package/dist/shared/nowZoned.d.ts +1 -1
  293. package/dist/shared/nowZoned.d.ts.map +1 -1
  294. package/dist/shared/nowZoned.js +3 -2
  295. package/dist/shared/plainDateToZonedDateTime.d.ts +1 -1
  296. package/dist/shared/plainDateToZonedDateTime.d.ts.map +1 -1
  297. package/dist/shared/plainDateToZonedDateTime.js +2 -1
  298. package/dist/shared/temporal.d.ts +37 -0
  299. package/dist/shared/temporal.d.ts.map +1 -0
  300. package/dist/shared/temporal.js +13 -0
  301. package/dist/shared/temporal.js.map +1 -0
  302. package/dist/shared/temporal.test.d.ts +2 -0
  303. package/dist/shared/temporal.test.d.ts.map +1 -0
  304. package/dist/simpleFormat.d.ts +1 -1
  305. package/dist/simpleFormat.d.ts.map +1 -1
  306. package/dist/simpleFormat.js +2 -1
  307. package/dist/startOfDay.d.ts +1 -1
  308. package/dist/startOfDay.d.ts.map +1 -1
  309. package/dist/startOfDay.js +5 -4
  310. package/dist/startOfMonth.d.ts +1 -1
  311. package/dist/startOfMonth.d.ts.map +1 -1
  312. package/dist/startOfMonth.js +5 -4
  313. package/dist/startOfWeek.d.ts +1 -1
  314. package/dist/startOfWeek.d.ts.map +1 -1
  315. package/dist/startOfWeek.js +4 -3
  316. package/dist/startOfYear.d.ts +1 -1
  317. package/dist/startOfYear.d.ts.map +1 -1
  318. package/dist/startOfYear.js +5 -4
  319. package/dist/subDays.js +4 -3
  320. package/dist/subHours.js +4 -3
  321. package/dist/subMicroseconds.js +4 -3
  322. package/dist/subMilliseconds.js +4 -3
  323. package/dist/subMinutes.js +4 -3
  324. package/dist/subMonths.js +4 -3
  325. package/dist/subNanoseconds.js +4 -3
  326. package/dist/subSeconds.js +4 -3
  327. package/dist/subWeeks.js +4 -3
  328. package/dist/subYears.js +4 -3
  329. package/dist/toDate.d.ts +1 -1
  330. package/dist/toDate.d.ts.map +1 -1
  331. package/dist/toDate.js +2 -1
  332. package/dist/toIso.d.ts +1 -1
  333. package/dist/toIso.d.ts.map +1 -1
  334. package/dist/toIso.js +2 -1
  335. package/dist/toIso9075.d.ts +1 -1
  336. package/dist/toIso9075.d.ts.map +1 -1
  337. package/dist/toIso9075.js +2 -1
  338. package/dist/toPlainDate.d.ts +1 -1
  339. package/dist/toPlainDate.d.ts.map +1 -1
  340. package/dist/toPlainDate.js +2 -1
  341. package/dist/toPlainTime.d.ts +1 -1
  342. package/dist/toPlainTime.d.ts.map +1 -1
  343. package/dist/toPlainTime.js +2 -1
  344. package/dist/toUtc.d.ts +1 -1
  345. package/dist/toUtc.d.ts.map +1 -1
  346. package/dist/toUtc.js +2 -1
  347. package/dist/toZonedTime.d.ts +1 -1
  348. package/dist/toZonedTime.d.ts.map +1 -1
  349. package/dist/toZonedTime.js +2 -1
  350. package/dist/today.d.ts +1 -1
  351. package/dist/today.d.ts.map +1 -1
  352. package/dist/today.js +2 -1
  353. package/package.json +1 -1
  354. package/dist/chunk-3A6X6WV5.js.map +0 -1
  355. package/dist/chunk-3TSFIPUR.js.map +0 -1
  356. package/dist/chunk-4E7OGJ3F.js.map +0 -1
  357. package/dist/chunk-4PSMM55Q.js.map +0 -1
  358. package/dist/chunk-5C3TQSWA.js.map +0 -1
  359. package/dist/chunk-6IP245MS.js.map +0 -1
  360. package/dist/chunk-776JOVV6.js.map +0 -1
  361. package/dist/chunk-7VLSSOVC.js.map +0 -1
  362. package/dist/chunk-AE36GX4F.js.map +0 -1
  363. package/dist/chunk-AJ4JBKJK.js.map +0 -1
  364. package/dist/chunk-AJEIDKVJ.js.map +0 -1
  365. package/dist/chunk-B2R2G5YK.js +0 -19
  366. package/dist/chunk-B2R2G5YK.js.map +0 -1
  367. package/dist/chunk-BIAPE4MR.js.map +0 -1
  368. package/dist/chunk-BPZ7BRJW.js.map +0 -1
  369. package/dist/chunk-BSV32PSO.js.map +0 -1
  370. package/dist/chunk-BUX26GTD.js.map +0 -1
  371. package/dist/chunk-BV6CLVSI.js.map +0 -1
  372. package/dist/chunk-CHW2EN2O.js.map +0 -1
  373. package/dist/chunk-DFLGGK4F.js.map +0 -1
  374. package/dist/chunk-DKYVFYWM.js.map +0 -1
  375. package/dist/chunk-EZ7NVTZI.js.map +0 -1
  376. package/dist/chunk-FSD3DDFC.js.map +0 -1
  377. package/dist/chunk-G2JUEBC5.js.map +0 -1
  378. package/dist/chunk-HFQUXON5.js.map +0 -1
  379. package/dist/chunk-HLGMUTFK.js.map +0 -1
  380. package/dist/chunk-HOCNCQTC.js.map +0 -1
  381. package/dist/chunk-JNA3AFOC.js.map +0 -1
  382. package/dist/chunk-KGVUENQO.js +0 -17
  383. package/dist/chunk-KGVUENQO.js.map +0 -1
  384. package/dist/chunk-KZB6NERH.js.map +0 -1
  385. package/dist/chunk-MJSZNWCV.js +0 -10
  386. package/dist/chunk-MJSZNWCV.js.map +0 -1
  387. package/dist/chunk-O6RIN7K3.js.map +0 -1
  388. package/dist/chunk-OABS374T.js.map +0 -1
  389. package/dist/chunk-OLEOU3XE.js.map +0 -1
  390. package/dist/chunk-OQ4CWKJT.js.map +0 -1
  391. package/dist/chunk-PMJD5N5J.js +0 -19
  392. package/dist/chunk-PMJD5N5J.js.map +0 -1
  393. package/dist/chunk-PVAOUYXF.js.map +0 -1
  394. package/dist/chunk-QFNGYTTH.js.map +0 -1
  395. package/dist/chunk-QVOEXF46.js +0 -19
  396. package/dist/chunk-QVOEXF46.js.map +0 -1
  397. package/dist/chunk-RBEW6PXR.js.map +0 -1
  398. package/dist/chunk-RW3C2677.js.map +0 -1
  399. package/dist/chunk-TGKWBQ7L.js.map +0 -1
  400. package/dist/chunk-TNCLJK4Y.js.map +0 -1
  401. package/dist/chunk-UJWM2BV2.js.map +0 -1
  402. package/dist/chunk-VZJGCDAG.js.map +0 -1
  403. package/dist/chunk-WUAIUEH7.js.map +0 -1
  404. package/dist/chunk-WY63VEXE.js.map +0 -1
  405. package/dist/chunk-X26WIJ6L.js.map +0 -1
  406. package/dist/chunk-Y7CIJQ67.js.map +0 -1
  407. package/dist/chunk-YIT6EMBC.js.map +0 -1
  408. package/dist/chunk-YQBM63DC.js.map +0 -1
  409. package/dist/chunk-ZC6KWXCW.js.map +0 -1
  410. package/dist/chunk-ZDA7GSWU.js.map +0 -1
  411. package/dist/chunk-ZGR4NZTS.js.map +0 -1
  412. package/dist/chunk-ZJQS7ZY7.js.map +0 -1
  413. /package/dist/{chunk-UBY22QWM.js.map → chunk-4ZRJ3EHQ.js.map} +0 -0
  414. /package/dist/{chunk-Q2F3HEXB.js.map → chunk-5HVHKQTJ.js.map} +0 -0
  415. /package/dist/{chunk-52NEOY34.js.map → chunk-7XVPK2AV.js.map} +0 -0
  416. /package/dist/{chunk-DT2EWLHU.js.map → chunk-BOGN7JC3.js.map} +0 -0
  417. /package/dist/{chunk-WVHAYLBW.js.map → chunk-CP4JNCMO.js.map} +0 -0
  418. /package/dist/{chunk-MMI2HHT7.js.map → chunk-DHJ353HR.js.map} +0 -0
  419. /package/dist/{chunk-4NJMCCUM.js.map → chunk-DJRIH2PX.js.map} +0 -0
  420. /package/dist/{chunk-YKBP3G7L.js.map → chunk-DN3V4IZC.js.map} +0 -0
  421. /package/dist/{chunk-EYO2ZJLH.js.map → chunk-DOGZ2WBH.js.map} +0 -0
  422. /package/dist/{chunk-L4SVABDH.js.map → chunk-G4COVQ5S.js.map} +0 -0
  423. /package/dist/{chunk-LDO6PRNJ.js.map → chunk-GEMTHX5S.js.map} +0 -0
  424. /package/dist/{chunk-S63QUP4W.js.map → chunk-I3RXBZP5.js.map} +0 -0
  425. /package/dist/{chunk-ADQTZVMH.js.map → chunk-IPWSPA4H.js.map} +0 -0
  426. /package/dist/{chunk-JOD4ATPE.js.map → chunk-JXBC2VU2.js.map} +0 -0
  427. /package/dist/{chunk-V27NUBXQ.js.map → chunk-KKMM6HYC.js.map} +0 -0
  428. /package/dist/{chunk-A5VVBYNT.js.map → chunk-KONRPZXK.js.map} +0 -0
  429. /package/dist/{chunk-CY746ZUQ.js.map → chunk-L2CNUS43.js.map} +0 -0
  430. /package/dist/{chunk-JA7SVLAF.js.map → chunk-LLN2SKGE.js.map} +0 -0
  431. /package/dist/{chunk-7ATM7AXL.js.map → chunk-OGNREZPA.js.map} +0 -0
  432. /package/dist/{chunk-ISHZRFVN.js.map → chunk-OPACRBGV.js.map} +0 -0
  433. /package/dist/{chunk-J6G2I2TU.js.map → chunk-OZYC3TAR.js.map} +0 -0
  434. /package/dist/{chunk-2XHAHSB6.js.map → chunk-PBT2OZJH.js.map} +0 -0
  435. /package/dist/{chunk-BH2YB4MV.js.map → chunk-PWPACA4G.js.map} +0 -0
  436. /package/dist/{chunk-HDBH7RTY.js.map → chunk-QGXK664C.js.map} +0 -0
  437. /package/dist/{chunk-JHRXY36W.js.map → chunk-QVXCG625.js.map} +0 -0
  438. /package/dist/{chunk-EEQ3REET.js.map → chunk-RSY3BI3P.js.map} +0 -0
  439. /package/dist/{chunk-NRD5HRZV.js.map → chunk-RTANLM3L.js.map} +0 -0
  440. /package/dist/{chunk-BQBLSXK2.js.map → chunk-SDCVBRJP.js.map} +0 -0
  441. /package/dist/{chunk-VLZ3HQQA.js.map → chunk-SQJTTKEI.js.map} +0 -0
  442. /package/dist/{chunk-PPB62JYV.js.map → chunk-TDZ3XUH7.js.map} +0 -0
  443. /package/dist/{chunk-XW5MLXX5.js.map → chunk-VVV5BNLP.js.map} +0 -0
  444. /package/dist/{chunk-AHMKY474.js.map → chunk-WJOGQ6IB.js.map} +0 -0
  445. /package/dist/{chunk-UJW2FPI4.js.map → chunk-XRZUPSUB.js.map} +0 -0
  446. /package/dist/{chunk-U4RNUZXO.js.map → chunk-ZKGR3F4F.js.map} +0 -0
package/dist/addDays.js CHANGED
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  addDays
3
- } from "./chunk-L4SVABDH.js";
4
- import "./chunk-MJSZNWCV.js";
3
+ } from "./chunk-G4COVQ5S.js";
4
+ import "./chunk-F6EWMA4K.js";
5
+ import "./chunk-VOZTLX5F.js";
5
6
  export {
6
7
  addDays
7
8
  };
package/dist/addHours.js CHANGED
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  addHours
3
- } from "./chunk-4NJMCCUM.js";
4
- import "./chunk-MJSZNWCV.js";
3
+ } from "./chunk-DJRIH2PX.js";
4
+ import "./chunk-F6EWMA4K.js";
5
+ import "./chunk-VOZTLX5F.js";
5
6
  export {
6
7
  addHours
7
8
  };
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  addMicroseconds
3
- } from "./chunk-V27NUBXQ.js";
4
- import "./chunk-MJSZNWCV.js";
3
+ } from "./chunk-KKMM6HYC.js";
4
+ import "./chunk-F6EWMA4K.js";
5
+ import "./chunk-VOZTLX5F.js";
5
6
  export {
6
7
  addMicroseconds
7
8
  };
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  addMilliseconds
3
- } from "./chunk-A5VVBYNT.js";
4
- import "./chunk-MJSZNWCV.js";
3
+ } from "./chunk-KONRPZXK.js";
4
+ import "./chunk-F6EWMA4K.js";
5
+ import "./chunk-VOZTLX5F.js";
5
6
  export {
6
7
  addMilliseconds
7
8
  };
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  addMinutes
3
- } from "./chunk-2XHAHSB6.js";
4
- import "./chunk-MJSZNWCV.js";
3
+ } from "./chunk-PBT2OZJH.js";
4
+ import "./chunk-F6EWMA4K.js";
5
+ import "./chunk-VOZTLX5F.js";
5
6
  export {
6
7
  addMinutes
7
8
  };
package/dist/addMonths.js CHANGED
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  addMonths
3
- } from "./chunk-7ATM7AXL.js";
4
- import "./chunk-MJSZNWCV.js";
3
+ } from "./chunk-OGNREZPA.js";
4
+ import "./chunk-F6EWMA4K.js";
5
+ import "./chunk-VOZTLX5F.js";
5
6
  export {
6
7
  addMonths
7
8
  };
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  addNanoseconds
3
- } from "./chunk-EYO2ZJLH.js";
4
- import "./chunk-MJSZNWCV.js";
3
+ } from "./chunk-DOGZ2WBH.js";
4
+ import "./chunk-F6EWMA4K.js";
5
+ import "./chunk-VOZTLX5F.js";
5
6
  export {
6
7
  addNanoseconds
7
8
  };
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  addSeconds
3
- } from "./chunk-NRD5HRZV.js";
4
- import "./chunk-MJSZNWCV.js";
3
+ } from "./chunk-RTANLM3L.js";
4
+ import "./chunk-F6EWMA4K.js";
5
+ import "./chunk-VOZTLX5F.js";
5
6
  export {
6
7
  addSeconds
7
8
  };
package/dist/addWeeks.js CHANGED
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  addWeeks
3
- } from "./chunk-DT2EWLHU.js";
4
- import "./chunk-MJSZNWCV.js";
3
+ } from "./chunk-BOGN7JC3.js";
4
+ import "./chunk-F6EWMA4K.js";
5
+ import "./chunk-VOZTLX5F.js";
5
6
  export {
6
7
  addWeeks
7
8
  };
package/dist/addYears.js CHANGED
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  addYears
3
- } from "./chunk-Q2F3HEXB.js";
4
- import "./chunk-MJSZNWCV.js";
3
+ } from "./chunk-5HVHKQTJ.js";
4
+ import "./chunk-F6EWMA4K.js";
5
+ import "./chunk-VOZTLX5F.js";
5
6
  export {
6
7
  addYears
7
8
  };
@@ -1,9 +1,11 @@
1
1
  import {
2
2
  normalizeTemporalInput
3
- } from "./chunk-MJSZNWCV.js";
3
+ } from "./chunk-F6EWMA4K.js";
4
+ import {
5
+ Temporal
6
+ } from "./chunk-VOZTLX5F.js";
4
7
 
5
8
  // src/eachWeekOfInterval.ts
6
- import { Temporal } from "@js-temporal/polyfill";
7
9
  function eachWeekOfInterval(interval) {
8
10
  const startZoned = normalizeTemporalInput(interval.start);
9
11
  const endZoned = normalizeTemporalInput(interval.end);
@@ -25,4 +27,4 @@ function eachWeekOfInterval(interval) {
25
27
  export {
26
28
  eachWeekOfInterval
27
29
  };
28
- //# sourceMappingURL=chunk-OLEOU3XE.js.map
30
+ //# sourceMappingURL=chunk-2J434XZJ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/eachWeekOfInterval.ts"],"sourcesContent":["import { Temporal } from './shared/temporal';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\n\n/**\n * Returns an array of ZonedDateTime objects for each week within the interval.\n * Each element represents the first moment of the week (Monday at midnight).\n * Uses ISO 8601 week definition: weeks start on Monday.\n * The interval is inclusive of both start and end weeks.\n *\n * For Instant inputs, UTC is used as the timezone.\n * For ZonedDateTime inputs, the timezone of the start date is preserved.\n *\n * @param interval - The interval with start and end datetimes\n * @returns Array of ZonedDateTime at start of each week (Monday) in the interval\n *\n * @example\n * ```ts\n * const start = Temporal.ZonedDateTime.from('2025-01-06T10:00:00Z[UTC]'); // Monday\n * const end = Temporal.ZonedDateTime.from('2025-01-22T14:00:00Z[UTC]'); // Wednesday\n *\n * const weeks = eachWeekOfInterval({ start, end });\n * // [\n * // 2025-01-06T00:00:00Z[UTC], // Week 2\n * // 2025-01-13T00:00:00Z[UTC], // Week 3\n * // 2025-01-20T00:00:00Z[UTC] // Week 4\n * // ]\n * ```\n *\n * @example\n * ```ts\n * // Mid-week start\n * const start = Temporal.ZonedDateTime.from('2025-01-08T10:00:00Z[UTC]'); // Wednesday\n * const end = Temporal.ZonedDateTime.from('2025-01-15T14:00:00Z[UTC]'); // Wednesday\n *\n * const weeks = eachWeekOfInterval({ start, end });\n * // [\n * // 2025-01-06T00:00:00Z[UTC], // Monday of week containing Jan 8\n * // 2025-01-13T00:00:00Z[UTC] // Monday of week containing Jan 15\n * // ]\n * ```\n *\n * @example\n * ```ts\n * // Cross-year boundary\n * const start = Temporal.ZonedDateTime.from('2024-12-25T00:00:00Z[UTC]');\n * const end = Temporal.ZonedDateTime.from('2025-01-08T00:00:00Z[UTC]');\n *\n * const weeks = eachWeekOfInterval({ start, end });\n * // [\n * // 2024-12-23T00:00:00Z[UTC], // Monday of week containing Dec 25\n * // 2024-12-30T00:00:00Z[UTC], // Monday of week containing Dec 30\n * // 2025-01-06T00:00:00Z[UTC] // Monday of week containing Jan 8\n * // ]\n * ```\n */\nexport function eachWeekOfInterval(interval: {\n start: Temporal.Instant | Temporal.ZonedDateTime;\n end: Temporal.Instant | Temporal.ZonedDateTime;\n}): Temporal.ZonedDateTime[] {\n const startZoned = normalizeTemporalInput(interval.start);\n const endZoned = normalizeTemporalInput(interval.end);\n\n const timezone = startZoned.timeZoneId;\n\n // Get Monday of the starting week\n // dayOfWeek: 1 = Monday, 7 = Sunday (ISO 8601)\n const daysToSubtractStart = startZoned.dayOfWeek - 1;\n const startMonday = startZoned.subtract({ days: daysToSubtractStart }).startOfDay();\n\n // Get Monday of the ending week\n const endInTimezone = endZoned.withTimeZone(timezone);\n const daysToSubtractEnd = endInTimezone.dayOfWeek - 1;\n const endMonday = endInTimezone.subtract({ days: daysToSubtractEnd }).startOfDay();\n\n const weeks: Temporal.ZonedDateTime[] = [];\n let current = startMonday;\n\n while (Temporal.ZonedDateTime.compare(current, endMonday) <= 0) {\n weeks.push(current);\n current = current.add({ weeks: 1 });\n }\n\n return weeks;\n}\n"],"mappings":";;;;;;;;AAuDO,SAAS,mBAAmB,UAGN;AAC3B,QAAM,aAAa,uBAAuB,SAAS,KAAK;AACxD,QAAM,WAAW,uBAAuB,SAAS,GAAG;AAEpD,QAAM,WAAW,WAAW;AAI5B,QAAM,sBAAsB,WAAW,YAAY;AACnD,QAAM,cAAc,WAAW,SAAS,EAAE,MAAM,oBAAoB,CAAC,EAAE,WAAW;AAGlF,QAAM,gBAAgB,SAAS,aAAa,QAAQ;AACpD,QAAM,oBAAoB,cAAc,YAAY;AACpD,QAAM,YAAY,cAAc,SAAS,EAAE,MAAM,kBAAkB,CAAC,EAAE,WAAW;AAEjF,QAAM,QAAkC,CAAC;AACzC,MAAI,UAAU;AAEd,SAAO,SAAS,cAAc,QAAQ,SAAS,SAAS,KAAK,GAAG;AAC9D,UAAM,KAAK,OAAO;AAClB,cAAU,QAAQ,IAAI,EAAE,OAAO,EAAE,CAAC;AAAA,EACpC;AAEA,SAAO;AACT;","names":[]}
@@ -1,9 +1,8 @@
1
1
  import {
2
2
  normalizeTemporalInput
3
- } from "./chunk-MJSZNWCV.js";
3
+ } from "./chunk-F6EWMA4K.js";
4
4
 
5
5
  // src/isSameDay.ts
6
- import "@js-temporal/polyfill";
7
6
  function isSameDay(date1, date2) {
8
7
  const zoned1 = normalizeTemporalInput(date1);
9
8
  const zoned2 = normalizeTemporalInput(date2);
@@ -13,4 +12,4 @@ function isSameDay(date1, date2) {
13
12
  export {
14
13
  isSameDay
15
14
  };
16
- //# sourceMappingURL=chunk-RW3C2677.js.map
15
+ //# sourceMappingURL=chunk-3QC5YINX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/isSameDay.ts"],"sourcesContent":["import { Temporal } from './shared/temporal';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\n\n/**\n * Returns true if both datetimes fall on the same calendar day.\n * Compares the year, month, and day fields directly.\n *\n * Instant inputs are converted to UTC. For ZonedDateTime inputs, their\n * timezone is preserved. Convert to a common timezone before calling if\n * you need to compare from a specific perspective.\n *\n * @param date1 - First datetime (Instant or ZonedDateTime)\n * @param date2 - Second datetime (Instant or ZonedDateTime)\n * @returns true if both dates are on the same calendar day, false otherwise\n *\n * @example\n * ```ts\n * // Same timezone, same day\n * const morning = Temporal.ZonedDateTime.from('2025-01-20T08:00:00Z[UTC]');\n * const evening = Temporal.ZonedDateTime.from('2025-01-20T23:00:00Z[UTC]');\n *\n * isSameDay(morning, evening); // true\n * ```\n *\n * @example\n * ```ts\n * // Same timezone, different days\n * const today = Temporal.ZonedDateTime.from('2025-01-20T23:59:59Z[UTC]');\n * const tomorrow = Temporal.ZonedDateTime.from('2025-01-21T00:00:00Z[UTC]');\n *\n * isSameDay(today, tomorrow); // false\n * ```\n *\n * @example\n * ```ts\n * // Different timezones - compares their local calendar days\n * const ny = Temporal.ZonedDateTime.from('2025-01-20T23:00:00-05:00[America/New_York]');\n * const tokyo = Temporal.ZonedDateTime.from('2025-01-21T13:00:00+09:00[Asia/Tokyo]');\n *\n * // Same instant, different calendar days from each person's perspective\n * isSameDay(ny, tokyo); // false (Jan 20 in NY, Jan 21 in Tokyo)\n *\n * // Convert to UTC to compare in UTC timezone\n * isSameDay(ny.withTimeZone('UTC'), tokyo.withTimeZone('UTC')); // true (both Jan 21 in UTC)\n *\n * // Convert to NY timezone to compare from NY perspective\n * isSameDay(ny, tokyo.withTimeZone('America/New_York')); // true (both Jan 20 in NY)\n * ```\n *\n * @example\n * ```ts\n * // Instant inputs are converted to UTC\n * const instant1 = Temporal.Instant.from('2025-01-20T10:00:00Z');\n * const instant2 = Temporal.Instant.from('2025-01-20T23:00:00Z');\n *\n * isSameDay(instant1, instant2); // true (both Jan 20 in UTC)\n * ```\n */\nexport function isSameDay(\n date1: Temporal.Instant | Temporal.ZonedDateTime,\n date2: Temporal.Instant | Temporal.ZonedDateTime\n): boolean {\n const zoned1 = normalizeTemporalInput(date1);\n const zoned2 = normalizeTemporalInput(date2);\n\n return (\n zoned1.year === zoned2.year &&\n zoned1.month === zoned2.month &&\n zoned1.day === zoned2.day\n );\n}\n"],"mappings":";;;;;AA0DO,SAAS,UACd,OACA,OACS;AACT,QAAM,SAAS,uBAAuB,KAAK;AAC3C,QAAM,SAAS,uBAAuB,KAAK;AAE3C,SACE,OAAO,SAAS,OAAO,QACvB,OAAO,UAAU,OAAO,SACxB,OAAO,QAAQ,OAAO;AAE1B;","names":[]}
@@ -1,9 +1,8 @@
1
1
  import {
2
2
  normalizeWithPlainDate
3
- } from "./chunk-KGVUENQO.js";
3
+ } from "./chunk-Y4HT4LCB.js";
4
4
 
5
5
  // src/startOfDay.ts
6
- import "@js-temporal/polyfill";
7
6
  function startOfDay(input, timezone) {
8
7
  const zonedDateTime = normalizeWithPlainDate(input, timezone);
9
8
  return zonedDateTime.startOfDay();
@@ -12,4 +11,4 @@ function startOfDay(input, timezone) {
12
11
  export {
13
12
  startOfDay
14
13
  };
15
- //# sourceMappingURL=chunk-YIT6EMBC.js.map
14
+ //# sourceMappingURL=chunk-3WWRI3NR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/startOfDay.ts"],"sourcesContent":["import { Temporal } from './shared/temporal';\nimport type { Timezone } from './types';\nimport { normalizeWithPlainDate } from './shared/normalizeWithPlainDate';\n\n/**\n * Returns a ZonedDateTime representing the first moment of the day (midnight).\n *\n * @param input - A Temporal.Instant (UTC) or Temporal.ZonedDateTime\n * @returns ZonedDateTime at 00:00:00.000000000\n *\n * @example\n * ```ts\n * // From Instant (always UTC)\n * const instant = Temporal.Instant.from('2025-01-20T12:00:00Z');\n * const start = startOfDay(instant);\n * // 2025-01-20T00:00:00Z[UTC]\n * ```\n *\n * @example\n * ```ts\n * // From ZonedDateTime (uses its timezone)\n * const zoned = Temporal.ZonedDateTime.from('2025-01-20T15:30:00-05:00[America/New_York]');\n * const start = startOfDay(zoned);\n * // 2025-01-20T00:00:00-05:00[America/New_York]\n * ```\n *\n * @example\n * ```ts\n * // From PlainDate (requires timezone)\n * const date = Temporal.PlainDate.from('2025-01-20');\n * const start = startOfDay(date, 'America/New_York');\n * // 2025-01-20T00:00:00-05:00[America/New_York]\n * ```\n */\nexport function startOfDay(\n input: Temporal.Instant | Temporal.ZonedDateTime\n): Temporal.ZonedDateTime;\nexport function startOfDay(\n input: Temporal.PlainDate,\n timezone: Timezone\n): Temporal.ZonedDateTime;\nexport function startOfDay(\n input: Temporal.Instant | Temporal.ZonedDateTime | Temporal.PlainDate,\n timezone?: Timezone\n): Temporal.ZonedDateTime {\n const zonedDateTime = normalizeWithPlainDate(input, timezone!);\n return zonedDateTime.startOfDay();\n}\n"],"mappings":";;;;;AAyCO,SAAS,WACd,OACA,UACwB;AACxB,QAAM,gBAAgB,uBAAuB,OAAO,QAAS;AAC7D,SAAO,cAAc,WAAW;AAClC;","names":[]}
@@ -3,15 +3,17 @@ import {
3
3
  } from "./chunk-AVGNRINZ.js";
4
4
  import {
5
5
  plainDateToZonedDateTime
6
- } from "./chunk-JNA3AFOC.js";
6
+ } from "./chunk-LYPSZYIG.js";
7
7
  import {
8
8
  normalizeTemporalInput
9
- } from "./chunk-MJSZNWCV.js";
9
+ } from "./chunk-F6EWMA4K.js";
10
+ import {
11
+ isPlainDate
12
+ } from "./chunk-VOZTLX5F.js";
10
13
 
11
14
  // src/endOfWeek.ts
12
- import { Temporal } from "@js-temporal/polyfill";
13
15
  function endOfWeek(input, timezone) {
14
- const zonedDateTime = input instanceof Temporal.PlainDate ? plainDateToZonedDateTime(input, timezone) : normalizeTemporalInput(input);
16
+ const zonedDateTime = isPlainDate(input) ? plainDateToZonedDateTime(input, timezone) : normalizeTemporalInput(input);
15
17
  const dayOfWeek = zonedDateTime.dayOfWeek;
16
18
  const daysToAdd = 7 - dayOfWeek;
17
19
  const sunday = zonedDateTime.add({ days: daysToAdd });
@@ -21,4 +23,4 @@ function endOfWeek(input, timezone) {
21
23
  export {
22
24
  endOfWeek
23
25
  };
24
- //# sourceMappingURL=chunk-X26WIJ6L.js.map
26
+ //# sourceMappingURL=chunk-46EP6MO2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/endOfWeek.ts"],"sourcesContent":["import { isPlainDate } from './shared/temporal';\nimport type { Temporal } from '@js-temporal/polyfill';\nimport type { Timezone } from './types';\nimport { getEndOfDay } from './shared/endOfDay';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\nimport { plainDateToZonedDateTime } from './shared/plainDateToZonedDateTime';\n\n/**\n * Returns a ZonedDateTime representing the last moment of the week (Sunday at 23:59:59.999999999).\n * Uses ISO 8601 week definition: weeks end on Sunday.\n *\n * @param input - A Temporal.Instant (UTC) or Temporal.ZonedDateTime\n * @returns ZonedDateTime at Sunday 23:59:59.999999999\n *\n * @example\n * ```ts\n * // From Instant (always UTC)\n * const instant = Temporal.Instant.from('2025-01-20T12:00:00Z'); // Monday\n * const end = endOfWeek(instant);\n * // 2025-01-26T23:59:59.999999999Z[UTC] (next Sunday)\n * ```\n *\n * @example\n * ```ts\n * // From ZonedDateTime (uses its timezone)\n * const zoned = Temporal.ZonedDateTime.from('2025-01-22T15:30:00-05:00[America/New_York]'); // Wednesday\n * const end = endOfWeek(zoned);\n * // 2025-01-26T23:59:59.999999999-05:00[America/New_York] (next Sunday)\n * ```\n *\n * @example\n * ```ts\n * // From PlainDate (requires timezone)\n * const date = Temporal.PlainDate.from('2025-01-22'); // Wednesday\n * const end = endOfWeek(date, 'America/New_York');\n * // 2025-01-26T23:59:59.999999999-05:00[America/New_York] (next Sunday)\n * ```\n */\nexport function endOfWeek(\n input: Temporal.Instant | Temporal.ZonedDateTime\n): Temporal.ZonedDateTime;\nexport function endOfWeek(\n input: Temporal.PlainDate,\n timezone: Timezone\n): Temporal.ZonedDateTime;\nexport function endOfWeek(\n input: Temporal.Instant | Temporal.ZonedDateTime | Temporal.PlainDate,\n timezone?: Timezone\n): Temporal.ZonedDateTime {\n const zonedDateTime =\n isPlainDate(input)\n ? plainDateToZonedDateTime(input, timezone!)\n : normalizeTemporalInput(input);\n\n // Get the day of week (1 = Monday, 7 = Sunday in ISO 8601)\n const dayOfWeek = zonedDateTime.dayOfWeek;\n\n // Calculate days to add to get to Sunday\n const daysToAdd = 7 - dayOfWeek;\n\n // Go to Sunday, then get end of that day\n const sunday = zonedDateTime.add({ days: daysToAdd });\n\n return getEndOfDay(sunday);\n}\n"],"mappings":";;;;;;;;;;;;;;AA6CO,SAAS,UACd,OACA,UACwB;AACxB,QAAM,gBACJ,YAAY,KAAK,IACb,yBAAyB,OAAO,QAAS,IACzC,uBAAuB,KAAK;AAGlC,QAAM,YAAY,cAAc;AAGhC,QAAM,YAAY,IAAI;AAGtB,QAAM,SAAS,cAAc,IAAI,EAAE,MAAM,UAAU,CAAC;AAEpD,SAAO,YAAY,MAAM;AAC3B;","names":[]}
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  isBefore
3
- } from "./chunk-WUAIUEH7.js";
3
+ } from "./chunk-BIH6JETG.js";
4
4
  import {
5
5
  nowZoned
6
- } from "./chunk-QFNGYTTH.js";
6
+ } from "./chunk-DTZPE5PM.js";
7
7
  import {
8
8
  normalizeTemporalInput
9
- } from "./chunk-MJSZNWCV.js";
9
+ } from "./chunk-F6EWMA4K.js";
10
10
 
11
11
  // src/isPast.ts
12
12
  function isPast(date) {
@@ -17,4 +17,4 @@ function isPast(date) {
17
17
  export {
18
18
  isPast
19
19
  };
20
- //# sourceMappingURL=chunk-UBY22QWM.js.map
20
+ //# sourceMappingURL=chunk-4ZRJ3EHQ.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  normalizeTemporalInput
3
- } from "./chunk-MJSZNWCV.js";
3
+ } from "./chunk-F6EWMA4K.js";
4
4
 
5
5
  // src/addYears.ts
6
6
  function addYears(input, years) {
@@ -11,4 +11,4 @@ function addYears(input, years) {
11
11
  export {
12
12
  addYears
13
13
  };
14
- //# sourceMappingURL=chunk-Q2F3HEXB.js.map
14
+ //# sourceMappingURL=chunk-5HVHKQTJ.js.map
@@ -1,12 +1,11 @@
1
1
  import {
2
2
  differenceInMilliseconds
3
- } from "./chunk-AJ4JBKJK.js";
3
+ } from "./chunk-VXOQ7IG5.js";
4
4
  import {
5
5
  normalizeTemporalInput
6
- } from "./chunk-MJSZNWCV.js";
6
+ } from "./chunk-F6EWMA4K.js";
7
7
 
8
8
  // src/differenceInMilliseconds.ts
9
- import "@js-temporal/polyfill";
10
9
  function differenceInMilliseconds2(laterDate, earlierDate) {
11
10
  const zoned1 = normalizeTemporalInput(laterDate);
12
11
  const zoned2 = normalizeTemporalInput(earlierDate);
@@ -16,4 +15,4 @@ function differenceInMilliseconds2(laterDate, earlierDate) {
16
15
  export {
17
16
  differenceInMilliseconds2 as differenceInMilliseconds
18
17
  };
19
- //# sourceMappingURL=chunk-BV6CLVSI.js.map
18
+ //# sourceMappingURL=chunk-76RCTVBW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/differenceInMilliseconds.ts"],"sourcesContent":["import { Temporal } from './shared/temporal';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\nimport { differenceInMilliseconds as differenceInMillisecondsInternal } from './shared/differenceInMilliseconds';\n\n/**\n * Returns the number of milliseconds between two datetimes.\n * The result is positive if laterDate is after earlierDate, negative if before.\n *\n * @param laterDate - The later datetime (Instant or ZonedDateTime)\n * @param earlierDate - The earlier datetime (Instant or ZonedDateTime)\n * @returns The number of milliseconds between the dates\n *\n * @example\n * ```ts\n * const later = Temporal.Instant.from('2025-01-20T12:30:21.700Z');\n * const earlier = Temporal.Instant.from('2025-01-20T12:30:20.600Z');\n *\n * differenceInMilliseconds(later, earlier); // 1100\n * ```\n *\n * @example\n * ```ts\n * // Works with ZonedDateTime\n * const later = Temporal.ZonedDateTime.from('2025-01-20T15:00:00-05:00[America/New_York]');\n * const earlier = Temporal.ZonedDateTime.from('2025-01-20T14:00:00-05:00[America/New_York]');\n *\n * differenceInMilliseconds(later, earlier); // 3600000\n * ```\n *\n * @example\n * ```ts\n * // Handles different timezones - compares by instant\n * const tokyo = Temporal.ZonedDateTime.from('2025-01-21T00:00:00+09:00[Asia/Tokyo]');\n * const ny = Temporal.ZonedDateTime.from('2025-01-20T10:00:00-05:00[America/New_York]');\n *\n * differenceInMilliseconds(tokyo, ny); // 0 (same instant)\n * ```\n */\nexport function differenceInMilliseconds(\n laterDate: Temporal.Instant | Temporal.ZonedDateTime,\n earlierDate: Temporal.Instant | Temporal.ZonedDateTime\n): number {\n const zoned1 = normalizeTemporalInput(laterDate);\n const zoned2 = normalizeTemporalInput(earlierDate);\n\n return differenceInMillisecondsInternal(zoned1, zoned2);\n}\n"],"mappings":";;;;;;;;AAsCO,SAASA,0BACd,WACA,aACQ;AACR,QAAM,SAAS,uBAAuB,SAAS;AAC/C,QAAM,SAAS,uBAAuB,WAAW;AAEjD,SAAO,yBAAiC,QAAQ,MAAM;AACxD;","names":["differenceInMilliseconds"]}
@@ -1,5 +1,8 @@
1
+ import {
2
+ Temporal
3
+ } from "./chunk-VOZTLX5F.js";
4
+
1
5
  // src/isPlainDateEqual.ts
2
- import { Temporal } from "@js-temporal/polyfill";
3
6
  function isPlainDateEqual(date1, date2) {
4
7
  return Temporal.PlainDate.compare(date1, date2) === 0;
5
8
  }
@@ -7,4 +10,4 @@ function isPlainDateEqual(date1, date2) {
7
10
  export {
8
11
  isPlainDateEqual
9
12
  };
10
- //# sourceMappingURL=chunk-O6RIN7K3.js.map
13
+ //# sourceMappingURL=chunk-7LZPFGGV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/isPlainDateEqual.ts"],"sourcesContent":["import { Temporal } from './shared/temporal';\n\n/**\n * Returns true if the two plain dates are equal.\n * Compares calendar dates without time or timezone considerations.\n *\n * @param date1 - First plain date\n * @param date2 - Second plain date\n * @returns true if date1 equals date2, false otherwise\n *\n * @example\n * ```ts\n * const jan20a = Temporal.PlainDate.from('2025-01-20');\n * const jan20b = Temporal.PlainDate.from('2025-01-20');\n * const jan25 = Temporal.PlainDate.from('2025-01-25');\n *\n * isPlainDateEqual(jan20a, jan20b); // true\n * isPlainDateEqual(jan20a, jan25); // false\n * ```\n */\nexport function isPlainDateEqual(\n date1: Temporal.PlainDate,\n date2: Temporal.PlainDate\n): boolean {\n return Temporal.PlainDate.compare(date1, date2) === 0;\n}\n"],"mappings":";;;;;AAoBO,SAAS,iBACd,OACA,OACS;AACT,SAAO,SAAS,UAAU,QAAQ,OAAO,KAAK,MAAM;AACtD;","names":[]}
@@ -1,15 +1,14 @@
1
1
  import {
2
2
  isAfter
3
- } from "./chunk-WY63VEXE.js";
3
+ } from "./chunk-C5HDCIRV.js";
4
4
  import {
5
5
  isBefore
6
- } from "./chunk-WUAIUEH7.js";
6
+ } from "./chunk-BIH6JETG.js";
7
7
  import {
8
8
  normalizeTemporalInput
9
- } from "./chunk-MJSZNWCV.js";
9
+ } from "./chunk-F6EWMA4K.js";
10
10
 
11
11
  // src/isWithinInterval.ts
12
- import "@js-temporal/polyfill";
13
12
  function isWithinInterval(date, interval) {
14
13
  const normalizedDate = normalizeTemporalInput(date);
15
14
  const normalizedStart = normalizeTemporalInput(interval.start);
@@ -20,4 +19,4 @@ function isWithinInterval(date, interval) {
20
19
  export {
21
20
  isWithinInterval
22
21
  };
23
- //# sourceMappingURL=chunk-5C3TQSWA.js.map
22
+ //# sourceMappingURL=chunk-7NQ76UHP.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/isWithinInterval.ts"],"sourcesContent":["import { Temporal } from './shared/temporal';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\nimport { isBefore } from './shared/isBefore';\nimport { isAfter } from './shared/isAfter';\n\n/**\n * Returns true if the given date is within the interval (inclusive of start and end).\n * Compares by the underlying instant (epoch time), not by calendar date/time.\n *\n * @param date - The date to check (Instant or ZonedDateTime)\n * @param interval - The interval with start and end dates\n * @returns true if date is within the interval, false otherwise\n *\n * @example\n * ```ts\n * const start = Temporal.ZonedDateTime.from('2025-01-01T00:00:00Z[UTC]');\n * const end = Temporal.ZonedDateTime.from('2025-01-07T00:00:00Z[UTC]');\n * const date = Temporal.ZonedDateTime.from('2025-01-03T00:00:00Z[UTC]');\n *\n * isWithinInterval(date, { start, end }); // true\n * ```\n *\n * @example\n * ```ts\n * // Date outside the interval\n * const start = Temporal.ZonedDateTime.from('2025-01-01T00:00:00Z[UTC]');\n * const end = Temporal.ZonedDateTime.from('2025-01-07T00:00:00Z[UTC]');\n * const date = Temporal.ZonedDateTime.from('2025-01-10T00:00:00Z[UTC]');\n *\n * isWithinInterval(date, { start, end }); // false\n * ```\n *\n * @example\n * ```ts\n * // Date equal to interval start (inclusive)\n * const start = Temporal.ZonedDateTime.from('2025-01-01T00:00:00Z[UTC]');\n * const end = Temporal.ZonedDateTime.from('2025-01-07T00:00:00Z[UTC]');\n *\n * isWithinInterval(start, { start, end }); // true\n * ```\n *\n * @example\n * ```ts\n * // Date equal to interval end (inclusive)\n * const start = Temporal.ZonedDateTime.from('2025-01-01T00:00:00Z[UTC]');\n * const end = Temporal.ZonedDateTime.from('2025-01-07T00:00:00Z[UTC]');\n *\n * isWithinInterval(end, { start, end }); // true\n * ```\n *\n * @example\n * ```ts\n * // Works with Instant too\n * const start = Temporal.Instant.from('2025-01-01T00:00:00Z');\n * const end = Temporal.Instant.from('2025-01-07T00:00:00Z');\n * const date = Temporal.Instant.from('2025-01-03T00:00:00Z');\n *\n * isWithinInterval(date, { start, end }); // true\n * ```\n *\n * @example\n * ```ts\n * // Different timezones - compares by instant\n * const start = Temporal.ZonedDateTime.from('2025-01-01T00:00:00-05:00[America/New_York]');\n * const end = Temporal.ZonedDateTime.from('2025-01-07T00:00:00+09:00[Asia/Tokyo]');\n * const date = Temporal.ZonedDateTime.from('2025-01-03T12:00:00Z[UTC]');\n *\n * isWithinInterval(date, { start, end }); // true\n * ```\n */\nexport function isWithinInterval(\n date: Temporal.Instant | Temporal.ZonedDateTime,\n interval: {\n start: Temporal.Instant | Temporal.ZonedDateTime;\n end: Temporal.Instant | Temporal.ZonedDateTime;\n }\n): boolean {\n const normalizedDate = normalizeTemporalInput(date);\n const normalizedStart = normalizeTemporalInput(interval.start);\n const normalizedEnd = normalizeTemporalInput(interval.end);\n\n return !isBefore(normalizedDate, normalizedStart) && !isAfter(normalizedDate, normalizedEnd);\n}\n"],"mappings":";;;;;;;;;;;AAsEO,SAAS,iBACd,MACA,UAIS;AACT,QAAM,iBAAiB,uBAAuB,IAAI;AAClD,QAAM,kBAAkB,uBAAuB,SAAS,KAAK;AAC7D,QAAM,gBAAgB,uBAAuB,SAAS,GAAG;AAEzD,SAAO,CAAC,SAAS,gBAAgB,eAAe,KAAK,CAAC,QAAQ,gBAAgB,aAAa;AAC7F;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  addMonths
3
- } from "./chunk-7ATM7AXL.js";
3
+ } from "./chunk-OGNREZPA.js";
4
4
 
5
5
  // src/subMonths.ts
6
6
  function subMonths(input, months) {
@@ -10,4 +10,4 @@ function subMonths(input, months) {
10
10
  export {
11
11
  subMonths
12
12
  };
13
- //# sourceMappingURL=chunk-52NEOY34.js.map
13
+ //# sourceMappingURL=chunk-7XVPK2AV.js.map
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  normalizeTemporalInput
3
- } from "./chunk-MJSZNWCV.js";
3
+ } from "./chunk-F6EWMA4K.js";
4
4
 
5
5
  // src/differenceInWeeks.ts
6
- import "@js-temporal/polyfill";
7
- function differenceInWeeks(laterDate, earlierDate) {
6
+ function differenceInWeeks(laterDate, earlierDate, options) {
8
7
  const zoned1 = normalizeTemporalInput(laterDate);
9
8
  const zoned2 = normalizeTemporalInput(earlierDate);
10
9
  const duration = zoned2.until(zoned1, { largestUnit: "hours" });
11
- return duration.total({ unit: "weeks", relativeTo: zoned2 });
10
+ const precise = duration.total({ unit: "weeks", relativeTo: zoned2 });
11
+ return options?.fractional ? precise : Math.trunc(precise);
12
12
  }
13
13
 
14
14
  export {
15
15
  differenceInWeeks
16
16
  };
17
- //# sourceMappingURL=chunk-PVAOUYXF.js.map
17
+ //# sourceMappingURL=chunk-AAORAX74.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/differenceInWeeks.ts"],"sourcesContent":["import { Temporal } from './shared/temporal';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\nimport type { DifferenceOptions } from './shared/differenceOptions';\n\n/**\n * Returns the number of weeks between two datetimes.\n * The result is positive if laterDate is after earlierDate, negative if before.\n *\n * This function uses calendar-aware calculation, which means it properly handles\n * DST transitions and calendar weeks.\n *\n * Instant inputs are converted to UTC for calendar calculations.\n * For ZonedDateTime inputs, their timezone is preserved.\n *\n * @param laterDate - The later datetime (Instant or ZonedDateTime)\n * @param earlierDate - The earlier datetime (Instant or ZonedDateTime)\n * @param options - Optional { fractional } to return the precise value\n * @returns The number of weeks between the dates, truncated toward zero (pass { fractional: true } for the precise value)\n *\n * @example\n * ```ts\n * const later = Temporal.Instant.from('2025-02-10T12:00:00Z');\n * const earlier = Temporal.Instant.from('2025-01-20T12:00:00Z');\n *\n * differenceInWeeks(later, earlier); // 3\n * ```\n *\n * @example\n * ```ts\n * // Works with ZonedDateTime\n * const later = Temporal.ZonedDateTime.from('2025-02-10T15:00:00-05:00[America/New_York]');\n * const earlier = Temporal.ZonedDateTime.from('2025-01-20T15:00:00-05:00[America/New_York]');\n *\n * differenceInWeeks(later, earlier); // 3\n * ```\n *\n * @example\n * ```ts\n * // Pass { fractional: true } for partial-unit precision\n * const later = Temporal.Instant.from('2025-01-27T12:00:00Z');\n * const earlier = Temporal.Instant.from('2025-01-20T12:00:00Z');\n *\n * differenceInWeeks(later, earlier); // 1\n * ```\n */\nexport function differenceInWeeks(\n laterDate: Temporal.Instant | Temporal.ZonedDateTime,\n earlierDate: Temporal.Instant | Temporal.ZonedDateTime,\n options?: DifferenceOptions\n): number {\n const zoned1 = normalizeTemporalInput(laterDate);\n const zoned2 = normalizeTemporalInput(earlierDate);\n\n const duration = zoned2.until(zoned1, { largestUnit: 'hours' });\n const precise = duration.total({ unit: 'weeks', relativeTo: zoned2 });\n return options?.fractional ? precise : Math.trunc(precise);\n}\n"],"mappings":";;;;;AA6CO,SAAS,kBACd,WACA,aACA,SACQ;AACR,QAAM,SAAS,uBAAuB,SAAS;AAC/C,QAAM,SAAS,uBAAuB,WAAW;AAEjD,QAAM,WAAW,OAAO,MAAM,QAAQ,EAAE,aAAa,QAAQ,CAAC;AAC9D,QAAM,UAAU,SAAS,MAAM,EAAE,MAAM,SAAS,YAAY,OAAO,CAAC;AACpE,SAAO,SAAS,aAAa,UAAU,KAAK,MAAM,OAAO;AAC3D;","names":[]}
@@ -1,12 +1,11 @@
1
1
  import {
2
2
  normalizeWithPlainDate
3
- } from "./chunk-KGVUENQO.js";
3
+ } from "./chunk-Y4HT4LCB.js";
4
4
  import {
5
5
  getEndOfDay
6
6
  } from "./chunk-AVGNRINZ.js";
7
7
 
8
8
  // src/endOfYear.ts
9
- import "@js-temporal/polyfill";
10
9
  function endOfYear(input, timezone) {
11
10
  const zonedDateTime = normalizeWithPlainDate(input, timezone);
12
11
  const lastMonth = zonedDateTime.with({ month: zonedDateTime.monthsInYear });
@@ -17,4 +16,4 @@ function endOfYear(input, timezone) {
17
16
  export {
18
17
  endOfYear
19
18
  };
20
- //# sourceMappingURL=chunk-776JOVV6.js.map
19
+ //# sourceMappingURL=chunk-ADAN2I34.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/endOfYear.ts"],"sourcesContent":["import { Temporal } from './shared/temporal';\nimport type { Timezone } from './types';\nimport { getEndOfDay } from './shared/endOfDay';\nimport { normalizeWithPlainDate } from './shared/normalizeWithPlainDate';\n\n/**\n * Returns a ZonedDateTime representing the last moment of the year (last day at 23:59:59.999999999).\n *\n * @param input - A Temporal.Instant (UTC) or Temporal.ZonedDateTime\n * @returns ZonedDateTime at the last day of the year at 23:59:59.999999999\n *\n * @example\n * ```ts\n * // From Instant (always UTC)\n * const instant = Temporal.Instant.from('2025-06-15T12:00:00Z');\n * const end = endOfYear(instant);\n * // 2025-12-31T23:59:59.999999999Z[UTC]\n * ```\n *\n * @example\n * ```ts\n * // From ZonedDateTime (uses its timezone)\n * const zoned = Temporal.ZonedDateTime.from('2025-06-15T15:30:00-05:00[America/New_York]');\n * const end = endOfYear(zoned);\n * // 2025-12-31T23:59:59.999999999-05:00[America/New_York]\n * ```\n *\n * @example\n * ```ts\n * // From PlainDate (requires timezone)\n * const date = Temporal.PlainDate.from('2025-06-15');\n * const end = endOfYear(date, 'America/New_York');\n * // 2025-12-31T23:59:59.999999999-05:00[America/New_York]\n * ```\n */\nexport function endOfYear(\n input: Temporal.Instant | Temporal.ZonedDateTime\n): Temporal.ZonedDateTime;\nexport function endOfYear(\n input: Temporal.PlainDate,\n timezone: Timezone\n): Temporal.ZonedDateTime;\nexport function endOfYear(\n input: Temporal.Instant | Temporal.ZonedDateTime | Temporal.PlainDate,\n timezone?: Timezone\n): Temporal.ZonedDateTime {\n const zonedDateTime = normalizeWithPlainDate(input, timezone!);\n const lastMonth = zonedDateTime.with({ month: zonedDateTime.monthsInYear });\n const lastDay = lastMonth.with({ day: lastMonth.daysInMonth });\n return getEndOfDay(lastDay);\n}\n"],"mappings":";;;;;;;;AA0CO,SAAS,UACd,OACA,UACwB;AACxB,QAAM,gBAAgB,uBAAuB,OAAO,QAAS;AAC7D,QAAM,YAAY,cAAc,KAAK,EAAE,OAAO,cAAc,aAAa,CAAC;AAC1E,QAAM,UAAU,UAAU,KAAK,EAAE,KAAK,UAAU,YAAY,CAAC;AAC7D,SAAO,YAAY,OAAO;AAC5B;","names":[]}
@@ -1,5 +1,8 @@
1
+ import {
2
+ Temporal
3
+ } from "./chunk-VOZTLX5F.js";
4
+
1
5
  // src/shared/isBefore.ts
2
- import { Temporal } from "@js-temporal/polyfill";
3
6
  function isBefore(date1, date2) {
4
7
  return Temporal.ZonedDateTime.compare(date1, date2) < 0;
5
8
  }
@@ -7,4 +10,4 @@ function isBefore(date1, date2) {
7
10
  export {
8
11
  isBefore
9
12
  };
10
- //# sourceMappingURL=chunk-WUAIUEH7.js.map
13
+ //# sourceMappingURL=chunk-BIH6JETG.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/shared/isBefore.ts"],"sourcesContent":["import { Temporal } from './temporal';\n\nexport function isBefore(\n date1: Temporal.ZonedDateTime,\n date2: Temporal.ZonedDateTime\n): boolean {\n return Temporal.ZonedDateTime.compare(date1, date2) < 0;\n}\n"],"mappings":";;;;;AAEO,SAAS,SACd,OACA,OACS;AACT,SAAO,SAAS,cAAc,QAAQ,OAAO,KAAK,IAAI;AACxD;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  normalizeTemporalInput
3
- } from "./chunk-MJSZNWCV.js";
3
+ } from "./chunk-F6EWMA4K.js";
4
4
 
5
5
  // src/addWeeks.ts
6
6
  function addWeeks(input, weeks) {
@@ -11,4 +11,4 @@ function addWeeks(input, weeks) {
11
11
  export {
12
12
  addWeeks
13
13
  };
14
- //# sourceMappingURL=chunk-DT2EWLHU.js.map
14
+ //# sourceMappingURL=chunk-BOGN7JC3.js.map
@@ -1,5 +1,8 @@
1
+ import {
2
+ Temporal
3
+ } from "./chunk-VOZTLX5F.js";
4
+
1
5
  // src/shared/isAfter.ts
2
- import { Temporal } from "@js-temporal/polyfill";
3
6
  function isAfter(date1, date2) {
4
7
  return Temporal.ZonedDateTime.compare(date1, date2) > 0;
5
8
  }
@@ -7,4 +10,4 @@ function isAfter(date1, date2) {
7
10
  export {
8
11
  isAfter
9
12
  };
10
- //# sourceMappingURL=chunk-WY63VEXE.js.map
13
+ //# sourceMappingURL=chunk-C5HDCIRV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/shared/isAfter.ts"],"sourcesContent":["import { Temporal } from './temporal';\n\nexport function isAfter(\n date1: Temporal.ZonedDateTime,\n date2: Temporal.ZonedDateTime\n): boolean {\n return Temporal.ZonedDateTime.compare(date1, date2) > 0;\n}\n"],"mappings":";;;;;AAEO,SAAS,QACd,OACA,OACS;AACT,SAAO,SAAS,cAAc,QAAQ,OAAO,KAAK,IAAI;AACxD;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  addNanoseconds
3
- } from "./chunk-EYO2ZJLH.js";
3
+ } from "./chunk-DOGZ2WBH.js";
4
4
 
5
5
  // src/subNanoseconds.ts
6
6
  function subNanoseconds(input, nanoseconds) {
@@ -10,4 +10,4 @@ function subNanoseconds(input, nanoseconds) {
10
10
  export {
11
11
  subNanoseconds
12
12
  };
13
- //# sourceMappingURL=chunk-WVHAYLBW.js.map
13
+ //# sourceMappingURL=chunk-CP4JNCMO.js.map
@@ -1,8 +1,13 @@
1
+ import {
2
+ Temporal,
3
+ isInstant,
4
+ isZonedDateTime
5
+ } from "./chunk-VOZTLX5F.js";
6
+
1
7
  // src/toPlainDate.ts
2
- import { Temporal } from "@js-temporal/polyfill";
3
8
  var PLAIN_DATE_PATTERN = /^\d{4}-\d{2}-\d{2}$/;
4
9
  function toPlainDate(input, timezone) {
5
- if (input instanceof Temporal.ZonedDateTime && timezone === void 0) {
10
+ if (isZonedDateTime(input) && timezone === void 0) {
6
11
  return input.toPlainDate();
7
12
  }
8
13
  if (input instanceof Date) {
@@ -11,13 +16,13 @@ function toPlainDate(input, timezone) {
11
16
  }
12
17
  return Temporal.Instant.from(input.toISOString()).toZonedDateTimeISO(timezone).toPlainDate();
13
18
  }
14
- if (input instanceof Temporal.Instant) {
19
+ if (isInstant(input)) {
15
20
  if (timezone === void 0) {
16
21
  throw new Error("Timezone is required unless input is a ZonedDateTime, PlainDateLike, or plain date string");
17
22
  }
18
23
  return input.toZonedDateTimeISO(timezone).toPlainDate();
19
24
  }
20
- if (input instanceof Temporal.ZonedDateTime) {
25
+ if (isZonedDateTime(input)) {
21
26
  if (timezone === void 0) {
22
27
  throw new Error("Timezone is required unless input is a ZonedDateTime, PlainDateLike, or plain date string");
23
28
  }
@@ -38,4 +43,4 @@ function toPlainDate(input, timezone) {
38
43
  export {
39
44
  toPlainDate
40
45
  };
41
- //# sourceMappingURL=chunk-HFQUXON5.js.map
46
+ //# sourceMappingURL=chunk-DGRZ6HO3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/toPlainDate.ts"],"sourcesContent":["import { Temporal, isInstant, isZonedDateTime } from './shared/temporal';\nimport type { Timezone } from './types';\n\n// Pattern to detect plain date strings: YYYY-MM-DD\nconst PLAIN_DATE_PATTERN = /^\\d{4}-\\d{2}-\\d{2}$/;\n\n/**\n * Parse a plain date or extract the calendar date from a datetime.\n *\n * @param input - A PlainDateLike object, plain date string (YYYY-MM-DD), ZonedDateTime, or datetime input requiring timezone\n * @param timezone - IANA timezone identifier. Required for ISO strings, Date, and Instant inputs.\n * @returns A Temporal.PlainDate representing the calendar date\n *\n * @example\n * ```typescript\n * import { toPlainDate, toZonedTime } from '@gobrand/tiempo';\n *\n * // From PlainDateLike object (no timezone needed)\n * const date = toPlainDate({ year: 2025, month: 1, day: 20 }); // 2025-01-20\n *\n * // From plain date string (no timezone needed)\n * const date2 = toPlainDate(\"2025-01-20\"); // 2025-01-20\n *\n * // From ZonedDateTime (no timezone needed)\n * const zdt = toZonedTime(\"2025-01-20T15:30:00Z\", \"America/New_York\");\n * const date3 = toPlainDate(zdt); // 2025-01-20\n *\n * // From UTC string with timezone\n * const date4 = toPlainDate(\"2025-01-20T15:30:00Z\", \"America/New_York\"); // 2025-01-20\n *\n * // From Date with timezone\n * const jsDate = new Date(\"2025-01-20T15:30:00.000Z\");\n * const date5 = toPlainDate(jsDate, \"Europe/London\"); // 2025-01-20\n *\n * // Date boundary crossing: 23:00 UTC on Jan 20 → Jan 21 in Tokyo\n * const date6 = toPlainDate(\"2025-01-20T23:00:00Z\", \"Asia/Tokyo\"); // 2025-01-21\n * ```\n */\nexport function toPlainDate(input: Temporal.ZonedDateTime): Temporal.PlainDate;\nexport function toPlainDate(\n input: string | Date | Temporal.Instant | Temporal.ZonedDateTime,\n timezone: Timezone\n): Temporal.PlainDate;\nexport function toPlainDate(input: Temporal.PlainDateLike | string): Temporal.PlainDate;\nexport function toPlainDate(\n input: string | Date | Temporal.Instant | Temporal.ZonedDateTime | Temporal.PlainDateLike,\n timezone?: Timezone\n): Temporal.PlainDate {\n // ZonedDateTime without timezone override\n if (isZonedDateTime(input) && timezone === undefined) {\n return input.toPlainDate();\n }\n\n // Date requires timezone\n if (input instanceof Date) {\n if (timezone === undefined) {\n throw new Error('Timezone is required unless input is a ZonedDateTime, PlainDateLike, or plain date string');\n }\n return Temporal.Instant.from(input.toISOString()).toZonedDateTimeISO(timezone).toPlainDate();\n }\n\n // Instant requires timezone\n if (isInstant(input)) {\n if (timezone === undefined) {\n throw new Error('Timezone is required unless input is a ZonedDateTime, PlainDateLike, or plain date string');\n }\n return input.toZonedDateTimeISO(timezone).toPlainDate();\n }\n\n // ZonedDateTime with timezone override\n if (isZonedDateTime(input)) {\n if (timezone === undefined) {\n throw new Error('Timezone is required unless input is a ZonedDateTime, PlainDateLike, or plain date string');\n }\n return input.toInstant().toZonedDateTimeISO(timezone).toPlainDate();\n }\n\n // String: ISO datetime (requires timezone) or plain date (no timezone)\n if (typeof input === 'string') {\n if (timezone !== undefined) {\n return Temporal.Instant.from(input).toZonedDateTimeISO(timezone).toPlainDate();\n }\n if (PLAIN_DATE_PATTERN.test(input)) {\n return Temporal.PlainDate.from(input);\n }\n throw new Error('Timezone is required unless input is a ZonedDateTime, PlainDateLike, or plain date string');\n }\n\n // PlainDateLike object - pass directly to Temporal.PlainDate.from()\n return Temporal.PlainDate.from(input);\n}\n"],"mappings":";;;;;;;AAIA,IAAM,qBAAqB;AAwCpB,SAAS,YACd,OACA,UACoB;AAEpB,MAAI,gBAAgB,KAAK,KAAK,aAAa,QAAW;AACpD,WAAO,MAAM,YAAY;AAAA,EAC3B;AAGA,MAAI,iBAAiB,MAAM;AACzB,QAAI,aAAa,QAAW;AAC1B,YAAM,IAAI,MAAM,2FAA2F;AAAA,IAC7G;AACA,WAAO,SAAS,QAAQ,KAAK,MAAM,YAAY,CAAC,EAAE,mBAAmB,QAAQ,EAAE,YAAY;AAAA,EAC7F;AAGA,MAAI,UAAU,KAAK,GAAG;AACpB,QAAI,aAAa,QAAW;AAC1B,YAAM,IAAI,MAAM,2FAA2F;AAAA,IAC7G;AACA,WAAO,MAAM,mBAAmB,QAAQ,EAAE,YAAY;AAAA,EACxD;AAGA,MAAI,gBAAgB,KAAK,GAAG;AAC1B,QAAI,aAAa,QAAW;AAC1B,YAAM,IAAI,MAAM,2FAA2F;AAAA,IAC7G;AACA,WAAO,MAAM,UAAU,EAAE,mBAAmB,QAAQ,EAAE,YAAY;AAAA,EACpE;AAGA,MAAI,OAAO,UAAU,UAAU;AAC7B,QAAI,aAAa,QAAW;AAC1B,aAAO,SAAS,QAAQ,KAAK,KAAK,EAAE,mBAAmB,QAAQ,EAAE,YAAY;AAAA,IAC/E;AACA,QAAI,mBAAmB,KAAK,KAAK,GAAG;AAClC,aAAO,SAAS,UAAU,KAAK,KAAK;AAAA,IACtC;AACA,UAAM,IAAI,MAAM,2FAA2F;AAAA,EAC7G;AAGA,SAAO,SAAS,UAAU,KAAK,KAAK;AACtC;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  normalizeTemporalInput
3
- } from "./chunk-MJSZNWCV.js";
3
+ } from "./chunk-F6EWMA4K.js";
4
4
 
5
5
  // src/roundToNearestHour.ts
6
6
  var MODE_TO_ROUNDING_MODE = {
@@ -22,4 +22,4 @@ function roundToNearestHour(input, options) {
22
22
  export {
23
23
  roundToNearestHour
24
24
  };
25
- //# sourceMappingURL=chunk-MMI2HHT7.js.map
25
+ //# sourceMappingURL=chunk-DHJ353HR.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  normalizeTemporalInput
3
- } from "./chunk-MJSZNWCV.js";
3
+ } from "./chunk-F6EWMA4K.js";
4
4
 
5
5
  // src/addHours.ts
6
6
  function addHours(input, hours) {
@@ -11,4 +11,4 @@ function addHours(input, hours) {
11
11
  export {
12
12
  addHours
13
13
  };
14
- //# sourceMappingURL=chunk-4NJMCCUM.js.map
14
+ //# sourceMappingURL=chunk-DJRIH2PX.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  addDays
3
- } from "./chunk-L4SVABDH.js";
3
+ } from "./chunk-G4COVQ5S.js";
4
4
 
5
5
  // src/subDays.ts
6
6
  function subDays(input, days) {
@@ -10,4 +10,4 @@ function subDays(input, days) {
10
10
  export {
11
11
  subDays
12
12
  };
13
- //# sourceMappingURL=chunk-YKBP3G7L.js.map
13
+ //# sourceMappingURL=chunk-DN3V4IZC.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  normalizeTemporalInput
3
- } from "./chunk-MJSZNWCV.js";
3
+ } from "./chunk-F6EWMA4K.js";
4
4
 
5
5
  // src/addNanoseconds.ts
6
6
  function addNanoseconds(input, nanoseconds) {
@@ -11,4 +11,4 @@ function addNanoseconds(input, nanoseconds) {
11
11
  export {
12
12
  addNanoseconds
13
13
  };
14
- //# sourceMappingURL=chunk-EYO2ZJLH.js.map
14
+ //# sourceMappingURL=chunk-DOGZ2WBH.js.map