@gobrand/tiempo 2.8.1 → 2.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addDays.js +3 -2
- package/dist/addHours.js +3 -2
- package/dist/addMicroseconds.js +3 -2
- package/dist/addMilliseconds.js +3 -2
- package/dist/addMinutes.js +3 -2
- package/dist/addMonths.js +3 -2
- package/dist/addNanoseconds.js +3 -2
- package/dist/addSeconds.js +3 -2
- package/dist/addWeeks.js +3 -2
- package/dist/addYears.js +3 -2
- package/dist/{chunk-TNCLJK4Y.js → chunk-26VAIV6A.js} +5 -3
- package/dist/chunk-26VAIV6A.js.map +1 -0
- package/dist/{chunk-JA7SVLAF.js → chunk-2KYXZIGP.js} +4 -4
- package/dist/{chunk-AE36GX4F.js → chunk-2PDEHGNB.js} +5 -2
- package/dist/chunk-2PDEHGNB.js.map +1 -0
- package/dist/{chunk-VLZ3HQQA.js → chunk-2Q6WEULJ.js} +2 -2
- package/dist/{chunk-ZGR4NZTS.js → chunk-347TWPBS.js} +2 -3
- package/dist/chunk-347TWPBS.js.map +1 -0
- package/dist/{chunk-JOD4ATPE.js → chunk-3HXEOAQN.js} +2 -2
- package/dist/{chunk-WVHAYLBW.js → chunk-3ORGILYG.js} +2 -2
- package/dist/{chunk-7ATM7AXL.js → chunk-3RSGMPWR.js} +2 -2
- package/dist/{chunk-AHMKY474.js → chunk-3XNQYFWS.js} +2 -2
- package/dist/{chunk-5C3TQSWA.js → chunk-4BQ4BJ4Y.js} +4 -5
- package/dist/chunk-4BQ4BJ4Y.js.map +1 -0
- package/dist/{chunk-4E7OGJ3F.js → chunk-4EFKJDHV.js} +5 -2
- package/dist/chunk-4EFKJDHV.js.map +1 -0
- package/dist/{chunk-U4RNUZXO.js → chunk-4JPDLKBK.js} +2 -2
- package/dist/{chunk-Y7CIJQ67.js → chunk-4JPVE6OV.js} +5 -3
- package/dist/chunk-4JPVE6OV.js.map +1 -0
- package/dist/{chunk-OLEOU3XE.js → chunk-4N6CTX4N.js} +5 -3
- package/dist/chunk-4N6CTX4N.js.map +1 -0
- package/dist/{chunk-XW5MLXX5.js → chunk-4RLD3OE2.js} +2 -2
- package/dist/{chunk-YQBM63DC.js → chunk-5DQVEAAR.js} +9 -4
- package/dist/chunk-5DQVEAAR.js.map +1 -0
- package/dist/{chunk-YKBP3G7L.js → chunk-5ZOOVGMT.js} +2 -2
- package/dist/{chunk-UBY22QWM.js → chunk-63RSJ2W4.js} +4 -4
- package/dist/chunk-65RGM7EG.js +13 -0
- package/dist/chunk-65RGM7EG.js.map +1 -0
- package/dist/{chunk-EEQ3REET.js → chunk-6KAIABBV.js} +2 -2
- package/dist/{chunk-PPB62JYV.js → chunk-6SF6EC2I.js} +2 -2
- package/dist/{chunk-5BYRBC7H.js → chunk-7EVZGEAI.js} +18 -17
- package/dist/{chunk-5BYRBC7H.js.map → chunk-7EVZGEAI.js.map} +1 -1
- package/dist/{chunk-4NJMCCUM.js → chunk-7JL3U64G.js} +2 -2
- package/dist/{chunk-JNA3AFOC.js → chunk-AHBTUFRW.js} +5 -2
- package/dist/chunk-AHBTUFRW.js.map +1 -0
- package/dist/chunk-AI5MRREC.js +22 -0
- package/dist/chunk-AI5MRREC.js.map +1 -0
- package/dist/{chunk-RW3C2677.js → chunk-ALAAO5GL.js} +2 -3
- package/dist/chunk-ALAAO5GL.js.map +1 -0
- package/dist/{chunk-A5VVBYNT.js → chunk-ATEVQYB6.js} +2 -2
- package/dist/{chunk-OQ4CWKJT.js → chunk-BO5WXWO2.js} +2 -3
- package/dist/chunk-BO5WXWO2.js.map +1 -0
- package/dist/{chunk-4PSMM55Q.js → chunk-BQHSXMGZ.js} +7 -3
- package/dist/chunk-BQHSXMGZ.js.map +1 -0
- package/dist/{chunk-776JOVV6.js → chunk-C4UZJHM7.js} +2 -3
- package/dist/chunk-C4UZJHM7.js.map +1 -0
- package/dist/{chunk-VZJGCDAG.js → chunk-C5O6LIWR.js} +5 -2
- package/dist/chunk-C5O6LIWR.js.map +1 -0
- package/dist/{chunk-LDO6PRNJ.js → chunk-C7SIOWMA.js} +2 -2
- package/dist/{chunk-FSD3DDFC.js → chunk-CKOIGPND.js} +5 -2
- package/dist/chunk-CKOIGPND.js.map +1 -0
- package/dist/{chunk-6IP245MS.js → chunk-DC5JXNIC.js} +5 -5
- package/dist/chunk-DC5JXNIC.js.map +1 -0
- package/dist/{chunk-HOCNCQTC.js → chunk-E2MU2P66.js} +2 -3
- package/dist/chunk-E2MU2P66.js.map +1 -0
- package/dist/{chunk-ADQTZVMH.js → chunk-EKR6BYFM.js} +2 -2
- package/dist/{chunk-PVAOUYXF.js → chunk-EOXULNBC.js} +5 -5
- package/dist/chunk-EOXULNBC.js.map +1 -0
- package/dist/{chunk-BV6CLVSI.js → chunk-EW3MVOID.js} +3 -4
- package/dist/chunk-EW3MVOID.js.map +1 -0
- package/dist/{chunk-WUAIUEH7.js → chunk-EZJDWFFE.js} +5 -2
- package/dist/chunk-EZJDWFFE.js.map +1 -0
- package/dist/{chunk-BQBLSXK2.js → chunk-FLRHLAMD.js} +2 -2
- package/dist/{chunk-TGKWBQ7L.js → chunk-GSVAMMHA.js} +6 -3
- package/dist/chunk-GSVAMMHA.js.map +1 -0
- package/dist/{chunk-3TSFIPUR.js → chunk-HDTIOOWB.js} +2 -3
- package/dist/chunk-HDTIOOWB.js.map +1 -0
- package/dist/{chunk-EZ7NVTZI.js → chunk-I6S6EIZG.js} +7 -5
- package/dist/chunk-I6S6EIZG.js.map +1 -0
- package/dist/{chunk-NRD5HRZV.js → chunk-IOLV6PTH.js} +2 -2
- package/dist/{chunk-ZC6KWXCW.js → chunk-IV47GMAA.js} +36 -27
- package/dist/chunk-IV47GMAA.js.map +1 -0
- package/dist/{chunk-HFQUXON5.js → chunk-J52B4PX6.js} +10 -5
- package/dist/chunk-J52B4PX6.js.map +1 -0
- package/dist/{chunk-WY63VEXE.js → chunk-JM42PLWS.js} +5 -2
- package/dist/chunk-JM42PLWS.js.map +1 -0
- package/dist/{chunk-DKYVFYWM.js → chunk-JTANYFEV.js} +5 -3
- package/dist/chunk-JTANYFEV.js.map +1 -0
- package/dist/{chunk-G2JUEBC5.js → chunk-LOANS6ZE.js} +5 -3
- package/dist/chunk-LOANS6ZE.js.map +1 -0
- package/dist/{chunk-MMI2HHT7.js → chunk-LTW2TDLL.js} +2 -2
- package/dist/{chunk-JHRXY36W.js → chunk-MA7PR6V5.js} +2 -2
- package/dist/{chunk-L4SVABDH.js → chunk-MEADD45E.js} +2 -2
- package/dist/{chunk-2XHAHSB6.js → chunk-MXE44KVG.js} +2 -2
- package/dist/{chunk-DT2EWLHU.js → chunk-NE7HNEF6.js} +2 -2
- package/dist/{chunk-EYO2ZJLH.js → chunk-OPWK2TVF.js} +2 -2
- package/dist/{chunk-BIAPE4MR.js → chunk-OVFO6CZ7.js} +5 -5
- package/dist/chunk-OVFO6CZ7.js.map +1 -0
- package/dist/{chunk-HDBH7RTY.js → chunk-OX4I35UO.js} +2 -2
- package/dist/{chunk-3A6X6WV5.js → chunk-PXF3RMFH.js} +1 -2
- package/dist/chunk-PXF3RMFH.js.map +1 -0
- package/dist/{chunk-CY746ZUQ.js → chunk-RB2YCLBV.js} +2 -2
- package/dist/{chunk-UJWM2BV2.js → chunk-RLF3Y7VC.js} +10 -5
- package/dist/chunk-RLF3Y7VC.js.map +1 -0
- package/dist/{chunk-RBEW6PXR.js → chunk-RPQ5K247.js} +5 -2
- package/dist/chunk-RPQ5K247.js.map +1 -0
- package/dist/{chunk-HLGMUTFK.js → chunk-RQUVNJBG.js} +2 -3
- package/dist/chunk-RQUVNJBG.js.map +1 -0
- package/dist/{chunk-UJW2FPI4.js → chunk-RTNF2H34.js} +2 -2
- package/dist/{chunk-BPZ7BRJW.js → chunk-RW25XXOH.js} +5 -2
- package/dist/chunk-RW25XXOH.js.map +1 -0
- package/dist/{chunk-QFNGYTTH.js → chunk-RXTMPPOP.js} +5 -3
- package/dist/chunk-RXTMPPOP.js.map +1 -0
- package/dist/{chunk-S63QUP4W.js → chunk-SAFMGBXL.js} +2 -2
- package/dist/chunk-SGHPW77A.js +19 -0
- package/dist/chunk-SGHPW77A.js.map +1 -0
- package/dist/{chunk-AJEIDKVJ.js → chunk-T4J7PXYZ.js} +5 -2
- package/dist/chunk-T4J7PXYZ.js.map +1 -0
- package/dist/{chunk-KZB6NERH.js → chunk-TCEDHHNM.js} +5 -2
- package/dist/chunk-TCEDHHNM.js.map +1 -0
- package/dist/{chunk-J6G2I2TU.js → chunk-TKV5JYQY.js} +2 -2
- package/dist/chunk-TUOGC2TY.js +19 -0
- package/dist/chunk-TUOGC2TY.js.map +1 -0
- package/dist/chunk-TWZNSMKO.js +19 -0
- package/dist/chunk-TWZNSMKO.js.map +1 -0
- package/dist/{chunk-YIT6EMBC.js → chunk-TYYV5UYX.js} +2 -3
- package/dist/chunk-TYYV5UYX.js.map +1 -0
- package/dist/{chunk-7VLSSOVC.js → chunk-UAYBKORB.js} +3 -4
- package/dist/chunk-UAYBKORB.js.map +1 -0
- package/dist/{chunk-OABS374T.js → chunk-VBDGWVJ4.js} +2 -3
- package/dist/chunk-VBDGWVJ4.js.map +1 -0
- package/dist/{chunk-BUX26GTD.js → chunk-VDEZJB42.js} +5 -3
- package/dist/chunk-VDEZJB42.js.map +1 -0
- package/dist/{chunk-O6RIN7K3.js → chunk-VJGNLAF2.js} +5 -2
- package/dist/chunk-VJGNLAF2.js.map +1 -0
- package/dist/{chunk-ZDA7GSWU.js → chunk-VTP4QJY6.js} +3 -4
- package/dist/chunk-VTP4QJY6.js.map +1 -0
- package/dist/{chunk-DFLGGK4F.js → chunk-VTXBG2JV.js} +6 -3
- package/dist/chunk-VTXBG2JV.js.map +1 -0
- package/dist/{chunk-BH2YB4MV.js → chunk-VXG2IG2N.js} +2 -2
- package/dist/{chunk-AJ4JBKJK.js → chunk-VXOQ7IG5.js} +1 -2
- package/dist/chunk-VXOQ7IG5.js.map +1 -0
- package/dist/{chunk-V27NUBXQ.js → chunk-WWLDINLH.js} +2 -2
- package/dist/{chunk-CHW2EN2O.js → chunk-X3T7QMBA.js} +5 -5
- package/dist/chunk-X3T7QMBA.js.map +1 -0
- package/dist/chunk-XVAVCEKT.js +19 -0
- package/dist/chunk-XVAVCEKT.js.map +1 -0
- package/dist/{chunk-Q2F3HEXB.js → chunk-YMS7JXBN.js} +2 -2
- package/dist/{chunk-52NEOY34.js → chunk-YNV6WGXV.js} +2 -2
- package/dist/{chunk-BSV32PSO.js → chunk-YO2VXHA5.js} +6 -3
- package/dist/chunk-YO2VXHA5.js.map +1 -0
- package/dist/{chunk-ISHZRFVN.js → chunk-ZITFEEZS.js} +2 -2
- package/dist/{chunk-X26WIJ6L.js → chunk-ZSOH7VST.js} +7 -5
- package/dist/chunk-ZSOH7VST.js.map +1 -0
- package/dist/differenceInDays.d.ts +5 -3
- package/dist/differenceInDays.d.ts.map +1 -1
- package/dist/differenceInDays.js +3 -2
- package/dist/differenceInHours.d.ts +5 -3
- package/dist/differenceInHours.d.ts.map +1 -1
- package/dist/differenceInHours.js +4 -3
- package/dist/differenceInMicroseconds.d.ts +1 -1
- package/dist/differenceInMicroseconds.d.ts.map +1 -1
- package/dist/differenceInMicroseconds.js +3 -2
- package/dist/differenceInMilliseconds.d.ts +1 -1
- package/dist/differenceInMilliseconds.d.ts.map +1 -1
- package/dist/differenceInMilliseconds.js +4 -3
- package/dist/differenceInMinutes.d.ts +5 -3
- package/dist/differenceInMinutes.d.ts.map +1 -1
- package/dist/differenceInMinutes.js +4 -3
- package/dist/differenceInMonths.d.ts +8 -5
- package/dist/differenceInMonths.d.ts.map +1 -1
- package/dist/differenceInMonths.js +3 -2
- package/dist/differenceInNanoseconds.d.ts +1 -1
- package/dist/differenceInNanoseconds.d.ts.map +1 -1
- package/dist/differenceInNanoseconds.js +3 -2
- package/dist/differenceInSeconds.d.ts +5 -3
- package/dist/differenceInSeconds.d.ts.map +1 -1
- package/dist/differenceInSeconds.js +4 -3
- package/dist/differenceInWeeks.d.ts +6 -4
- package/dist/differenceInWeeks.d.ts.map +1 -1
- package/dist/differenceInWeeks.js +3 -2
- package/dist/differenceInYears.d.ts +8 -5
- package/dist/differenceInYears.d.ts.map +1 -1
- package/dist/differenceInYears.js +3 -2
- package/dist/eachDayOfInterval.d.ts +1 -1
- package/dist/eachDayOfInterval.d.ts.map +1 -1
- package/dist/eachDayOfInterval.js +3 -2
- package/dist/eachHourOfInterval.d.ts +1 -1
- package/dist/eachHourOfInterval.d.ts.map +1 -1
- package/dist/eachHourOfInterval.js +3 -2
- package/dist/eachMinuteOfInterval.d.ts +1 -1
- package/dist/eachMinuteOfInterval.d.ts.map +1 -1
- package/dist/eachMinuteOfInterval.js +3 -2
- package/dist/eachMonthOfInterval.d.ts +1 -1
- package/dist/eachMonthOfInterval.d.ts.map +1 -1
- package/dist/eachMonthOfInterval.js +3 -2
- package/dist/eachWeekOfInterval.d.ts +1 -1
- package/dist/eachWeekOfInterval.d.ts.map +1 -1
- package/dist/eachWeekOfInterval.js +3 -2
- package/dist/eachYearOfInterval.d.ts +1 -1
- package/dist/eachYearOfInterval.d.ts.map +1 -1
- package/dist/eachYearOfInterval.js +3 -2
- package/dist/endOfDay.d.ts +1 -1
- package/dist/endOfDay.d.ts.map +1 -1
- package/dist/endOfDay.js +5 -4
- package/dist/endOfMonth.d.ts +1 -1
- package/dist/endOfMonth.d.ts.map +1 -1
- package/dist/endOfMonth.js +5 -4
- package/dist/endOfWeek.d.ts +1 -1
- package/dist/endOfWeek.d.ts.map +1 -1
- package/dist/endOfWeek.js +4 -3
- package/dist/endOfYear.d.ts +1 -1
- package/dist/endOfYear.d.ts.map +1 -1
- package/dist/endOfYear.js +5 -4
- package/dist/format.d.ts +1 -1
- package/dist/format.d.ts.map +1 -1
- package/dist/format.js +3 -2
- package/dist/formatPlainDate.d.ts +1 -1
- package/dist/formatPlainDate.d.ts.map +1 -1
- package/dist/formatPlainDate.js +2 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +89 -88
- package/dist/intlFormatDistance.d.ts.map +1 -1
- package/dist/intlFormatDistance.js +11 -10
- package/dist/isAfter.d.ts +1 -1
- package/dist/isAfter.d.ts.map +1 -1
- package/dist/isAfter.js +4 -3
- package/dist/isBefore.d.ts +1 -1
- package/dist/isBefore.d.ts.map +1 -1
- package/dist/isBefore.js +4 -3
- package/dist/isFuture.js +5 -4
- package/dist/isPast.js +5 -4
- package/dist/isPlainDateAfter.d.ts +1 -1
- package/dist/isPlainDateAfter.d.ts.map +1 -1
- package/dist/isPlainDateAfter.js +2 -1
- package/dist/isPlainDateBefore.d.ts +1 -1
- package/dist/isPlainDateBefore.d.ts.map +1 -1
- package/dist/isPlainDateBefore.js +2 -1
- package/dist/isPlainDateEqual.d.ts +1 -1
- package/dist/isPlainDateEqual.d.ts.map +1 -1
- package/dist/isPlainDateEqual.js +2 -1
- package/dist/isPlainTimeAfter.d.ts +1 -1
- package/dist/isPlainTimeAfter.d.ts.map +1 -1
- package/dist/isPlainTimeAfter.js +2 -1
- package/dist/isPlainTimeBefore.d.ts +1 -1
- package/dist/isPlainTimeBefore.d.ts.map +1 -1
- package/dist/isPlainTimeBefore.js +2 -1
- package/dist/isPlainTimeEqual.d.ts +1 -1
- package/dist/isPlainTimeEqual.d.ts.map +1 -1
- package/dist/isPlainTimeEqual.js +2 -1
- package/dist/isSameDay.d.ts +1 -1
- package/dist/isSameDay.d.ts.map +1 -1
- package/dist/isSameDay.js +3 -2
- package/dist/isSameHour.js +3 -2
- package/dist/isSameMicrosecond.js +3 -2
- package/dist/isSameMillisecond.js +3 -2
- package/dist/isSameMinute.js +3 -2
- package/dist/isSameMonth.js +3 -2
- package/dist/isSameNanosecond.js +3 -2
- package/dist/isSameSecond.js +3 -2
- package/dist/isSameWeek.js +3 -2
- package/dist/isSameYear.js +3 -2
- package/dist/isWithinInterval.d.ts +1 -1
- package/dist/isWithinInterval.d.ts.map +1 -1
- package/dist/isWithinInterval.js +5 -4
- package/dist/now.d.ts +1 -1
- package/dist/now.d.ts.map +1 -1
- package/dist/now.js +2 -1
- package/dist/roundToNearestHour.js +3 -2
- package/dist/roundToNearestMinute.js +3 -2
- package/dist/roundToNearestSecond.js +3 -2
- package/dist/shared/differenceInMilliseconds.d.ts +1 -1
- package/dist/shared/differenceInMilliseconds.d.ts.map +1 -1
- package/dist/shared/differenceInMilliseconds.js +2 -1
- package/dist/shared/differenceOptions.d.ts +16 -0
- package/dist/shared/differenceOptions.d.ts.map +1 -0
- package/dist/shared/differenceOptions.js +1 -0
- package/dist/shared/differenceOptions.js.map +1 -0
- package/dist/shared/isAfter.d.ts +1 -1
- package/dist/shared/isAfter.d.ts.map +1 -1
- package/dist/shared/isAfter.js +2 -1
- package/dist/shared/isBefore.d.ts +1 -1
- package/dist/shared/isBefore.d.ts.map +1 -1
- package/dist/shared/isBefore.js +2 -1
- package/dist/shared/normalizeTemporalInput.d.ts +1 -1
- package/dist/shared/normalizeTemporalInput.d.ts.map +1 -1
- package/dist/shared/normalizeTemporalInput.js +2 -1
- package/dist/shared/normalizeWithPlainDate.d.ts +1 -1
- package/dist/shared/normalizeWithPlainDate.d.ts.map +1 -1
- package/dist/shared/normalizeWithPlainDate.js +4 -3
- package/dist/shared/nowZoned.d.ts +1 -1
- package/dist/shared/nowZoned.d.ts.map +1 -1
- package/dist/shared/nowZoned.js +3 -2
- package/dist/shared/plainDateToZonedDateTime.d.ts +1 -1
- package/dist/shared/plainDateToZonedDateTime.d.ts.map +1 -1
- package/dist/shared/plainDateToZonedDateTime.js +2 -1
- package/dist/shared/temporal.d.ts +21 -0
- package/dist/shared/temporal.d.ts.map +1 -0
- package/dist/shared/temporal.js +13 -0
- package/dist/shared/temporal.js.map +1 -0
- package/dist/shared/temporal.test.d.ts +2 -0
- package/dist/shared/temporal.test.d.ts.map +1 -0
- package/dist/simpleFormat.d.ts +1 -1
- package/dist/simpleFormat.d.ts.map +1 -1
- package/dist/simpleFormat.js +2 -1
- package/dist/startOfDay.d.ts +1 -1
- package/dist/startOfDay.d.ts.map +1 -1
- package/dist/startOfDay.js +5 -4
- package/dist/startOfMonth.d.ts +1 -1
- package/dist/startOfMonth.d.ts.map +1 -1
- package/dist/startOfMonth.js +5 -4
- package/dist/startOfWeek.d.ts +1 -1
- package/dist/startOfWeek.d.ts.map +1 -1
- package/dist/startOfWeek.js +4 -3
- package/dist/startOfYear.d.ts +1 -1
- package/dist/startOfYear.d.ts.map +1 -1
- package/dist/startOfYear.js +5 -4
- package/dist/subDays.js +4 -3
- package/dist/subHours.js +4 -3
- package/dist/subMicroseconds.js +4 -3
- package/dist/subMilliseconds.js +4 -3
- package/dist/subMinutes.js +4 -3
- package/dist/subMonths.js +4 -3
- package/dist/subNanoseconds.js +4 -3
- package/dist/subSeconds.js +4 -3
- package/dist/subWeeks.js +4 -3
- package/dist/subYears.js +4 -3
- package/dist/toDate.d.ts +1 -1
- package/dist/toDate.d.ts.map +1 -1
- package/dist/toDate.js +2 -1
- package/dist/toIso.d.ts +1 -1
- package/dist/toIso.d.ts.map +1 -1
- package/dist/toIso.js +2 -1
- package/dist/toIso9075.d.ts +1 -1
- package/dist/toIso9075.d.ts.map +1 -1
- package/dist/toIso9075.js +2 -1
- package/dist/toPlainDate.d.ts +1 -1
- package/dist/toPlainDate.d.ts.map +1 -1
- package/dist/toPlainDate.js +2 -1
- package/dist/toPlainTime.d.ts +1 -1
- package/dist/toPlainTime.d.ts.map +1 -1
- package/dist/toPlainTime.js +2 -1
- package/dist/toUtc.d.ts +1 -1
- package/dist/toUtc.d.ts.map +1 -1
- package/dist/toUtc.js +2 -1
- package/dist/toZonedTime.d.ts +1 -1
- package/dist/toZonedTime.d.ts.map +1 -1
- package/dist/toZonedTime.js +2 -1
- package/dist/today.d.ts +1 -1
- package/dist/today.d.ts.map +1 -1
- package/dist/today.js +2 -1
- package/package.json +1 -1
- package/dist/chunk-3A6X6WV5.js.map +0 -1
- package/dist/chunk-3TSFIPUR.js.map +0 -1
- package/dist/chunk-4E7OGJ3F.js.map +0 -1
- package/dist/chunk-4PSMM55Q.js.map +0 -1
- package/dist/chunk-5C3TQSWA.js.map +0 -1
- package/dist/chunk-6IP245MS.js.map +0 -1
- package/dist/chunk-776JOVV6.js.map +0 -1
- package/dist/chunk-7VLSSOVC.js.map +0 -1
- package/dist/chunk-AE36GX4F.js.map +0 -1
- package/dist/chunk-AJ4JBKJK.js.map +0 -1
- package/dist/chunk-AJEIDKVJ.js.map +0 -1
- package/dist/chunk-B2R2G5YK.js +0 -19
- package/dist/chunk-B2R2G5YK.js.map +0 -1
- package/dist/chunk-BIAPE4MR.js.map +0 -1
- package/dist/chunk-BPZ7BRJW.js.map +0 -1
- package/dist/chunk-BSV32PSO.js.map +0 -1
- package/dist/chunk-BUX26GTD.js.map +0 -1
- package/dist/chunk-BV6CLVSI.js.map +0 -1
- package/dist/chunk-CHW2EN2O.js.map +0 -1
- package/dist/chunk-DFLGGK4F.js.map +0 -1
- package/dist/chunk-DKYVFYWM.js.map +0 -1
- package/dist/chunk-EZ7NVTZI.js.map +0 -1
- package/dist/chunk-FSD3DDFC.js.map +0 -1
- package/dist/chunk-G2JUEBC5.js.map +0 -1
- package/dist/chunk-HFQUXON5.js.map +0 -1
- package/dist/chunk-HLGMUTFK.js.map +0 -1
- package/dist/chunk-HOCNCQTC.js.map +0 -1
- package/dist/chunk-JNA3AFOC.js.map +0 -1
- package/dist/chunk-KGVUENQO.js +0 -17
- package/dist/chunk-KGVUENQO.js.map +0 -1
- package/dist/chunk-KZB6NERH.js.map +0 -1
- package/dist/chunk-MJSZNWCV.js +0 -10
- package/dist/chunk-MJSZNWCV.js.map +0 -1
- package/dist/chunk-O6RIN7K3.js.map +0 -1
- package/dist/chunk-OABS374T.js.map +0 -1
- package/dist/chunk-OLEOU3XE.js.map +0 -1
- package/dist/chunk-OQ4CWKJT.js.map +0 -1
- package/dist/chunk-PMJD5N5J.js +0 -19
- package/dist/chunk-PMJD5N5J.js.map +0 -1
- package/dist/chunk-PVAOUYXF.js.map +0 -1
- package/dist/chunk-QFNGYTTH.js.map +0 -1
- package/dist/chunk-QVOEXF46.js +0 -19
- package/dist/chunk-QVOEXF46.js.map +0 -1
- package/dist/chunk-RBEW6PXR.js.map +0 -1
- package/dist/chunk-RW3C2677.js.map +0 -1
- package/dist/chunk-TGKWBQ7L.js.map +0 -1
- package/dist/chunk-TNCLJK4Y.js.map +0 -1
- package/dist/chunk-UJWM2BV2.js.map +0 -1
- package/dist/chunk-VZJGCDAG.js.map +0 -1
- package/dist/chunk-WUAIUEH7.js.map +0 -1
- package/dist/chunk-WY63VEXE.js.map +0 -1
- package/dist/chunk-X26WIJ6L.js.map +0 -1
- package/dist/chunk-Y7CIJQ67.js.map +0 -1
- package/dist/chunk-YIT6EMBC.js.map +0 -1
- package/dist/chunk-YQBM63DC.js.map +0 -1
- package/dist/chunk-ZC6KWXCW.js.map +0 -1
- package/dist/chunk-ZDA7GSWU.js.map +0 -1
- package/dist/chunk-ZGR4NZTS.js.map +0 -1
- /package/dist/{chunk-JA7SVLAF.js.map → chunk-2KYXZIGP.js.map} +0 -0
- /package/dist/{chunk-VLZ3HQQA.js.map → chunk-2Q6WEULJ.js.map} +0 -0
- /package/dist/{chunk-JOD4ATPE.js.map → chunk-3HXEOAQN.js.map} +0 -0
- /package/dist/{chunk-WVHAYLBW.js.map → chunk-3ORGILYG.js.map} +0 -0
- /package/dist/{chunk-7ATM7AXL.js.map → chunk-3RSGMPWR.js.map} +0 -0
- /package/dist/{chunk-AHMKY474.js.map → chunk-3XNQYFWS.js.map} +0 -0
- /package/dist/{chunk-U4RNUZXO.js.map → chunk-4JPDLKBK.js.map} +0 -0
- /package/dist/{chunk-XW5MLXX5.js.map → chunk-4RLD3OE2.js.map} +0 -0
- /package/dist/{chunk-YKBP3G7L.js.map → chunk-5ZOOVGMT.js.map} +0 -0
- /package/dist/{chunk-UBY22QWM.js.map → chunk-63RSJ2W4.js.map} +0 -0
- /package/dist/{chunk-EEQ3REET.js.map → chunk-6KAIABBV.js.map} +0 -0
- /package/dist/{chunk-PPB62JYV.js.map → chunk-6SF6EC2I.js.map} +0 -0
- /package/dist/{chunk-4NJMCCUM.js.map → chunk-7JL3U64G.js.map} +0 -0
- /package/dist/{chunk-A5VVBYNT.js.map → chunk-ATEVQYB6.js.map} +0 -0
- /package/dist/{chunk-LDO6PRNJ.js.map → chunk-C7SIOWMA.js.map} +0 -0
- /package/dist/{chunk-ADQTZVMH.js.map → chunk-EKR6BYFM.js.map} +0 -0
- /package/dist/{chunk-BQBLSXK2.js.map → chunk-FLRHLAMD.js.map} +0 -0
- /package/dist/{chunk-NRD5HRZV.js.map → chunk-IOLV6PTH.js.map} +0 -0
- /package/dist/{chunk-MMI2HHT7.js.map → chunk-LTW2TDLL.js.map} +0 -0
- /package/dist/{chunk-JHRXY36W.js.map → chunk-MA7PR6V5.js.map} +0 -0
- /package/dist/{chunk-L4SVABDH.js.map → chunk-MEADD45E.js.map} +0 -0
- /package/dist/{chunk-2XHAHSB6.js.map → chunk-MXE44KVG.js.map} +0 -0
- /package/dist/{chunk-DT2EWLHU.js.map → chunk-NE7HNEF6.js.map} +0 -0
- /package/dist/{chunk-EYO2ZJLH.js.map → chunk-OPWK2TVF.js.map} +0 -0
- /package/dist/{chunk-HDBH7RTY.js.map → chunk-OX4I35UO.js.map} +0 -0
- /package/dist/{chunk-CY746ZUQ.js.map → chunk-RB2YCLBV.js.map} +0 -0
- /package/dist/{chunk-UJW2FPI4.js.map → chunk-RTNF2H34.js.map} +0 -0
- /package/dist/{chunk-S63QUP4W.js.map → chunk-SAFMGBXL.js.map} +0 -0
- /package/dist/{chunk-J6G2I2TU.js.map → chunk-TKV5JYQY.js.map} +0 -0
- /package/dist/{chunk-BH2YB4MV.js.map → chunk-VXG2IG2N.js.map} +0 -0
- /package/dist/{chunk-V27NUBXQ.js.map → chunk-WWLDINLH.js.map} +0 -0
- /package/dist/{chunk-Q2F3HEXB.js.map → chunk-YMS7JXBN.js.map} +0 -0
- /package/dist/{chunk-52NEOY34.js.map → chunk-YNV6WGXV.js.map} +0 -0
- /package/dist/{chunk-ISHZRFVN.js.map → chunk-ZITFEEZS.js.map} +0 -0
package/dist/addDays.js
CHANGED
package/dist/addHours.js
CHANGED
package/dist/addMicroseconds.js
CHANGED
package/dist/addMilliseconds.js
CHANGED
package/dist/addMinutes.js
CHANGED
package/dist/addMonths.js
CHANGED
package/dist/addNanoseconds.js
CHANGED
package/dist/addSeconds.js
CHANGED
package/dist/addWeeks.js
CHANGED
package/dist/addYears.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTemporalInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-65RGM7EG.js";
|
|
4
|
+
import {
|
|
5
|
+
Temporal
|
|
6
|
+
} from "./chunk-AI5MRREC.js";
|
|
4
7
|
|
|
5
8
|
// src/eachMonthOfInterval.ts
|
|
6
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
7
9
|
function eachMonthOfInterval(interval) {
|
|
8
10
|
const startZoned = normalizeTemporalInput(interval.start);
|
|
9
11
|
const endZoned = normalizeTemporalInput(interval.end);
|
|
@@ -35,4 +37,4 @@ function eachMonthOfInterval(interval) {
|
|
|
35
37
|
export {
|
|
36
38
|
eachMonthOfInterval
|
|
37
39
|
};
|
|
38
|
-
//# sourceMappingURL=chunk-
|
|
40
|
+
//# sourceMappingURL=chunk-26VAIV6A.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/eachMonthOfInterval.ts"],"sourcesContent":["import { Temporal } from './shared/temporal';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\n\n/**\n * Returns an array of ZonedDateTime objects for each month within the interval.\n * Each element represents the first moment of the month (day 1 at midnight).\n * The interval is inclusive of both start and end months.\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 month in the interval\n *\n * @example\n * ```ts\n * const start = Temporal.ZonedDateTime.from('2025-01-15T10:00:00Z[UTC]');\n * const end = Temporal.ZonedDateTime.from('2025-04-20T14:00:00Z[UTC]');\n *\n * const months = eachMonthOfInterval({ start, end });\n * // [\n * // 2025-01-01T00:00:00Z[UTC],\n * // 2025-02-01T00:00:00Z[UTC],\n * // 2025-03-01T00:00:00Z[UTC],\n * // 2025-04-01T00:00:00Z[UTC]\n * // ]\n * ```\n *\n * @example\n * ```ts\n * // Cross-year boundary\n * const start = Temporal.ZonedDateTime.from('2024-11-15T00:00:00Z[UTC]');\n * const end = Temporal.ZonedDateTime.from('2025-02-15T00:00:00Z[UTC]');\n *\n * const months = eachMonthOfInterval({ start, end });\n * // [\n * // 2024-11-01T00:00:00Z[UTC],\n * // 2024-12-01T00:00:00Z[UTC],\n * // 2025-01-01T00:00:00Z[UTC],\n * // 2025-02-01T00:00:00Z[UTC]\n * // ]\n * ```\n */\nexport function eachMonthOfInterval(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 start of the starting month\n const startYearMonth = Temporal.PlainYearMonth.from({\n year: startZoned.year,\n month: startZoned.month,\n });\n\n // Get end month in the same timezone\n const endInTimezone = endZoned.withTimeZone(timezone);\n const endYearMonth = Temporal.PlainYearMonth.from({\n year: endInTimezone.year,\n month: endInTimezone.month,\n });\n\n const months: Temporal.ZonedDateTime[] = [];\n let current = startYearMonth;\n\n while (Temporal.PlainYearMonth.compare(current, endYearMonth) <= 0) {\n const firstOfMonth = current.toPlainDate({ day: 1 });\n months.push(\n firstOfMonth.toZonedDateTime({\n timeZone: timezone,\n plainTime: new Temporal.PlainTime(),\n })\n );\n current = current.add({ months: 1 });\n }\n\n return months;\n}\n"],"mappings":";;;;;;;;AA2CO,SAAS,oBAAoB,UAGP;AAC3B,QAAM,aAAa,uBAAuB,SAAS,KAAK;AACxD,QAAM,WAAW,uBAAuB,SAAS,GAAG;AAEpD,QAAM,WAAW,WAAW;AAG5B,QAAM,iBAAiB,SAAS,eAAe,KAAK;AAAA,IAClD,MAAM,WAAW;AAAA,IACjB,OAAO,WAAW;AAAA,EACpB,CAAC;AAGD,QAAM,gBAAgB,SAAS,aAAa,QAAQ;AACpD,QAAM,eAAe,SAAS,eAAe,KAAK;AAAA,IAChD,MAAM,cAAc;AAAA,IACpB,OAAO,cAAc;AAAA,EACvB,CAAC;AAED,QAAM,SAAmC,CAAC;AAC1C,MAAI,UAAU;AAEd,SAAO,SAAS,eAAe,QAAQ,SAAS,YAAY,KAAK,GAAG;AAClE,UAAM,eAAe,QAAQ,YAAY,EAAE,KAAK,EAAE,CAAC;AACnD,WAAO;AAAA,MACL,aAAa,gBAAgB;AAAA,QAC3B,UAAU;AAAA,QACV,WAAW,IAAI,SAAS,UAAU;AAAA,MACpC,CAAC;AAAA,IACH;AACA,cAAU,QAAQ,IAAI,EAAE,QAAQ,EAAE,CAAC;AAAA,EACrC;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isAfter
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JM42PLWS.js";
|
|
4
4
|
import {
|
|
5
5
|
nowZoned
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RXTMPPOP.js";
|
|
7
7
|
import {
|
|
8
8
|
normalizeTemporalInput
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-65RGM7EG.js";
|
|
10
10
|
|
|
11
11
|
// src/isFuture.ts
|
|
12
12
|
function isFuture(date) {
|
|
@@ -17,4 +17,4 @@ function isFuture(date) {
|
|
|
17
17
|
export {
|
|
18
18
|
isFuture
|
|
19
19
|
};
|
|
20
|
-
//# sourceMappingURL=chunk-
|
|
20
|
+
//# sourceMappingURL=chunk-2KYXZIGP.js.map
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Temporal
|
|
3
|
+
} from "./chunk-AI5MRREC.js";
|
|
4
|
+
|
|
1
5
|
// src/toUtc.ts
|
|
2
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
3
6
|
function toUtc(input) {
|
|
4
7
|
if (typeof input === "string") {
|
|
5
8
|
return Temporal.Instant.from(input);
|
|
@@ -16,4 +19,4 @@ function toUtc(input) {
|
|
|
16
19
|
export {
|
|
17
20
|
toUtc
|
|
18
21
|
};
|
|
19
|
-
//# sourceMappingURL=chunk-
|
|
22
|
+
//# sourceMappingURL=chunk-2PDEHGNB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/toUtc.ts"],"sourcesContent":["import { Temporal } from './shared/temporal';\n\n/**\n * Convert a UTC ISO string, Unix timestamp, Date, or ZonedDateTime to a Temporal.Instant (UTC).\n *\n * @param input - A UTC ISO 8601 string, Unix timestamp (milliseconds), Date object, or Temporal.ZonedDateTime\n * @returns A Temporal.Instant representing the same moment in UTC\n *\n * @example\n * ```typescript\n * // From ISO string\n * const instant = toUtc(\"2025-01-20T20:00:00.000Z\");\n *\n * // From Unix timestamp (milliseconds since epoch)\n * const instant2 = toUtc(1737403200000);\n *\n * // From Date (e.g., from Drizzle ORM)\n * const date = new Date(\"2025-01-20T20:00:00.000Z\");\n * const instant3 = toUtc(date);\n *\n * // From ZonedDateTime\n * const zoned = Temporal.ZonedDateTime.from(\"2025-01-20T15:00:00-05:00[America/New_York]\");\n * const instant4 = toUtc(zoned);\n * // All represent the same UTC moment: 2025-01-20T20:00:00Z\n * ```\n */\nexport function toUtc(\n input: string | number | Date | Temporal.ZonedDateTime\n): Temporal.Instant {\n if (typeof input === 'string') {\n return Temporal.Instant.from(input);\n }\n\n if (typeof input === 'number') {\n return Temporal.Instant.fromEpochMilliseconds(input);\n }\n\n if (input instanceof Date) {\n return Temporal.Instant.from(input.toISOString());\n }\n\n return input.toInstant();\n}\n"],"mappings":";;;;;AA0BO,SAAS,MACd,OACkB;AAClB,MAAI,OAAO,UAAU,UAAU;AAC7B,WAAO,SAAS,QAAQ,KAAK,KAAK;AAAA,EACpC;AAEA,MAAI,OAAO,UAAU,UAAU;AAC7B,WAAO,SAAS,QAAQ,sBAAsB,KAAK;AAAA,EACrD;AAEA,MAAI,iBAAiB,MAAM;AACzB,WAAO,SAAS,QAAQ,KAAK,MAAM,YAAY,CAAC;AAAA,EAClD;AAEA,SAAO,MAAM,UAAU;AACzB;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTemporalInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-65RGM7EG.js";
|
|
4
4
|
|
|
5
5
|
// src/isSameYear.ts
|
|
6
6
|
function isSameYear(date1, date2) {
|
|
@@ -12,4 +12,4 @@ function isSameYear(date1, date2) {
|
|
|
12
12
|
export {
|
|
13
13
|
isSameYear
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=chunk-
|
|
15
|
+
//# sourceMappingURL=chunk-2Q6WEULJ.js.map
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTemporalInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-65RGM7EG.js";
|
|
4
4
|
|
|
5
5
|
// src/differenceInMicroseconds.ts
|
|
6
|
-
import "@js-temporal/polyfill";
|
|
7
6
|
function differenceInMicroseconds(laterDate, earlierDate) {
|
|
8
7
|
const zoned1 = normalizeTemporalInput(laterDate);
|
|
9
8
|
const zoned2 = normalizeTemporalInput(earlierDate);
|
|
@@ -14,4 +13,4 @@ function differenceInMicroseconds(laterDate, earlierDate) {
|
|
|
14
13
|
export {
|
|
15
14
|
differenceInMicroseconds
|
|
16
15
|
};
|
|
17
|
-
//# sourceMappingURL=chunk-
|
|
16
|
+
//# sourceMappingURL=chunk-347TWPBS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/differenceInMicroseconds.ts"],"sourcesContent":["import { Temporal } from './shared/temporal';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\n\n/**\n * Returns the number of microseconds 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 microseconds between the dates\n *\n * @example\n * ```ts\n * const later = Temporal.Instant.from('2025-01-20T12:30:20.001000Z');\n * const earlier = Temporal.Instant.from('2025-01-20T12:30:20.000000Z');\n *\n * differenceInMicroseconds(later, earlier); // 1000\n * ```\n *\n * @example\n * ```ts\n * // Works with ZonedDateTime\n * const later = Temporal.ZonedDateTime.from('2025-01-20T15:00:00.000500-05:00[America/New_York]');\n * const earlier = Temporal.ZonedDateTime.from('2025-01-20T15:00:00.000000-05:00[America/New_York]');\n *\n * differenceInMicroseconds(later, earlier); // 500\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 * differenceInMicroseconds(tokyo, ny); // 0 (same instant)\n * ```\n */\nexport function differenceInMicroseconds(\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 const diffNanos = zoned1.epochNanoseconds - zoned2.epochNanoseconds;\n return Number(diffNanos / 1000n);\n}\n"],"mappings":";;;;;AAqCO,SAAS,yBACd,WACA,aACQ;AACR,QAAM,SAAS,uBAAuB,SAAS;AAC/C,QAAM,SAAS,uBAAuB,WAAW;AAEjD,QAAM,YAAY,OAAO,mBAAmB,OAAO;AACnD,SAAO,OAAO,YAAY,KAAK;AACjC;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTemporalInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-65RGM7EG.js";
|
|
4
4
|
|
|
5
5
|
// src/isSameWeek.ts
|
|
6
6
|
function isSameWeek(date1, date2) {
|
|
@@ -12,4 +12,4 @@ function isSameWeek(date1, date2) {
|
|
|
12
12
|
export {
|
|
13
13
|
isSameWeek
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=chunk-
|
|
15
|
+
//# sourceMappingURL=chunk-3HXEOAQN.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addNanoseconds
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OPWK2TVF.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-
|
|
13
|
+
//# sourceMappingURL=chunk-3ORGILYG.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTemporalInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-65RGM7EG.js";
|
|
4
4
|
|
|
5
5
|
// src/addMonths.ts
|
|
6
6
|
function addMonths(input, months) {
|
|
@@ -11,4 +11,4 @@ function addMonths(input, months) {
|
|
|
11
11
|
export {
|
|
12
12
|
addMonths
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=chunk-
|
|
14
|
+
//# sourceMappingURL=chunk-3RSGMPWR.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addYears
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YMS7JXBN.js";
|
|
4
4
|
|
|
5
5
|
// src/subYears.ts
|
|
6
6
|
function subYears(input, years) {
|
|
@@ -10,4 +10,4 @@ function subYears(input, years) {
|
|
|
10
10
|
export {
|
|
11
11
|
subYears
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-3XNQYFWS.js.map
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isAfter
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JM42PLWS.js";
|
|
4
4
|
import {
|
|
5
5
|
isBefore
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EZJDWFFE.js";
|
|
7
7
|
import {
|
|
8
8
|
normalizeTemporalInput
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-65RGM7EG.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-
|
|
22
|
+
//# sourceMappingURL=chunk-4BQ4BJ4Y.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,5 +1,8 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Temporal
|
|
3
|
+
} from "./chunk-AI5MRREC.js";
|
|
4
|
+
|
|
1
5
|
// src/isPlainDateBefore.ts
|
|
2
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
3
6
|
function isPlainDateBefore(date1, date2) {
|
|
4
7
|
return Temporal.PlainDate.compare(date1, date2) < 0;
|
|
5
8
|
}
|
|
@@ -7,4 +10,4 @@ function isPlainDateBefore(date1, date2) {
|
|
|
7
10
|
export {
|
|
8
11
|
isPlainDateBefore
|
|
9
12
|
};
|
|
10
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-4EFKJDHV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/isPlainDateBefore.ts"],"sourcesContent":["import { Temporal } from './shared/temporal';\n\n/**\n * Returns true if the first plain date is before the second plain date.\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 is before date2, false otherwise\n *\n * @example\n * ```ts\n * const jan20 = Temporal.PlainDate.from('2025-01-20');\n * const jan25 = Temporal.PlainDate.from('2025-01-25');\n *\n * isPlainDateBefore(jan20, jan25); // true\n * isPlainDateBefore(jan25, jan20); // false\n * isPlainDateBefore(jan20, jan20); // false\n * ```\n */\nexport function isPlainDateBefore(\n date1: Temporal.PlainDate,\n date2: Temporal.PlainDate\n): boolean {\n return Temporal.PlainDate.compare(date1, date2) < 0;\n}\n"],"mappings":";;;;;AAoBO,SAAS,kBACd,OACA,OACS;AACT,SAAO,SAAS,UAAU,QAAQ,OAAO,KAAK,IAAI;AACpD;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addWeeks
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NE7HNEF6.js";
|
|
4
4
|
|
|
5
5
|
// src/subWeeks.ts
|
|
6
6
|
function subWeeks(input, weeks) {
|
|
@@ -10,4 +10,4 @@ function subWeeks(input, weeks) {
|
|
|
10
10
|
export {
|
|
11
11
|
subWeeks
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-4JPDLKBK.js.map
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTemporalInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-65RGM7EG.js";
|
|
4
|
+
import {
|
|
5
|
+
Temporal
|
|
6
|
+
} from "./chunk-AI5MRREC.js";
|
|
4
7
|
|
|
5
8
|
// src/eachHourOfInterval.ts
|
|
6
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
7
9
|
function eachHourOfInterval(interval) {
|
|
8
10
|
const startZoned = normalizeTemporalInput(interval.start);
|
|
9
11
|
const endZoned = normalizeTemporalInput(interval.end);
|
|
@@ -23,4 +25,4 @@ function eachHourOfInterval(interval) {
|
|
|
23
25
|
export {
|
|
24
26
|
eachHourOfInterval
|
|
25
27
|
};
|
|
26
|
-
//# sourceMappingURL=chunk-
|
|
28
|
+
//# sourceMappingURL=chunk-4JPVE6OV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/eachHourOfInterval.ts"],"sourcesContent":["import { Temporal } from './shared/temporal';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\n\n/**\n * Returns an array of ZonedDateTime objects for each hour within the interval.\n * Each element represents the start of the hour (minute/second/etc. set to 0).\n * The interval is inclusive of both start and end hours.\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 * Note: During DST transitions, some hours may be skipped (spring forward) or\n * the array may contain fewer/more hours than expected based on wall-clock time.\n *\n * @param interval - The interval with start and end datetimes\n * @returns Array of ZonedDateTime at start of each hour in the interval\n *\n * @example\n * ```ts\n * const start = Temporal.ZonedDateTime.from('2025-01-06T10:30:00Z[UTC]');\n * const end = Temporal.ZonedDateTime.from('2025-01-06T14:15:00Z[UTC]');\n *\n * const hours = eachHourOfInterval({ start, end });\n * // [\n * // 2025-01-06T10:00:00Z[UTC],\n * // 2025-01-06T11:00:00Z[UTC],\n * // 2025-01-06T12:00:00Z[UTC],\n * // 2025-01-06T13:00:00Z[UTC],\n * // 2025-01-06T14:00:00Z[UTC]\n * // ]\n * ```\n *\n * @example\n * ```ts\n * // Cross-day boundary\n * const start = Temporal.ZonedDateTime.from('2025-01-06T22:00:00Z[UTC]');\n * const end = Temporal.ZonedDateTime.from('2025-01-07T02:00:00Z[UTC]');\n *\n * const hours = eachHourOfInterval({ start, end });\n * // [\n * // 2025-01-06T22:00:00Z[UTC],\n * // 2025-01-06T23:00:00Z[UTC],\n * // 2025-01-07T00:00:00Z[UTC],\n * // 2025-01-07T01:00:00Z[UTC],\n * // 2025-01-07T02:00:00Z[UTC]\n * // ]\n * ```\n */\nexport function eachHourOfInterval(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 start of the starting hour\n const startHour = startZoned.round({ smallestUnit: 'hour', roundingMode: 'floor' });\n\n // Get start of the ending hour in the same timezone\n const endInTimezone = endZoned.withTimeZone(timezone);\n const endHour = endInTimezone.round({ smallestUnit: 'hour', roundingMode: 'floor' });\n\n const hours: Temporal.ZonedDateTime[] = [];\n let current = startHour;\n\n while (Temporal.ZonedDateTime.compare(current, endHour) <= 0) {\n hours.push(current);\n current = current.add({ hours: 1 });\n }\n\n return hours;\n}\n"],"mappings":";;;;;;;;AAgDO,SAAS,mBAAmB,UAGN;AAC3B,QAAM,aAAa,uBAAuB,SAAS,KAAK;AACxD,QAAM,WAAW,uBAAuB,SAAS,GAAG;AAEpD,QAAM,WAAW,WAAW;AAG5B,QAAM,YAAY,WAAW,MAAM,EAAE,cAAc,QAAQ,cAAc,QAAQ,CAAC;AAGlF,QAAM,gBAAgB,SAAS,aAAa,QAAQ;AACpD,QAAM,UAAU,cAAc,MAAM,EAAE,cAAc,QAAQ,cAAc,QAAQ,CAAC;AAEnF,QAAM,QAAkC,CAAC;AACzC,MAAI,UAAU;AAEd,SAAO,SAAS,cAAc,QAAQ,SAAS,OAAO,KAAK,GAAG;AAC5D,UAAM,KAAK,OAAO;AAClB,cAAU,QAAQ,IAAI,EAAE,OAAO,EAAE,CAAC;AAAA,EACpC;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTemporalInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-65RGM7EG.js";
|
|
4
|
+
import {
|
|
5
|
+
Temporal
|
|
6
|
+
} from "./chunk-AI5MRREC.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-
|
|
30
|
+
//# sourceMappingURL=chunk-4N6CTX4N.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,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addHours
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7JL3U64G.js";
|
|
4
4
|
|
|
5
5
|
// src/subHours.ts
|
|
6
6
|
function subHours(input, hours) {
|
|
@@ -10,4 +10,4 @@ function subHours(input, hours) {
|
|
|
10
10
|
export {
|
|
11
11
|
subHours
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-4RLD3OE2.js.map
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Temporal,
|
|
3
|
+
isInstant,
|
|
4
|
+
isZonedDateTime
|
|
5
|
+
} from "./chunk-AI5MRREC.js";
|
|
6
|
+
|
|
1
7
|
// src/simpleFormat.ts
|
|
2
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
3
8
|
function simpleFormat(input, options) {
|
|
4
9
|
const { locale = "en-US", timeZone } = options;
|
|
5
10
|
const dateFormat = "date" in options ? options.date : void 0;
|
|
6
11
|
const timeFormat = "time" in options ? options.time : void 0;
|
|
7
12
|
let zdt;
|
|
8
|
-
if (input
|
|
13
|
+
if (isInstant(input)) {
|
|
9
14
|
const tz = timeZone ?? "UTC";
|
|
10
15
|
zdt = input.toZonedDateTimeISO(tz);
|
|
11
|
-
} else if (input
|
|
16
|
+
} else if (isZonedDateTime(input)) {
|
|
12
17
|
if (timeZone) {
|
|
13
18
|
zdt = input.toInstant().toZonedDateTimeISO(timeZone);
|
|
14
19
|
} else {
|
|
@@ -54,4 +59,4 @@ function formatCompactTime(zdt) {
|
|
|
54
59
|
export {
|
|
55
60
|
simpleFormat
|
|
56
61
|
};
|
|
57
|
-
//# sourceMappingURL=chunk-
|
|
62
|
+
//# sourceMappingURL=chunk-5DQVEAAR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/simpleFormat.ts"],"sourcesContent":["import { Temporal, isInstant, isZonedDateTime } from './shared/temporal';\nimport type { Timezone } from './types';\n\ninterface BaseOptions {\n locale?: string;\n timeZone?: Timezone;\n}\n\ninterface DateOnlyOptions extends BaseOptions {\n date: 'compact' | 'auto' | 'full';\n time?: never;\n}\n\ninterface TimeOnlyOptions extends BaseOptions {\n date?: never;\n time: '12h' | '24h' | 'compact';\n}\n\ninterface DateAndTimeOptions extends BaseOptions {\n date: 'compact' | 'auto' | 'full';\n time: '12h' | '24h' | 'compact';\n}\n\nexport type SimpleFormatOptions = DateOnlyOptions | TimeOnlyOptions | DateAndTimeOptions;\n\n/**\n * Format a Temporal date/time in a human-friendly way.\n *\n * Pass `date`, `time`, or both to control what's displayed.\n * At least one of `date` or `time` is required.\n *\n * @param input - A Temporal.Instant, ZonedDateTime, or PlainDate\n * @param options - Format options (at least `date` or `time` required)\n *\n * Date formats:\n * - `'compact'` - \"Dec 23\" (never shows year)\n * - `'auto'` - \"Dec 23\" or \"Dec 23, 2020\" (shows year only if not current year)\n * - `'full'` - \"Dec 23, 2026\" (always shows year)\n *\n * Time formats:\n * - `'12h'` - \"3:30 PM\"\n * - `'24h'` - \"15:30\"\n * - `'compact'` - \"9am\" or \"2:30pm\" (omits minutes when zero, lowercase am/pm)\n *\n * @example\n * ```typescript\n * const zdt = Temporal.ZonedDateTime.from(\"2026-12-23T09:00:00[America/New_York]\");\n * const pastZdt = Temporal.ZonedDateTime.from(\"2020-12-23T14:30:00[America/New_York]\");\n *\n * // Date only\n * simpleFormat(zdt, { date: 'compact' }); // \"Dec 23\"\n * simpleFormat(zdt, { date: 'auto' }); // \"Dec 23\"\n * simpleFormat(pastZdt, { date: 'auto' }); // \"Dec 23, 2020\"\n * simpleFormat(zdt, { date: 'full' }); // \"Dec 23, 2026\"\n *\n * // Time only\n * simpleFormat(zdt, { time: 'compact' }); // \"9am\"\n * simpleFormat(pastZdt, { time: 'compact' }); // \"2:30pm\"\n * simpleFormat(zdt, { time: '12h' }); // \"9:00 AM\"\n * simpleFormat(zdt, { time: '24h' }); // \"09:00\"\n *\n * // Date and time\n * simpleFormat(zdt, { date: 'auto', time: 'compact' }); // \"Dec 23, 9am\"\n * simpleFormat(zdt, { date: 'full', time: '12h' }); // \"Dec 23, 2026, 9:00 AM\"\n *\n * // With Instant (timeZone required)\n * const instant = Temporal.Instant.from(\"2026-12-23T14:00:00Z\");\n * simpleFormat(instant, { date: 'auto', timeZone: 'America/New_York' }); // \"Dec 23\"\n * ```\n */\nexport function simpleFormat(\n input: Temporal.PlainDate | Temporal.ZonedDateTime | Temporal.Instant,\n options: SimpleFormatOptions\n): string {\n const { locale = 'en-US', timeZone } = options;\n const dateFormat = 'date' in options ? options.date : undefined;\n const timeFormat = 'time' in options ? options.time : undefined;\n\n // Convert input to ZonedDateTime for consistent handling\n let zdt: Temporal.ZonedDateTime;\n\n if (isInstant(input)) {\n const tz = timeZone ?? 'UTC';\n zdt = input.toZonedDateTimeISO(tz);\n } else if (isZonedDateTime(input)) {\n if (timeZone) {\n zdt = input.toInstant().toZonedDateTimeISO(timeZone);\n } else {\n zdt = input;\n }\n } else {\n // PlainDate - convert to ZonedDateTime at midnight UTC for formatting\n zdt = input.toZonedDateTime({ timeZone: timeZone ?? 'UTC', plainTime: new Temporal.PlainTime() });\n }\n\n const parts: string[] = [];\n\n // Format date part\n if (dateFormat) {\n const currentYear = Temporal.Now.plainDateISO().year;\n const showYear =\n dateFormat === 'full' ? true : dateFormat === 'compact' ? false : zdt.year !== currentYear;\n\n const dateOptions: Intl.DateTimeFormatOptions = {\n day: 'numeric',\n month: 'short',\n year: showYear ? 'numeric' : undefined,\n };\n\n parts.push(zdt.toLocaleString(locale, dateOptions));\n }\n\n // Format time part\n if (timeFormat) {\n if (timeFormat === 'compact') {\n parts.push(formatCompactTime(zdt));\n } else {\n const timeOptions: Intl.DateTimeFormatOptions = {\n hour: 'numeric',\n minute: '2-digit',\n hour12: timeFormat === '12h',\n };\n parts.push(zdt.toLocaleString(locale, timeOptions));\n }\n }\n\n return parts.join(', ');\n}\n\n/**\n * Format time in compact style: \"9am\" or \"2:30pm\"\n * Omits minutes when they're zero for cleaner display.\n */\nfunction formatCompactTime(zdt: Temporal.ZonedDateTime): string {\n const hour12 = zdt.hour % 12 || 12;\n const ampm = zdt.hour < 12 ? 'am' : 'pm';\n\n if (zdt.minute === 0) {\n return `${hour12}${ampm}`;\n }\n return `${hour12}:${zdt.minute.toString().padStart(2, '0')}${ampm}`;\n}\n"],"mappings":";;;;;;;AAsEO,SAAS,aACd,OACA,SACQ;AACR,QAAM,EAAE,SAAS,SAAS,SAAS,IAAI;AACvC,QAAM,aAAa,UAAU,UAAU,QAAQ,OAAO;AACtD,QAAM,aAAa,UAAU,UAAU,QAAQ,OAAO;AAGtD,MAAI;AAEJ,MAAI,UAAU,KAAK,GAAG;AACpB,UAAM,KAAK,YAAY;AACvB,UAAM,MAAM,mBAAmB,EAAE;AAAA,EACnC,WAAW,gBAAgB,KAAK,GAAG;AACjC,QAAI,UAAU;AACZ,YAAM,MAAM,UAAU,EAAE,mBAAmB,QAAQ;AAAA,IACrD,OAAO;AACL,YAAM;AAAA,IACR;AAAA,EACF,OAAO;AAEL,UAAM,MAAM,gBAAgB,EAAE,UAAU,YAAY,OAAO,WAAW,IAAI,SAAS,UAAU,EAAE,CAAC;AAAA,EAClG;AAEA,QAAM,QAAkB,CAAC;AAGzB,MAAI,YAAY;AACd,UAAM,cAAc,SAAS,IAAI,aAAa,EAAE;AAChD,UAAM,WACJ,eAAe,SAAS,OAAO,eAAe,YAAY,QAAQ,IAAI,SAAS;AAEjF,UAAM,cAA0C;AAAA,MAC9C,KAAK;AAAA,MACL,OAAO;AAAA,MACP,MAAM,WAAW,YAAY;AAAA,IAC/B;AAEA,UAAM,KAAK,IAAI,eAAe,QAAQ,WAAW,CAAC;AAAA,EACpD;AAGA,MAAI,YAAY;AACd,QAAI,eAAe,WAAW;AAC5B,YAAM,KAAK,kBAAkB,GAAG,CAAC;AAAA,IACnC,OAAO;AACL,YAAM,cAA0C;AAAA,QAC9C,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,QAAQ,eAAe;AAAA,MACzB;AACA,YAAM,KAAK,IAAI,eAAe,QAAQ,WAAW,CAAC;AAAA,IACpD;AAAA,EACF;AAEA,SAAO,MAAM,KAAK,IAAI;AACxB;AAMA,SAAS,kBAAkB,KAAqC;AAC9D,QAAM,SAAS,IAAI,OAAO,MAAM;AAChC,QAAM,OAAO,IAAI,OAAO,KAAK,OAAO;AAEpC,MAAI,IAAI,WAAW,GAAG;AACpB,WAAO,GAAG,MAAM,GAAG,IAAI;AAAA,EACzB;AACA,SAAO,GAAG,MAAM,IAAI,IAAI,OAAO,SAAS,EAAE,SAAS,GAAG,GAAG,CAAC,GAAG,IAAI;AACnE;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addDays
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MEADD45E.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-
|
|
13
|
+
//# sourceMappingURL=chunk-5ZOOVGMT.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isBefore
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EZJDWFFE.js";
|
|
4
4
|
import {
|
|
5
5
|
nowZoned
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RXTMPPOP.js";
|
|
7
7
|
import {
|
|
8
8
|
normalizeTemporalInput
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-65RGM7EG.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-
|
|
20
|
+
//# sourceMappingURL=chunk-63RSJ2W4.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isInstant
|
|
3
|
+
} from "./chunk-AI5MRREC.js";
|
|
4
|
+
|
|
5
|
+
// src/shared/normalizeTemporalInput.ts
|
|
6
|
+
function normalizeTemporalInput(input) {
|
|
7
|
+
return isInstant(input) ? input.toZonedDateTimeISO("UTC") : input;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export {
|
|
11
|
+
normalizeTemporalInput
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=chunk-65RGM7EG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/shared/normalizeTemporalInput.ts"],"sourcesContent":["import { isInstant } from './temporal';\nimport type { Temporal } from '@js-temporal/polyfill';\n\n/**\n * @internal\n * Normalizes input to ZonedDateTime. Converts Instant to UTC, or returns existing ZonedDateTime.\n * This is an internal helper - do not use directly.\n */\nexport function normalizeTemporalInput(\n input: Temporal.Instant | Temporal.ZonedDateTime\n): Temporal.ZonedDateTime {\n return isInstant(input)\n ? input.toZonedDateTimeISO('UTC')\n : input;\n}\n"],"mappings":";;;;;AAQO,SAAS,uBACd,OACwB;AACxB,SAAO,UAAU,KAAK,IAClB,MAAM,mBAAmB,KAAK,IAC9B;AACN;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTemporalInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-65RGM7EG.js";
|
|
4
4
|
|
|
5
5
|
// src/isSameHour.ts
|
|
6
6
|
function isSameHour(date1, date2) {
|
|
@@ -12,4 +12,4 @@ function isSameHour(date1, date2) {
|
|
|
12
12
|
export {
|
|
13
13
|
isSameHour
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=chunk-
|
|
15
|
+
//# sourceMappingURL=chunk-6KAIABBV.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTemporalInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-65RGM7EG.js";
|
|
4
4
|
|
|
5
5
|
// src/isSameMicrosecond.ts
|
|
6
6
|
function isSameMicrosecond(date1, date2) {
|
|
@@ -12,4 +12,4 @@ function isSameMicrosecond(date1, date2) {
|
|
|
12
12
|
export {
|
|
13
13
|
isSameMicrosecond
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=chunk-
|
|
15
|
+
//# sourceMappingURL=chunk-6SF6EC2I.js.map
|