@gobrand/tiempo 2.9.1 → 3.0.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.
- package/dist/addDays.js +3 -3
- package/dist/addHours.js +3 -3
- package/dist/addMicroseconds.js +3 -3
- package/dist/addMilliseconds.js +3 -3
- package/dist/addMinutes.js +3 -3
- package/dist/addMonths.js +3 -3
- package/dist/addNanoseconds.js +3 -3
- package/dist/addQuarters.d.ts +29 -0
- package/dist/addQuarters.d.ts.map +1 -0
- package/dist/addQuarters.js +9 -0
- package/dist/addSeconds.js +3 -3
- package/dist/addWeeks.js +3 -3
- package/dist/addYears.js +3 -3
- package/dist/browserTimezone.d.ts +1 -1
- package/dist/chunk-25CVKMFC.js +21 -0
- package/dist/chunk-25CVKMFC.js.map +1 -0
- package/dist/{chunk-J52B4PX6.js → chunk-2E4KCD3Y.js} +2 -2
- package/dist/{chunk-YNV6WGXV.js → chunk-2EFJSF2R.js} +2 -2
- package/dist/{chunk-SAFMGBXL.js → chunk-3LTTYG6N.js} +2 -2
- package/dist/{chunk-I6S6EIZG.js → chunk-3TS3D7WD.js} +7 -4
- package/dist/chunk-3TS3D7WD.js.map +1 -0
- package/dist/{chunk-MXE44KVG.js → chunk-4PGGOVSG.js} +2 -2
- package/dist/{chunk-JTANYFEV.js → chunk-567DXBLA.js} +3 -3
- package/dist/chunk-5Y5JH32Z.js +16 -0
- package/dist/chunk-5Y5JH32Z.js.map +1 -0
- package/dist/{chunk-RXTMPPOP.js → chunk-6RETOV6A.js} +3 -3
- package/dist/{chunk-LTW2TDLL.js → chunk-6UMISP3B.js} +2 -2
- package/dist/{chunk-YMS7JXBN.js → chunk-6YU6BQOZ.js} +2 -2
- package/dist/{chunk-UAYBKORB.js → chunk-7K5BJ6F7.js} +3 -3
- package/dist/{chunk-C4UZJHM7.js → chunk-7OEGJCW7.js} +9 -2
- package/dist/chunk-7OEGJCW7.js.map +1 -0
- package/dist/chunk-7SCQV77A.js +27 -0
- package/dist/chunk-7SCQV77A.js.map +1 -0
- package/dist/{chunk-63RSJ2W4.js → chunk-A42NID5P.js} +4 -4
- package/dist/{chunk-IV47GMAA.js → chunk-BEGD73DT.js} +3 -3
- package/dist/{chunk-3ORGILYG.js → chunk-BTXU3OGV.js} +2 -2
- package/dist/{chunk-RQUVNJBG.js → chunk-BV32K227.js} +8 -2
- package/dist/chunk-BV32K227.js.map +1 -0
- package/dist/{chunk-2KYXZIGP.js → chunk-CCVPCHUO.js} +4 -4
- package/dist/{chunk-OVFO6CZ7.js → chunk-CIA46DWB.js} +2 -2
- package/dist/{chunk-RB2YCLBV.js → chunk-CSOSM46M.js} +2 -2
- package/dist/{chunk-347TWPBS.js → chunk-DBVGH55Z.js} +2 -2
- package/dist/{chunk-X3T7QMBA.js → chunk-DCCHY45G.js} +2 -2
- package/dist/{chunk-VDEZJB42.js → chunk-DCFRBZBY.js} +3 -3
- package/dist/{chunk-7JL3U64G.js → chunk-DHFBKOFZ.js} +2 -2
- package/dist/{chunk-7EVZGEAI.js → chunk-DMFV2AL7.js} +11 -11
- package/dist/{chunk-TUOGC2TY.js → chunk-EBVLBLR3.js} +2 -2
- package/dist/{chunk-BQHSXMGZ.js → chunk-ELUSLRWQ.js} +2 -2
- package/dist/{chunk-XVAVCEKT.js → chunk-EMZFQEWM.js} +2 -2
- package/dist/{chunk-DC5JXNIC.js → chunk-EU3SYJHM.js} +2 -2
- package/dist/{chunk-EZJDWFFE.js → chunk-EVEMK2K2.js} +2 -2
- package/dist/{chunk-ATEVQYB6.js → chunk-FCJO72WG.js} +2 -2
- package/dist/{chunk-MEADD45E.js → chunk-G2U5WGRP.js} +2 -2
- package/dist/chunk-GR7322AQ.js +20 -0
- package/dist/chunk-GR7322AQ.js.map +1 -0
- package/dist/{chunk-YO2VXHA5.js → chunk-H5BHFVEN.js} +2 -2
- package/dist/{chunk-WWLDINLH.js → chunk-IAXVREU5.js} +2 -2
- package/dist/{chunk-RTNF2H34.js → chunk-IONQ6TOR.js} +2 -2
- package/dist/{chunk-5ZOOVGMT.js → chunk-JBM7DESQ.js} +2 -2
- package/dist/{chunk-4JPVE6OV.js → chunk-JK4WDDWU.js} +3 -3
- package/dist/{chunk-TKV5JYQY.js → chunk-JQFD563S.js} +2 -2
- package/dist/{chunk-VTP4QJY6.js → chunk-KGO3G2QB.js} +3 -3
- package/dist/chunk-KPB5ENNM.js +25 -0
- package/dist/chunk-KPB5ENNM.js.map +1 -0
- package/dist/{chunk-AHBTUFRW.js → chunk-L5AMAEWX.js} +2 -2
- package/dist/{chunk-IOLV6PTH.js → chunk-LAITZAIG.js} +2 -2
- package/dist/{chunk-EOXULNBC.js → chunk-LODULPI3.js} +2 -2
- package/dist/{chunk-JM42PLWS.js → chunk-LSKER4FN.js} +2 -2
- package/dist/{chunk-RLF3Y7VC.js → chunk-M4KDJ4I4.js} +2 -2
- package/dist/{chunk-GSVAMMHA.js → chunk-M7Y67IAB.js} +2 -2
- package/dist/{chunk-4JPDLKBK.js → chunk-MDXN3WMH.js} +2 -2
- package/dist/{chunk-6KAIABBV.js → chunk-MENMDB6M.js} +2 -2
- package/dist/{chunk-LOANS6ZE.js → chunk-MM2HIW7M.js} +3 -3
- package/dist/{chunk-3HXEOAQN.js → chunk-MNV2H4N6.js} +2 -2
- package/dist/{chunk-ZSOH7VST.js → chunk-MTDZG4HK.js} +7 -4
- package/dist/chunk-MTDZG4HK.js.map +1 -0
- package/dist/{chunk-RW25XXOH.js → chunk-NEHYVVTH.js} +2 -2
- package/dist/{chunk-65RGM7EG.js → chunk-NTMT5XGC.js} +2 -2
- package/dist/{chunk-T4J7PXYZ.js → chunk-NX7MXLFS.js} +2 -2
- package/dist/{chunk-4RLD3OE2.js → chunk-OFIPZPEA.js} +2 -2
- package/dist/{chunk-VJGNLAF2.js → chunk-OKXCGA4Y.js} +2 -2
- package/dist/{chunk-C7SIOWMA.js → chunk-OLLX6YCN.js} +2 -2
- package/dist/{chunk-VXG2IG2N.js → chunk-OQNFKOPA.js} +2 -2
- package/dist/chunk-OSBVYUOQ.js +35 -0
- package/dist/chunk-OSBVYUOQ.js.map +1 -0
- package/dist/{chunk-HDTIOOWB.js → chunk-OVSCDXYN.js} +8 -2
- package/dist/chunk-OVSCDXYN.js.map +1 -0
- package/dist/{chunk-C5O6LIWR.js → chunk-PURKYS5T.js} +2 -2
- package/dist/{chunk-2Q6WEULJ.js → chunk-PWIEPZVO.js} +2 -2
- package/dist/{chunk-TCEDHHNM.js → chunk-PX2I4GCF.js} +2 -2
- package/dist/{chunk-4BQ4BJ4Y.js → chunk-PYALKKWZ.js} +4 -4
- package/dist/{chunk-AI5MRREC.js → chunk-R7ZCA6AQ.js} +4 -2
- package/dist/chunk-R7ZCA6AQ.js.map +1 -0
- package/dist/{chunk-MA7PR6V5.js → chunk-RKEZOXD3.js} +2 -2
- package/dist/{chunk-VTXBG2JV.js → chunk-RL2NW7HP.js} +2 -2
- package/dist/{chunk-ALAAO5GL.js → chunk-RLVCSGRU.js} +2 -2
- package/dist/{chunk-E2MU2P66.js → chunk-S7L5KBI4.js} +2 -2
- package/dist/{chunk-EKR6BYFM.js → chunk-SCD2JNY3.js} +2 -2
- package/dist/{chunk-6SF6EC2I.js → chunk-SDW4W3XE.js} +2 -2
- package/dist/{chunk-ZITFEEZS.js → chunk-T5WSO6US.js} +2 -2
- package/dist/{chunk-RPQ5K247.js → chunk-TQUKIG26.js} +2 -2
- package/dist/chunk-UQ2F3I2S.js +19 -0
- package/dist/chunk-UQ2F3I2S.js.map +1 -0
- package/dist/{chunk-FLRHLAMD.js → chunk-URC6AG2N.js} +2 -2
- package/dist/{chunk-4N6CTX4N.js → chunk-UTN7ZKL4.js} +3 -3
- package/dist/{chunk-4EFKJDHV.js → chunk-UXMNCRG7.js} +2 -2
- package/dist/{chunk-VBDGWVJ4.js → chunk-VC7RTDJP.js} +2 -2
- package/dist/{chunk-TYYV5UYX.js → chunk-VKXN4FQD.js} +2 -2
- package/dist/{chunk-2PDEHGNB.js → chunk-VQAGV72H.js} +8 -7
- package/dist/chunk-VQAGV72H.js.map +1 -0
- package/dist/{chunk-3RSGMPWR.js → chunk-VQPIPLHX.js} +2 -2
- package/dist/{chunk-OX4I35UO.js → chunk-VS2VCQLP.js} +2 -2
- package/dist/{chunk-OPWK2TVF.js → chunk-WGLZHBJG.js} +2 -2
- package/dist/{chunk-EW3MVOID.js → chunk-WTLAKRCT.js} +2 -2
- package/dist/{chunk-SGHPW77A.js → chunk-X3ARINEH.js} +2 -2
- package/dist/chunk-XS2HUADA.js +13 -0
- package/dist/chunk-XS2HUADA.js.map +1 -0
- package/dist/{chunk-5DQVEAAR.js → chunk-XWBOD6MD.js} +2 -2
- package/dist/{chunk-BO5WXWO2.js → chunk-YNLBS34B.js} +8 -2
- package/dist/chunk-YNLBS34B.js.map +1 -0
- package/dist/{chunk-CKOIGPND.js → chunk-YOSCEJ36.js} +2 -2
- package/dist/chunk-YRCFMGBH.js +54 -0
- package/dist/chunk-YRCFMGBH.js.map +1 -0
- package/dist/{chunk-NE7HNEF6.js → chunk-ZG4ROOWI.js} +2 -2
- package/dist/{chunk-26VAIV6A.js → chunk-ZGWLIISB.js} +3 -3
- package/dist/{chunk-TWZNSMKO.js → chunk-ZOHYNJUD.js} +4 -4
- package/dist/{chunk-3XNQYFWS.js → chunk-ZYU3P74L.js} +2 -2
- package/dist/differenceInDays.d.ts +2 -2
- package/dist/differenceInDays.js +3 -3
- package/dist/differenceInHours.d.ts +2 -2
- package/dist/differenceInHours.js +3 -3
- package/dist/differenceInMicroseconds.d.ts +1 -1
- package/dist/differenceInMicroseconds.js +3 -3
- package/dist/differenceInMilliseconds.d.ts +1 -1
- package/dist/differenceInMilliseconds.js +3 -3
- package/dist/differenceInMinutes.d.ts +2 -2
- package/dist/differenceInMinutes.js +3 -3
- package/dist/differenceInMonths.d.ts +2 -2
- package/dist/differenceInMonths.js +3 -3
- package/dist/differenceInNanoseconds.d.ts +1 -1
- package/dist/differenceInNanoseconds.js +3 -3
- package/dist/differenceInQuarters.d.ts +33 -0
- package/dist/differenceInQuarters.d.ts.map +1 -0
- package/dist/differenceInQuarters.js +10 -0
- package/dist/differenceInQuarters.js.map +1 -0
- package/dist/differenceInSeconds.d.ts +2 -2
- package/dist/differenceInSeconds.js +3 -3
- package/dist/differenceInWeeks.d.ts +2 -2
- package/dist/differenceInWeeks.js +3 -3
- package/dist/differenceInYears.d.ts +2 -2
- package/dist/differenceInYears.js +3 -3
- package/dist/eachDayOfInterval.d.ts +1 -1
- package/dist/eachDayOfInterval.js +3 -3
- package/dist/eachHourOfInterval.d.ts +1 -1
- package/dist/eachHourOfInterval.js +3 -3
- package/dist/eachMinuteOfInterval.d.ts +1 -1
- package/dist/eachMinuteOfInterval.js +3 -3
- package/dist/eachMonthOfInterval.d.ts +1 -1
- package/dist/eachMonthOfInterval.js +3 -3
- package/dist/eachQuarterOfInterval.d.ts +43 -0
- package/dist/eachQuarterOfInterval.d.ts.map +1 -0
- package/dist/eachQuarterOfInterval.js +10 -0
- package/dist/eachQuarterOfInterval.js.map +1 -0
- package/dist/eachWeekOfInterval.d.ts +1 -1
- package/dist/eachWeekOfInterval.js +3 -3
- package/dist/eachYearOfInterval.d.ts +1 -1
- package/dist/eachYearOfInterval.js +3 -3
- package/dist/endOfDay.d.ts +2 -2
- package/dist/endOfDay.js +5 -5
- package/dist/endOfMonth.d.ts +14 -4
- package/dist/endOfMonth.d.ts.map +1 -1
- package/dist/endOfMonth.js +5 -5
- package/dist/endOfQuarter.d.ts +39 -0
- package/dist/endOfQuarter.d.ts.map +1 -0
- package/dist/endOfQuarter.js +13 -0
- package/dist/endOfQuarter.js.map +1 -0
- package/dist/endOfWeek.d.ts +13 -3
- package/dist/endOfWeek.d.ts.map +1 -1
- package/dist/endOfWeek.js +4 -4
- package/dist/endOfYear.d.ts +14 -4
- package/dist/endOfYear.d.ts.map +1 -1
- package/dist/endOfYear.js +5 -5
- package/dist/format.d.ts +1 -1
- package/dist/format.js +3 -3
- package/dist/formatPlainDate.d.ts +1 -1
- package/dist/formatPlainDate.js +1 -1
- package/dist/getQuarter.d.ts +21 -0
- package/dist/getQuarter.d.ts.map +1 -0
- package/dist/getQuarter.js +10 -0
- package/dist/getQuarter.js.map +1 -0
- package/dist/index.d.ts +92 -84
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +154 -121
- package/dist/intlFormatDistance.js +10 -10
- package/dist/isAfter.d.ts +1 -1
- package/dist/isAfter.js +4 -4
- package/dist/isBefore.d.ts +1 -1
- package/dist/isBefore.js +4 -4
- package/dist/isFuture.js +5 -5
- package/dist/isPast.js +5 -5
- package/dist/isPlainDateAfter.d.ts +1 -1
- package/dist/isPlainDateAfter.js +2 -2
- package/dist/isPlainDateBefore.d.ts +1 -1
- package/dist/isPlainDateBefore.js +2 -2
- package/dist/isPlainDateEqual.d.ts +1 -1
- package/dist/isPlainDateEqual.js +2 -2
- package/dist/isPlainTimeAfter.d.ts +1 -1
- package/dist/isPlainTimeAfter.js +2 -2
- package/dist/isPlainTimeBefore.d.ts +1 -1
- package/dist/isPlainTimeBefore.js +2 -2
- package/dist/isPlainTimeEqual.d.ts +1 -1
- package/dist/isPlainTimeEqual.js +2 -2
- package/dist/isSameDay.d.ts +1 -1
- package/dist/isSameDay.js +3 -3
- package/dist/isSameHour.js +3 -3
- package/dist/isSameMicrosecond.js +3 -3
- package/dist/isSameMillisecond.js +3 -3
- package/dist/isSameMinute.js +3 -3
- package/dist/isSameMonth.js +3 -3
- package/dist/isSameNanosecond.js +3 -3
- package/dist/isSameQuarter.d.ts +32 -0
- package/dist/isSameQuarter.d.ts.map +1 -0
- package/dist/isSameQuarter.js +10 -0
- package/dist/isSameQuarter.js.map +1 -0
- package/dist/isSameSecond.js +3 -3
- package/dist/isSameWeek.js +3 -3
- package/dist/isSameYear.js +3 -3
- package/dist/isWithinInterval.d.ts +1 -1
- package/dist/isWithinInterval.js +5 -5
- package/dist/now.d.ts +2 -2
- package/dist/now.js +2 -2
- package/dist/roundToNearestHour.js +3 -3
- package/dist/roundToNearestMinute.js +3 -3
- package/dist/roundToNearestSecond.js +3 -3
- package/dist/shared/differenceInMilliseconds.d.ts +1 -1
- package/dist/shared/differenceInMilliseconds.js +1 -1
- package/dist/shared/isAfter.d.ts +1 -1
- package/dist/shared/isAfter.js +2 -2
- package/dist/shared/isBefore.d.ts +1 -1
- package/dist/shared/isBefore.js +2 -2
- package/dist/shared/normalizeTemporalInput.js +2 -2
- package/dist/shared/normalizeWithPlainDate.d.ts +1 -1
- package/dist/shared/normalizeWithPlainDate.js +4 -4
- package/dist/shared/nowZoned.d.ts +1 -1
- package/dist/shared/nowZoned.js +3 -3
- package/dist/shared/plainDateToZonedDateTime.d.ts +2 -2
- package/dist/shared/plainDateToZonedDateTime.js +2 -2
- package/dist/shared/quarter.d.ts +12 -0
- package/dist/shared/quarter.d.ts.map +1 -0
- package/dist/shared/quarter.js +9 -0
- package/dist/shared/quarter.js.map +1 -0
- package/dist/shared/temporal.d.ts +16 -14
- package/dist/shared/temporal.d.ts.map +1 -1
- package/dist/shared/temporal.js +1 -1
- package/dist/simpleFormat.d.ts +2 -2
- package/dist/simpleFormat.js +2 -2
- package/dist/startOfDay.d.ts +2 -2
- package/dist/startOfDay.js +5 -5
- package/dist/startOfMonth.d.ts +14 -4
- package/dist/startOfMonth.d.ts.map +1 -1
- package/dist/startOfMonth.js +5 -5
- package/dist/startOfQuarter.d.ts +39 -0
- package/dist/startOfQuarter.d.ts.map +1 -0
- package/dist/startOfQuarter.js +12 -0
- package/dist/startOfQuarter.js.map +1 -0
- package/dist/startOfWeek.d.ts +13 -3
- package/dist/startOfWeek.d.ts.map +1 -1
- package/dist/startOfWeek.js +4 -4
- package/dist/startOfYear.d.ts +14 -4
- package/dist/startOfYear.d.ts.map +1 -1
- package/dist/startOfYear.js +5 -5
- package/dist/subDays.js +4 -4
- package/dist/subHours.js +4 -4
- package/dist/subMicroseconds.js +4 -4
- package/dist/subMilliseconds.js +4 -4
- package/dist/subMinutes.js +4 -4
- package/dist/subMonths.js +4 -4
- package/dist/subNanoseconds.js +4 -4
- package/dist/subQuarters.d.ts +27 -0
- package/dist/subQuarters.d.ts.map +1 -0
- package/dist/subQuarters.js +10 -0
- package/dist/subQuarters.js.map +1 -0
- package/dist/subSeconds.js +4 -4
- package/dist/subWeeks.js +4 -4
- package/dist/subYears.js +4 -4
- package/dist/toDate.js +2 -2
- package/dist/toInstant.d.ts +27 -0
- package/dist/toInstant.d.ts.map +1 -0
- package/dist/toInstant.js +8 -0
- package/dist/toInstant.js.map +1 -0
- package/dist/toIso.js +2 -2
- package/dist/toIso9075.js +2 -2
- package/dist/toPlainDate.d.ts +2 -2
- package/dist/toPlainDate.js +2 -2
- package/dist/toPlainTime.d.ts +2 -2
- package/dist/toPlainTime.js +2 -2
- package/dist/toZonedTime.d.ts +2 -2
- package/dist/toZonedTime.js +2 -2
- package/dist/today.d.ts +2 -2
- package/dist/today.js +2 -2
- package/dist/types.d.ts +1 -1
- package/package.json +5 -3
- package/dist/addDays.test.d.ts +0 -2
- package/dist/addDays.test.d.ts.map +0 -1
- package/dist/addHours.test.d.ts +0 -2
- package/dist/addHours.test.d.ts.map +0 -1
- package/dist/addMicroseconds.test.d.ts +0 -2
- package/dist/addMicroseconds.test.d.ts.map +0 -1
- package/dist/addMilliseconds.test.d.ts +0 -2
- package/dist/addMilliseconds.test.d.ts.map +0 -1
- package/dist/addMinutes.test.d.ts +0 -2
- package/dist/addMinutes.test.d.ts.map +0 -1
- package/dist/addMonths.test.d.ts +0 -2
- package/dist/addMonths.test.d.ts.map +0 -1
- package/dist/addNanoseconds.test.d.ts +0 -2
- package/dist/addNanoseconds.test.d.ts.map +0 -1
- package/dist/addSeconds.test.d.ts +0 -2
- package/dist/addSeconds.test.d.ts.map +0 -1
- package/dist/addWeeks.test.d.ts +0 -2
- package/dist/addWeeks.test.d.ts.map +0 -1
- package/dist/addYears.test.d.ts +0 -2
- package/dist/addYears.test.d.ts.map +0 -1
- package/dist/browserTimezone.test.d.ts +0 -2
- package/dist/browserTimezone.test.d.ts.map +0 -1
- package/dist/chunk-2PDEHGNB.js.map +0 -1
- package/dist/chunk-AI5MRREC.js.map +0 -1
- package/dist/chunk-BO5WXWO2.js.map +0 -1
- package/dist/chunk-C4UZJHM7.js.map +0 -1
- package/dist/chunk-HDTIOOWB.js.map +0 -1
- package/dist/chunk-I6S6EIZG.js.map +0 -1
- package/dist/chunk-RQUVNJBG.js.map +0 -1
- package/dist/chunk-ZSOH7VST.js.map +0 -1
- package/dist/differenceInDays.test.d.ts +0 -2
- package/dist/differenceInDays.test.d.ts.map +0 -1
- package/dist/differenceInHours.test.d.ts +0 -2
- package/dist/differenceInHours.test.d.ts.map +0 -1
- package/dist/differenceInMicroseconds.test.d.ts +0 -2
- package/dist/differenceInMicroseconds.test.d.ts.map +0 -1
- package/dist/differenceInMilliseconds.test.d.ts +0 -2
- package/dist/differenceInMilliseconds.test.d.ts.map +0 -1
- package/dist/differenceInMinutes.test.d.ts +0 -2
- package/dist/differenceInMinutes.test.d.ts.map +0 -1
- package/dist/differenceInMonths.test.d.ts +0 -2
- package/dist/differenceInMonths.test.d.ts.map +0 -1
- package/dist/differenceInNanoseconds.test.d.ts +0 -2
- package/dist/differenceInNanoseconds.test.d.ts.map +0 -1
- package/dist/differenceInSeconds.test.d.ts +0 -2
- package/dist/differenceInSeconds.test.d.ts.map +0 -1
- package/dist/differenceInWeeks.test.d.ts +0 -2
- package/dist/differenceInWeeks.test.d.ts.map +0 -1
- package/dist/differenceInYears.test.d.ts +0 -2
- package/dist/differenceInYears.test.d.ts.map +0 -1
- package/dist/eachDayOfInterval.test.d.ts +0 -2
- package/dist/eachDayOfInterval.test.d.ts.map +0 -1
- package/dist/eachHourOfInterval.test.d.ts +0 -2
- package/dist/eachHourOfInterval.test.d.ts.map +0 -1
- package/dist/eachMinuteOfInterval.test.d.ts +0 -2
- package/dist/eachMinuteOfInterval.test.d.ts.map +0 -1
- package/dist/eachMonthOfInterval.test.d.ts +0 -2
- package/dist/eachMonthOfInterval.test.d.ts.map +0 -1
- package/dist/eachWeekOfInterval.test.d.ts +0 -2
- package/dist/eachWeekOfInterval.test.d.ts.map +0 -1
- package/dist/eachYearOfInterval.test.d.ts +0 -2
- package/dist/eachYearOfInterval.test.d.ts.map +0 -1
- package/dist/endOfDay.test.d.ts +0 -2
- package/dist/endOfDay.test.d.ts.map +0 -1
- package/dist/endOfMonth.test.d.ts +0 -2
- package/dist/endOfMonth.test.d.ts.map +0 -1
- package/dist/endOfWeek.test.d.ts +0 -2
- package/dist/endOfWeek.test.d.ts.map +0 -1
- package/dist/endOfYear.test.d.ts +0 -2
- package/dist/endOfYear.test.d.ts.map +0 -1
- package/dist/format.test.d.ts +0 -2
- package/dist/format.test.d.ts.map +0 -1
- package/dist/formatPlainDate.test.d.ts +0 -2
- package/dist/formatPlainDate.test.d.ts.map +0 -1
- package/dist/index.test.d.ts +0 -2
- package/dist/index.test.d.ts.map +0 -1
- package/dist/intlFormatDistance.test.d.ts +0 -2
- package/dist/intlFormatDistance.test.d.ts.map +0 -1
- package/dist/isAfter.test.d.ts +0 -2
- package/dist/isAfter.test.d.ts.map +0 -1
- package/dist/isBefore.test.d.ts +0 -2
- package/dist/isBefore.test.d.ts.map +0 -1
- package/dist/isFuture.test.d.ts +0 -2
- package/dist/isFuture.test.d.ts.map +0 -1
- package/dist/isPast.test.d.ts +0 -2
- package/dist/isPast.test.d.ts.map +0 -1
- package/dist/isPlainDateAfter.test.d.ts +0 -2
- package/dist/isPlainDateAfter.test.d.ts.map +0 -1
- package/dist/isPlainDateBefore.test.d.ts +0 -2
- package/dist/isPlainDateBefore.test.d.ts.map +0 -1
- package/dist/isPlainDateEqual.test.d.ts +0 -2
- package/dist/isPlainDateEqual.test.d.ts.map +0 -1
- package/dist/isPlainTimeAfter.test.d.ts +0 -2
- package/dist/isPlainTimeAfter.test.d.ts.map +0 -1
- package/dist/isPlainTimeBefore.test.d.ts +0 -2
- package/dist/isPlainTimeBefore.test.d.ts.map +0 -1
- package/dist/isPlainTimeEqual.test.d.ts +0 -2
- package/dist/isPlainTimeEqual.test.d.ts.map +0 -1
- package/dist/isSameDay.test.d.ts +0 -2
- package/dist/isSameDay.test.d.ts.map +0 -1
- package/dist/isSameHour.test.d.ts +0 -2
- package/dist/isSameHour.test.d.ts.map +0 -1
- package/dist/isSameMicrosecond.test.d.ts +0 -2
- package/dist/isSameMicrosecond.test.d.ts.map +0 -1
- package/dist/isSameMillisecond.test.d.ts +0 -2
- package/dist/isSameMillisecond.test.d.ts.map +0 -1
- package/dist/isSameMinute.test.d.ts +0 -2
- package/dist/isSameMinute.test.d.ts.map +0 -1
- package/dist/isSameMonth.test.d.ts +0 -2
- package/dist/isSameMonth.test.d.ts.map +0 -1
- package/dist/isSameNanosecond.test.d.ts +0 -2
- package/dist/isSameNanosecond.test.d.ts.map +0 -1
- package/dist/isSameSecond.test.d.ts +0 -2
- package/dist/isSameSecond.test.d.ts.map +0 -1
- package/dist/isSameWeek.test.d.ts +0 -2
- package/dist/isSameWeek.test.d.ts.map +0 -1
- package/dist/isSameYear.test.d.ts +0 -2
- package/dist/isSameYear.test.d.ts.map +0 -1
- package/dist/isWithinInterval.test.d.ts +0 -2
- package/dist/isWithinInterval.test.d.ts.map +0 -1
- package/dist/now.test.d.ts +0 -2
- package/dist/now.test.d.ts.map +0 -1
- package/dist/roundToNearestHour.test.d.ts +0 -2
- package/dist/roundToNearestHour.test.d.ts.map +0 -1
- package/dist/roundToNearestMinute.test.d.ts +0 -2
- package/dist/roundToNearestMinute.test.d.ts.map +0 -1
- package/dist/roundToNearestSecond.test.d.ts +0 -2
- package/dist/roundToNearestSecond.test.d.ts.map +0 -1
- package/dist/shared/temporal.test.d.ts +0 -2
- package/dist/shared/temporal.test.d.ts.map +0 -1
- package/dist/simpleFormat.test.d.ts +0 -2
- package/dist/simpleFormat.test.d.ts.map +0 -1
- package/dist/startOfDay.test.d.ts +0 -2
- package/dist/startOfDay.test.d.ts.map +0 -1
- package/dist/startOfMonth.test.d.ts +0 -2
- package/dist/startOfMonth.test.d.ts.map +0 -1
- package/dist/startOfWeek.test.d.ts +0 -2
- package/dist/startOfWeek.test.d.ts.map +0 -1
- package/dist/startOfYear.test.d.ts +0 -2
- package/dist/startOfYear.test.d.ts.map +0 -1
- package/dist/subDays.test.d.ts +0 -2
- package/dist/subDays.test.d.ts.map +0 -1
- package/dist/subHours.test.d.ts +0 -2
- package/dist/subHours.test.d.ts.map +0 -1
- package/dist/subMicroseconds.test.d.ts +0 -2
- package/dist/subMicroseconds.test.d.ts.map +0 -1
- package/dist/subMilliseconds.test.d.ts +0 -2
- package/dist/subMilliseconds.test.d.ts.map +0 -1
- package/dist/subMinutes.test.d.ts +0 -2
- package/dist/subMinutes.test.d.ts.map +0 -1
- package/dist/subMonths.test.d.ts +0 -2
- package/dist/subMonths.test.d.ts.map +0 -1
- package/dist/subNanoseconds.test.d.ts +0 -2
- package/dist/subNanoseconds.test.d.ts.map +0 -1
- package/dist/subSeconds.test.d.ts +0 -2
- package/dist/subSeconds.test.d.ts.map +0 -1
- package/dist/subWeeks.test.d.ts +0 -2
- package/dist/subWeeks.test.d.ts.map +0 -1
- package/dist/subYears.test.d.ts +0 -2
- package/dist/subYears.test.d.ts.map +0 -1
- package/dist/toDate.test.d.ts +0 -2
- package/dist/toDate.test.d.ts.map +0 -1
- package/dist/toIso.test.d.ts +0 -2
- package/dist/toIso.test.d.ts.map +0 -1
- package/dist/toIso9075.test.d.ts +0 -2
- package/dist/toIso9075.test.d.ts.map +0 -1
- package/dist/toPlainDate.test.d.ts +0 -2
- package/dist/toPlainDate.test.d.ts.map +0 -1
- package/dist/toPlainTime.test.d.ts +0 -2
- package/dist/toPlainTime.test.d.ts.map +0 -1
- package/dist/toUtc.d.ts +0 -27
- package/dist/toUtc.d.ts.map +0 -1
- package/dist/toUtc.js +0 -8
- package/dist/toUtc.test.d.ts +0 -2
- package/dist/toUtc.test.d.ts.map +0 -1
- package/dist/toZonedTime.test.d.ts +0 -2
- package/dist/toZonedTime.test.d.ts.map +0 -1
- package/dist/today.test.d.ts +0 -2
- package/dist/today.test.d.ts.map +0 -1
- /package/dist/{toUtc.js.map → addQuarters.js.map} +0 -0
- /package/dist/{chunk-J52B4PX6.js.map → chunk-2E4KCD3Y.js.map} +0 -0
- /package/dist/{chunk-YNV6WGXV.js.map → chunk-2EFJSF2R.js.map} +0 -0
- /package/dist/{chunk-SAFMGBXL.js.map → chunk-3LTTYG6N.js.map} +0 -0
- /package/dist/{chunk-MXE44KVG.js.map → chunk-4PGGOVSG.js.map} +0 -0
- /package/dist/{chunk-JTANYFEV.js.map → chunk-567DXBLA.js.map} +0 -0
- /package/dist/{chunk-RXTMPPOP.js.map → chunk-6RETOV6A.js.map} +0 -0
- /package/dist/{chunk-LTW2TDLL.js.map → chunk-6UMISP3B.js.map} +0 -0
- /package/dist/{chunk-YMS7JXBN.js.map → chunk-6YU6BQOZ.js.map} +0 -0
- /package/dist/{chunk-UAYBKORB.js.map → chunk-7K5BJ6F7.js.map} +0 -0
- /package/dist/{chunk-63RSJ2W4.js.map → chunk-A42NID5P.js.map} +0 -0
- /package/dist/{chunk-IV47GMAA.js.map → chunk-BEGD73DT.js.map} +0 -0
- /package/dist/{chunk-3ORGILYG.js.map → chunk-BTXU3OGV.js.map} +0 -0
- /package/dist/{chunk-2KYXZIGP.js.map → chunk-CCVPCHUO.js.map} +0 -0
- /package/dist/{chunk-OVFO6CZ7.js.map → chunk-CIA46DWB.js.map} +0 -0
- /package/dist/{chunk-RB2YCLBV.js.map → chunk-CSOSM46M.js.map} +0 -0
- /package/dist/{chunk-347TWPBS.js.map → chunk-DBVGH55Z.js.map} +0 -0
- /package/dist/{chunk-X3T7QMBA.js.map → chunk-DCCHY45G.js.map} +0 -0
- /package/dist/{chunk-VDEZJB42.js.map → chunk-DCFRBZBY.js.map} +0 -0
- /package/dist/{chunk-7JL3U64G.js.map → chunk-DHFBKOFZ.js.map} +0 -0
- /package/dist/{chunk-7EVZGEAI.js.map → chunk-DMFV2AL7.js.map} +0 -0
- /package/dist/{chunk-TUOGC2TY.js.map → chunk-EBVLBLR3.js.map} +0 -0
- /package/dist/{chunk-BQHSXMGZ.js.map → chunk-ELUSLRWQ.js.map} +0 -0
- /package/dist/{chunk-XVAVCEKT.js.map → chunk-EMZFQEWM.js.map} +0 -0
- /package/dist/{chunk-DC5JXNIC.js.map → chunk-EU3SYJHM.js.map} +0 -0
- /package/dist/{chunk-EZJDWFFE.js.map → chunk-EVEMK2K2.js.map} +0 -0
- /package/dist/{chunk-ATEVQYB6.js.map → chunk-FCJO72WG.js.map} +0 -0
- /package/dist/{chunk-MEADD45E.js.map → chunk-G2U5WGRP.js.map} +0 -0
- /package/dist/{chunk-YO2VXHA5.js.map → chunk-H5BHFVEN.js.map} +0 -0
- /package/dist/{chunk-WWLDINLH.js.map → chunk-IAXVREU5.js.map} +0 -0
- /package/dist/{chunk-RTNF2H34.js.map → chunk-IONQ6TOR.js.map} +0 -0
- /package/dist/{chunk-5ZOOVGMT.js.map → chunk-JBM7DESQ.js.map} +0 -0
- /package/dist/{chunk-4JPVE6OV.js.map → chunk-JK4WDDWU.js.map} +0 -0
- /package/dist/{chunk-TKV5JYQY.js.map → chunk-JQFD563S.js.map} +0 -0
- /package/dist/{chunk-VTP4QJY6.js.map → chunk-KGO3G2QB.js.map} +0 -0
- /package/dist/{chunk-AHBTUFRW.js.map → chunk-L5AMAEWX.js.map} +0 -0
- /package/dist/{chunk-IOLV6PTH.js.map → chunk-LAITZAIG.js.map} +0 -0
- /package/dist/{chunk-EOXULNBC.js.map → chunk-LODULPI3.js.map} +0 -0
- /package/dist/{chunk-JM42PLWS.js.map → chunk-LSKER4FN.js.map} +0 -0
- /package/dist/{chunk-RLF3Y7VC.js.map → chunk-M4KDJ4I4.js.map} +0 -0
- /package/dist/{chunk-GSVAMMHA.js.map → chunk-M7Y67IAB.js.map} +0 -0
- /package/dist/{chunk-4JPDLKBK.js.map → chunk-MDXN3WMH.js.map} +0 -0
- /package/dist/{chunk-6KAIABBV.js.map → chunk-MENMDB6M.js.map} +0 -0
- /package/dist/{chunk-LOANS6ZE.js.map → chunk-MM2HIW7M.js.map} +0 -0
- /package/dist/{chunk-3HXEOAQN.js.map → chunk-MNV2H4N6.js.map} +0 -0
- /package/dist/{chunk-RW25XXOH.js.map → chunk-NEHYVVTH.js.map} +0 -0
- /package/dist/{chunk-65RGM7EG.js.map → chunk-NTMT5XGC.js.map} +0 -0
- /package/dist/{chunk-T4J7PXYZ.js.map → chunk-NX7MXLFS.js.map} +0 -0
- /package/dist/{chunk-4RLD3OE2.js.map → chunk-OFIPZPEA.js.map} +0 -0
- /package/dist/{chunk-VJGNLAF2.js.map → chunk-OKXCGA4Y.js.map} +0 -0
- /package/dist/{chunk-C7SIOWMA.js.map → chunk-OLLX6YCN.js.map} +0 -0
- /package/dist/{chunk-VXG2IG2N.js.map → chunk-OQNFKOPA.js.map} +0 -0
- /package/dist/{chunk-C5O6LIWR.js.map → chunk-PURKYS5T.js.map} +0 -0
- /package/dist/{chunk-2Q6WEULJ.js.map → chunk-PWIEPZVO.js.map} +0 -0
- /package/dist/{chunk-TCEDHHNM.js.map → chunk-PX2I4GCF.js.map} +0 -0
- /package/dist/{chunk-4BQ4BJ4Y.js.map → chunk-PYALKKWZ.js.map} +0 -0
- /package/dist/{chunk-MA7PR6V5.js.map → chunk-RKEZOXD3.js.map} +0 -0
- /package/dist/{chunk-VTXBG2JV.js.map → chunk-RL2NW7HP.js.map} +0 -0
- /package/dist/{chunk-ALAAO5GL.js.map → chunk-RLVCSGRU.js.map} +0 -0
- /package/dist/{chunk-E2MU2P66.js.map → chunk-S7L5KBI4.js.map} +0 -0
- /package/dist/{chunk-EKR6BYFM.js.map → chunk-SCD2JNY3.js.map} +0 -0
- /package/dist/{chunk-6SF6EC2I.js.map → chunk-SDW4W3XE.js.map} +0 -0
- /package/dist/{chunk-ZITFEEZS.js.map → chunk-T5WSO6US.js.map} +0 -0
- /package/dist/{chunk-RPQ5K247.js.map → chunk-TQUKIG26.js.map} +0 -0
- /package/dist/{chunk-FLRHLAMD.js.map → chunk-URC6AG2N.js.map} +0 -0
- /package/dist/{chunk-4N6CTX4N.js.map → chunk-UTN7ZKL4.js.map} +0 -0
- /package/dist/{chunk-4EFKJDHV.js.map → chunk-UXMNCRG7.js.map} +0 -0
- /package/dist/{chunk-VBDGWVJ4.js.map → chunk-VC7RTDJP.js.map} +0 -0
- /package/dist/{chunk-TYYV5UYX.js.map → chunk-VKXN4FQD.js.map} +0 -0
- /package/dist/{chunk-3RSGMPWR.js.map → chunk-VQPIPLHX.js.map} +0 -0
- /package/dist/{chunk-OX4I35UO.js.map → chunk-VS2VCQLP.js.map} +0 -0
- /package/dist/{chunk-OPWK2TVF.js.map → chunk-WGLZHBJG.js.map} +0 -0
- /package/dist/{chunk-EW3MVOID.js.map → chunk-WTLAKRCT.js.map} +0 -0
- /package/dist/{chunk-SGHPW77A.js.map → chunk-X3ARINEH.js.map} +0 -0
- /package/dist/{chunk-5DQVEAAR.js.map → chunk-XWBOD6MD.js.map} +0 -0
- /package/dist/{chunk-CKOIGPND.js.map → chunk-YOSCEJ36.js.map} +0 -0
- /package/dist/{chunk-NE7HNEF6.js.map → chunk-ZG4ROOWI.js.map} +0 -0
- /package/dist/{chunk-26VAIV6A.js.map → chunk-ZGWLIISB.js.map} +0 -0
- /package/dist/{chunk-TWZNSMKO.js.map → chunk-ZOHYNJUD.js.map} +0 -0
- /package/dist/{chunk-3XNQYFWS.js.map → chunk-ZYU3P74L.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addSeconds
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LAITZAIG.js";
|
|
4
4
|
|
|
5
5
|
// src/subSeconds.ts
|
|
6
6
|
function subSeconds(input, seconds) {
|
|
@@ -10,4 +10,4 @@ function subSeconds(input, seconds) {
|
|
|
10
10
|
export {
|
|
11
11
|
subSeconds
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-OQNFKOPA.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import {
|
|
2
|
+
quarterStartMonth
|
|
3
|
+
} from "./chunk-XS2HUADA.js";
|
|
4
|
+
import {
|
|
5
|
+
normalizeWithPlainDate
|
|
6
|
+
} from "./chunk-ZOHYNJUD.js";
|
|
7
|
+
import {
|
|
8
|
+
getEndOfDay
|
|
9
|
+
} from "./chunk-AVGNRINZ.js";
|
|
10
|
+
import {
|
|
11
|
+
isPlainDate
|
|
12
|
+
} from "./chunk-R7ZCA6AQ.js";
|
|
13
|
+
|
|
14
|
+
// src/endOfQuarter.ts
|
|
15
|
+
function endOfQuarter(input, timezone) {
|
|
16
|
+
if (isPlainDate(input) && timezone === void 0) {
|
|
17
|
+
const endMonth2 = input.with({
|
|
18
|
+
month: quarterStartMonth(input.month) + 2,
|
|
19
|
+
day: 1
|
|
20
|
+
});
|
|
21
|
+
return endMonth2.with({ day: endMonth2.daysInMonth });
|
|
22
|
+
}
|
|
23
|
+
const zonedDateTime = normalizeWithPlainDate(input, timezone);
|
|
24
|
+
const endMonth = zonedDateTime.with({
|
|
25
|
+
month: quarterStartMonth(zonedDateTime.month) + 2,
|
|
26
|
+
day: 1
|
|
27
|
+
});
|
|
28
|
+
const lastDay = endMonth.with({ day: endMonth.daysInMonth });
|
|
29
|
+
return getEndOfDay(lastDay);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export {
|
|
33
|
+
endOfQuarter
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=chunk-OSBVYUOQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/endOfQuarter.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 { normalizeWithPlainDate } from \"./shared/normalizeWithPlainDate\";\nimport { quarterStartMonth } from \"./shared/quarter\";\n\n/**\n * Returns a ZonedDateTime representing the last moment of the quarter\n * (last day of the quarter's ending month at 23:59:59.999999999).\n *\n * Quarters: Q1 = Jan–Mar, Q2 = Apr–Jun, Q3 = Jul–Sep, Q4 = Oct–Dec.\n *\n * @param input - A Temporal.Instant (UTC) or Temporal.ZonedDateTime\n * @returns ZonedDateTime at the last day of the quarter at 23:59:59.999999999\n *\n * @example\n * ```ts\n * // From Instant (always UTC)\n * const instant = Temporal.Instant.from('2025-05-15T12:00:00Z');\n * const end = endOfQuarter(instant);\n * // 2025-06-30T23:59:59.999999999Z[UTC]\n * ```\n *\n * @example\n * ```ts\n * // From ZonedDateTime (uses its timezone)\n * const zoned = Temporal.ZonedDateTime.from('2025-02-15T15:30:00-05:00[America/New_York]');\n * const end = endOfQuarter(zoned);\n * // 2025-03-31T23:59:59.999999999-04:00[America/New_York]\n * ```\n *\n * @example\n * ```ts\n * // From PlainDate (requires timezone)\n * const date = Temporal.PlainDate.from('2025-11-15');\n * const end = endOfQuarter(date, 'America/New_York');\n * // 2025-12-31T23:59:59.999999999-05:00[America/New_York]\n * ```\n */\nexport function endOfQuarter(\n input: Temporal.Instant | Temporal.ZonedDateTime,\n): Temporal.ZonedDateTime;\nexport function endOfQuarter(input: Temporal.PlainDate): Temporal.PlainDate;\nexport function endOfQuarter(input: Temporal.PlainDate, timezone: Timezone): Temporal.ZonedDateTime;\nexport function endOfQuarter(\n input: Temporal.Instant | Temporal.ZonedDateTime | Temporal.PlainDate,\n timezone?: Timezone,\n): Temporal.ZonedDateTime | Temporal.PlainDate {\n // PlainDate with no timezone stays in calendar space → last day of quarter.\n if (isPlainDate(input) && timezone === undefined) {\n const endMonth = input.with({\n month: quarterStartMonth(input.month) + 2,\n day: 1,\n });\n return endMonth.with({ day: endMonth.daysInMonth });\n }\n const zonedDateTime = normalizeWithPlainDate(input, timezone!);\n const endMonth = zonedDateTime.with({\n month: quarterStartMonth(zonedDateTime.month) + 2,\n day: 1,\n });\n const lastDay = endMonth.with({ day: endMonth.daysInMonth });\n return getEndOfDay(lastDay);\n}\n"],"mappings":";;;;;;;;;;;;;;AA6CO,SAAS,aACd,OACA,UAC6C;AAE7C,MAAI,YAAY,KAAK,KAAK,aAAa,QAAW;AAChD,UAAMA,YAAW,MAAM,KAAK;AAAA,MAC1B,OAAO,kBAAkB,MAAM,KAAK,IAAI;AAAA,MACxC,KAAK;AAAA,IACP,CAAC;AACD,WAAOA,UAAS,KAAK,EAAE,KAAKA,UAAS,YAAY,CAAC;AAAA,EACpD;AACA,QAAM,gBAAgB,uBAAuB,OAAO,QAAS;AAC7D,QAAM,WAAW,cAAc,KAAK;AAAA,IAClC,OAAO,kBAAkB,cAAc,KAAK,IAAI;AAAA,IAChD,KAAK;AAAA,EACP,CAAC;AACD,QAAM,UAAU,SAAS,KAAK,EAAE,KAAK,SAAS,YAAY,CAAC;AAC3D,SAAO,YAAY,OAAO;AAC5B;","names":["endMonth"]}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeWithPlainDate
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZOHYNJUD.js";
|
|
4
|
+
import {
|
|
5
|
+
isPlainDate
|
|
6
|
+
} from "./chunk-R7ZCA6AQ.js";
|
|
4
7
|
|
|
5
8
|
// src/startOfYear.ts
|
|
6
9
|
function startOfYear(input, timezone) {
|
|
10
|
+
if (isPlainDate(input) && timezone === void 0) {
|
|
11
|
+
return input.with({ month: 1, day: 1 });
|
|
12
|
+
}
|
|
7
13
|
const zonedDateTime = normalizeWithPlainDate(input, timezone);
|
|
8
14
|
const firstDay = zonedDateTime.with({ month: 1, day: 1 });
|
|
9
15
|
return firstDay.startOfDay();
|
|
@@ -12,4 +18,4 @@ function startOfYear(input, timezone) {
|
|
|
12
18
|
export {
|
|
13
19
|
startOfYear
|
|
14
20
|
};
|
|
15
|
-
//# sourceMappingURL=chunk-
|
|
21
|
+
//# sourceMappingURL=chunk-OVSCDXYN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/startOfYear.ts"],"sourcesContent":["import { isPlainDate, Temporal } from './shared/temporal';\nimport type { Timezone } from './types';\nimport { normalizeWithPlainDate } from './shared/normalizeWithPlainDate';\n\n/**\n * Returns the first boundary of the year.\n * PlainDate inputs stay in calendar space unless a timezone is provided.\n *\n * @param input - A Temporal.Instant (UTC) or Temporal.ZonedDateTime\n * @returns ZonedDateTime at January 1st at 00:00:00.000000000\n *\n * @example\n * ```ts\n * // From Instant (always UTC)\n * const instant = Temporal.Instant.from('2025-06-15T12:00:00Z');\n * const start = startOfYear(instant);\n * // 2025-01-01T00:00:00Z[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 start = startOfYear(zoned);\n * // 2025-01-01T00:00:00-05:00[America/New_York]\n * ```\n *\n * @example\n * ```ts\n * // From PlainDate (stays a date)\n * const date = Temporal.PlainDate.from('2025-06-15');\n * const start = startOfYear(date);\n * // 2025-01-01\n * ```\n *\n * @example\n * ```ts\n * // From PlainDate with a timezone (returns a ZonedDateTime)\n * const date = Temporal.PlainDate.from('2025-06-15');\n * const start = startOfYear(date, 'America/New_York');\n * // 2025-01-01T00:00:00-05:00[America/New_York]\n * ```\n */\nexport function startOfYear(\n input: Temporal.Instant | Temporal.ZonedDateTime\n): Temporal.ZonedDateTime;\nexport function startOfYear(input: Temporal.PlainDate): Temporal.PlainDate;\nexport function startOfYear(\n input: Temporal.PlainDate,\n timezone: Timezone\n): Temporal.ZonedDateTime;\nexport function startOfYear(\n input: Temporal.Instant | Temporal.ZonedDateTime | Temporal.PlainDate,\n timezone?: Timezone\n): Temporal.ZonedDateTime | Temporal.PlainDate {\n if (isPlainDate(input) && timezone === undefined) {\n return input.with({ month: 1, day: 1 });\n }\n\n const zonedDateTime = normalizeWithPlainDate(input, timezone!);\n const firstDay = zonedDateTime.with({ month: 1, day: 1 });\n return firstDay.startOfDay();\n}\n"],"mappings":";;;;;;;;AAmDO,SAAS,YACd,OACA,UAC6C;AAC7C,MAAI,YAAY,KAAK,KAAK,aAAa,QAAW;AAChD,WAAO,MAAM,KAAK,EAAE,OAAO,GAAG,KAAK,EAAE,CAAC;AAAA,EACxC;AAEA,QAAM,gBAAgB,uBAAuB,OAAO,QAAS;AAC7D,QAAM,WAAW,cAAc,KAAK,EAAE,OAAO,GAAG,KAAK,EAAE,CAAC;AACxD,SAAO,SAAS,WAAW;AAC7B;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Temporal
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-R7ZCA6AQ.js";
|
|
4
4
|
|
|
5
5
|
// src/isPlainTimeEqual.ts
|
|
6
6
|
function isPlainTimeEqual(time1, time2) {
|
|
@@ -10,4 +10,4 @@ function isPlainTimeEqual(time1, time2) {
|
|
|
10
10
|
export {
|
|
11
11
|
isPlainTimeEqual
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-PURKYS5T.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTemporalInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NTMT5XGC.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-PWIEPZVO.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Temporal
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-R7ZCA6AQ.js";
|
|
4
4
|
|
|
5
5
|
// src/today.ts
|
|
6
6
|
function today(timezone) {
|
|
@@ -10,4 +10,4 @@ function today(timezone) {
|
|
|
10
10
|
export {
|
|
11
11
|
today
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-PX2I4GCF.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isAfter
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LSKER4FN.js";
|
|
4
4
|
import {
|
|
5
5
|
isBefore
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EVEMK2K2.js";
|
|
7
7
|
import {
|
|
8
8
|
normalizeTemporalInput
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NTMT5XGC.js";
|
|
10
10
|
|
|
11
11
|
// src/isWithinInterval.ts
|
|
12
12
|
function isWithinInterval(date, interval) {
|
|
@@ -19,4 +19,4 @@ function isWithinInterval(date, interval) {
|
|
|
19
19
|
export {
|
|
20
20
|
isWithinInterval
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=chunk-
|
|
22
|
+
//# sourceMappingURL=chunk-PYALKKWZ.js.map
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// src/shared/temporal.ts
|
|
2
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
2
|
+
import { Temporal as PolyfillTemporal } from "@js-temporal/polyfill";
|
|
3
|
+
var useNative = process.env.TIEMPO_TEMPORAL === "native" && "Temporal" in globalThis;
|
|
4
|
+
var Temporal = useNative ? globalThis.Temporal : PolyfillTemporal;
|
|
3
5
|
function brand(value) {
|
|
4
6
|
return typeof value === "object" && value !== null ? value[Symbol.toStringTag] : void 0;
|
|
5
7
|
}
|
|
@@ -19,4 +21,4 @@ export {
|
|
|
19
21
|
isZonedDateTime,
|
|
20
22
|
isPlainDate
|
|
21
23
|
};
|
|
22
|
-
//# sourceMappingURL=chunk-
|
|
24
|
+
//# sourceMappingURL=chunk-R7ZCA6AQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/shared/temporal.ts"],"sourcesContent":["import { Temporal as PolyfillTemporal } from \"@js-temporal/polyfill\";\n\n/**\n * @internal\n * Single source of the Temporal implementation.\n *\n * Shipping behavior is unchanged: production code always resolves to\n * `@js-temporal/polyfill`. Native-first was reverted because tiempo passes\n * caller-provided Temporal objects into static methods\n * (`Temporal.ZonedDateTime.compare`, etc.), and a native static method throws\n * (\"Must specify time zone.\") when handed an object created by a different\n * implementation. Re-enabling native-first by default requires normalizing\n * inputs into the resolved implementation at the boundary.\n *\n * For tests only, `TIEMPO_TEMPORAL` selects the implementation so the same\n * suite runs against both the polyfill and the runtime's native `Temporal`:\n * - `TIEMPO_TEMPORAL=polyfill` forces the polyfill (any Node version).\n * - `TIEMPO_TEMPORAL=native` uses `globalThis.Temporal` (Node >= 26).\n * - unset defaults to the polyfill, matching shipped behavior.\n * Tests import `Temporal` from here so both lib and test objects come from the\n * same implementation; mixing implementations triggers the revert bug above.\n *\n * Import `Temporal` from here so the implementation choice stays in one place.\n */\nconst useNative = process.env.TIEMPO_TEMPORAL === \"native\" && \"Temporal\" in globalThis;\n\nexport const Temporal = useNative\n ? (globalThis as unknown as { Temporal: typeof PolyfillTemporal }).Temporal\n : PolyfillTemporal;\n\n/**\n * @internal\n * Type-side of `Temporal`, merged with the runtime value above so a single\n * `import { Temporal } from './shared/temporal'` serves both `Temporal.from(...)`\n * (value) and `: Temporal.ZonedDateTime` (type). Types are identical across\n * implementations and erased at build, so they always come from the polyfill.\n */\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace Temporal {\n // Add new Temporal.* member types here the first time they are referenced\n // from this module. Omissions fail loudly at typecheck, never silently.\n export type Instant = PolyfillTemporal.Instant;\n export type ZonedDateTime = PolyfillTemporal.ZonedDateTime;\n export type PlainDate = PolyfillTemporal.PlainDate;\n export type PlainDateLike = PolyfillTemporal.PlainDateLike;\n export type PlainDateTime = PolyfillTemporal.PlainDateTime;\n export type PlainTime = PolyfillTemporal.PlainTime;\n export type PlainTimeLike = PolyfillTemporal.PlainTimeLike;\n export type PlainYearMonth = PolyfillTemporal.PlainYearMonth;\n}\n\n/**\n * @internal\n * Implementation-agnostic type guards. The Temporal spec requires every\n * implementation to set `Symbol.toStringTag`, so these work regardless of which\n * implementation produced the object.\n */\nfunction brand(value: unknown): string | undefined {\n return typeof value === \"object\" && value !== null\n ? (value as { [Symbol.toStringTag]?: string })[Symbol.toStringTag]\n : undefined;\n}\n\nexport function isInstant(value: unknown): value is Temporal.Instant {\n return brand(value) === \"Temporal.Instant\";\n}\n\nexport function isZonedDateTime(value: unknown): value is Temporal.ZonedDateTime {\n return brand(value) === \"Temporal.ZonedDateTime\";\n}\n\nexport function isPlainDate(value: unknown): value is Temporal.PlainDate {\n return brand(value) === \"Temporal.PlainDate\";\n}\n"],"mappings":";AAAA,SAAS,YAAY,wBAAwB;AAwB7C,IAAM,YAAY,QAAQ,IAAI,oBAAoB,YAAY,cAAc;AAErE,IAAM,WAAW,YACnB,WAAgE,WACjE;AA6BJ,SAAS,MAAM,OAAoC;AACjD,SAAO,OAAO,UAAU,YAAY,UAAU,OACzC,MAA4C,OAAO,WAAW,IAC/D;AACN;AAEO,SAAS,UAAU,OAA2C;AACnE,SAAO,MAAM,KAAK,MAAM;AAC1B;AAEO,SAAS,gBAAgB,OAAiD;AAC/E,SAAO,MAAM,KAAK,MAAM;AAC1B;AAEO,SAAS,YAAY,OAA6C;AACvE,SAAO,MAAM,KAAK,MAAM;AAC1B;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTemporalInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NTMT5XGC.js";
|
|
4
4
|
|
|
5
5
|
// src/roundToNearestSecond.ts
|
|
6
6
|
var MODE_TO_ROUNDING_MODE = {
|
|
@@ -22,4 +22,4 @@ function roundToNearestSecond(input, options) {
|
|
|
22
22
|
export {
|
|
23
23
|
roundToNearestSecond
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=chunk-
|
|
25
|
+
//# sourceMappingURL=chunk-RKEZOXD3.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isInstant
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-R7ZCA6AQ.js";
|
|
4
4
|
|
|
5
5
|
// src/toIso9075.ts
|
|
6
6
|
function toIso9075(input, options = {}) {
|
|
@@ -30,4 +30,4 @@ function pad(n) {
|
|
|
30
30
|
export {
|
|
31
31
|
toIso9075
|
|
32
32
|
};
|
|
33
|
-
//# sourceMappingURL=chunk-
|
|
33
|
+
//# sourceMappingURL=chunk-RL2NW7HP.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTemporalInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NTMT5XGC.js";
|
|
4
4
|
|
|
5
5
|
// src/isSameDay.ts
|
|
6
6
|
function isSameDay(date1, date2) {
|
|
@@ -12,4 +12,4 @@ function isSameDay(date1, date2) {
|
|
|
12
12
|
export {
|
|
13
13
|
isSameDay
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=chunk-
|
|
15
|
+
//# sourceMappingURL=chunk-RLVCSGRU.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeWithPlainDate
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZOHYNJUD.js";
|
|
4
4
|
import {
|
|
5
5
|
getEndOfDay
|
|
6
6
|
} from "./chunk-AVGNRINZ.js";
|
|
@@ -14,4 +14,4 @@ function endOfDay(input, timezone) {
|
|
|
14
14
|
export {
|
|
15
15
|
endOfDay
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=chunk-
|
|
17
|
+
//# sourceMappingURL=chunk-S7L5KBI4.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTemporalInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NTMT5XGC.js";
|
|
4
4
|
|
|
5
5
|
// src/isSameMonth.ts
|
|
6
6
|
function isSameMonth(date1, date2) {
|
|
@@ -12,4 +12,4 @@ function isSameMonth(date1, date2) {
|
|
|
12
12
|
export {
|
|
13
13
|
isSameMonth
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=chunk-
|
|
15
|
+
//# sourceMappingURL=chunk-SCD2JNY3.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTemporalInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NTMT5XGC.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-SDW4W3XE.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTemporalInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NTMT5XGC.js";
|
|
4
4
|
|
|
5
5
|
// src/isSameMillisecond.ts
|
|
6
6
|
function isSameMillisecond(date1, date2) {
|
|
@@ -12,4 +12,4 @@ function isSameMillisecond(date1, date2) {
|
|
|
12
12
|
export {
|
|
13
13
|
isSameMillisecond
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=chunk-
|
|
15
|
+
//# sourceMappingURL=chunk-T5WSO6US.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Temporal
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-R7ZCA6AQ.js";
|
|
4
4
|
|
|
5
5
|
// src/isPlainTimeAfter.ts
|
|
6
6
|
function isPlainTimeAfter(time1, time2) {
|
|
@@ -10,4 +10,4 @@ function isPlainTimeAfter(time1, time2) {
|
|
|
10
10
|
export {
|
|
11
11
|
isPlainTimeAfter
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-TQUKIG26.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
normalizeTemporalInput
|
|
3
|
+
} from "./chunk-NTMT5XGC.js";
|
|
4
|
+
import {
|
|
5
|
+
isPlainDate
|
|
6
|
+
} from "./chunk-R7ZCA6AQ.js";
|
|
7
|
+
|
|
8
|
+
// src/addQuarters.ts
|
|
9
|
+
function addQuarters(input, quarters) {
|
|
10
|
+
if (isPlainDate(input)) {
|
|
11
|
+
return input.add({ months: quarters * 3 });
|
|
12
|
+
}
|
|
13
|
+
return normalizeTemporalInput(input).add({ months: quarters * 3 });
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
addQuarters
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=chunk-UQ2F3I2S.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/addQuarters.ts"],"sourcesContent":["import type { Temporal } from \"@js-temporal/polyfill\";\nimport { isPlainDate } from \"./shared/temporal\";\nimport { normalizeTemporalInput } from \"./shared/normalizeTemporalInput\";\n\n/**\n * Adds the specified number of quarters (3-month blocks) to a datetime or date.\n *\n * Properly handles month-end dates and calendar edge cases through Temporal API.\n * Instant inputs are converted to UTC; ZonedDateTime inputs preserve their\n * timezone. PlainDate inputs stay in calendar space and return a PlainDate.\n *\n * @param input - A Temporal.Instant (UTC) or Temporal.ZonedDateTime\n * @param quarters - Number of quarters to add (can be negative to subtract)\n * @returns A ZonedDateTime (for Instant/ZonedDateTime) with the quarters added\n *\n * @example\n * ```ts\n * const instant = Temporal.Instant.from('2025-01-20T12:00:00Z');\n * addQuarters(instant, 2);\n * // 2025-07-20T12:00:00Z[UTC] (6 months later)\n * ```\n *\n * @example\n * ```ts\n * // Calendar arithmetic on a date stays a date\n * addQuarters(Temporal.PlainDate.from('2025-01-31'), 1);\n * // 2025-04-30 (Jan 31 → Apr 30)\n * ```\n */\nexport function addQuarters(\n input: Temporal.Instant | Temporal.ZonedDateTime,\n quarters: number,\n): Temporal.ZonedDateTime;\nexport function addQuarters(input: Temporal.PlainDate, quarters: number): Temporal.PlainDate;\nexport function addQuarters(\n input: Temporal.Instant | Temporal.ZonedDateTime | Temporal.PlainDate,\n quarters: number,\n): Temporal.ZonedDateTime | Temporal.PlainDate {\n if (isPlainDate(input)) {\n return input.add({ months: quarters * 3 });\n }\n return normalizeTemporalInput(input).add({ months: quarters * 3 });\n}\n"],"mappings":";;;;;;;;AAkCO,SAAS,YACd,OACA,UAC6C;AAC7C,MAAI,YAAY,KAAK,GAAG;AACtB,WAAO,MAAM,IAAI,EAAE,QAAQ,WAAW,EAAE,CAAC;AAAA,EAC3C;AACA,SAAO,uBAAuB,KAAK,EAAE,IAAI,EAAE,QAAQ,WAAW,EAAE,CAAC;AACnE;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addMicroseconds
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IAXVREU5.js";
|
|
4
4
|
|
|
5
5
|
// src/subMicroseconds.ts
|
|
6
6
|
function subMicroseconds(input, microseconds) {
|
|
@@ -10,4 +10,4 @@ function subMicroseconds(input, microseconds) {
|
|
|
10
10
|
export {
|
|
11
11
|
subMicroseconds
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-URC6AG2N.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTemporalInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NTMT5XGC.js";
|
|
4
4
|
import {
|
|
5
5
|
Temporal
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-R7ZCA6AQ.js";
|
|
7
7
|
|
|
8
8
|
// src/eachWeekOfInterval.ts
|
|
9
9
|
function eachWeekOfInterval(interval) {
|
|
@@ -27,4 +27,4 @@ function eachWeekOfInterval(interval) {
|
|
|
27
27
|
export {
|
|
28
28
|
eachWeekOfInterval
|
|
29
29
|
};
|
|
30
|
-
//# sourceMappingURL=chunk-
|
|
30
|
+
//# sourceMappingURL=chunk-UTN7ZKL4.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Temporal
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-R7ZCA6AQ.js";
|
|
4
4
|
|
|
5
5
|
// src/isPlainDateBefore.ts
|
|
6
6
|
function isPlainDateBefore(date1, date2) {
|
|
@@ -10,4 +10,4 @@ function isPlainDateBefore(date1, date2) {
|
|
|
10
10
|
export {
|
|
11
11
|
isPlainDateBefore
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-UXMNCRG7.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTemporalInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NTMT5XGC.js";
|
|
4
4
|
|
|
5
5
|
// src/differenceInNanoseconds.ts
|
|
6
6
|
function differenceInNanoseconds(laterDate, earlierDate) {
|
|
@@ -12,4 +12,4 @@ function differenceInNanoseconds(laterDate, earlierDate) {
|
|
|
12
12
|
export {
|
|
13
13
|
differenceInNanoseconds
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=chunk-
|
|
15
|
+
//# sourceMappingURL=chunk-VC7RTDJP.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeWithPlainDate
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZOHYNJUD.js";
|
|
4
4
|
|
|
5
5
|
// src/startOfDay.ts
|
|
6
6
|
function startOfDay(input, timezone) {
|
|
@@ -11,4 +11,4 @@ function startOfDay(input, timezone) {
|
|
|
11
11
|
export {
|
|
12
12
|
startOfDay
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=chunk-
|
|
14
|
+
//# sourceMappingURL=chunk-VKXN4FQD.js.map
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
|
-
Temporal
|
|
3
|
-
|
|
2
|
+
Temporal,
|
|
3
|
+
isInstant
|
|
4
|
+
} from "./chunk-R7ZCA6AQ.js";
|
|
4
5
|
|
|
5
|
-
// src/
|
|
6
|
-
function
|
|
6
|
+
// src/toInstant.ts
|
|
7
|
+
function toInstant(input) {
|
|
7
8
|
if (typeof input === "string") {
|
|
8
9
|
return Temporal.Instant.from(input);
|
|
9
10
|
}
|
|
@@ -13,10 +14,10 @@ function toUtc(input) {
|
|
|
13
14
|
if (input instanceof Date) {
|
|
14
15
|
return Temporal.Instant.from(input.toISOString());
|
|
15
16
|
}
|
|
16
|
-
return input.toInstant();
|
|
17
|
+
return isInstant(input) ? input : input.toInstant();
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
export {
|
|
20
|
-
|
|
21
|
+
toInstant
|
|
21
22
|
};
|
|
22
|
-
//# sourceMappingURL=chunk-
|
|
23
|
+
//# sourceMappingURL=chunk-VQAGV72H.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/toInstant.ts"],"sourcesContent":["import { Temporal, isInstant } from './shared/temporal';\n\n/**\n * Converts a timeline representation to a Temporal.Instant.\n *\n * Instant inputs are returned unchanged. ZonedDateTime inputs preserve their\n * exact moment while dropping timezone and calendar context.\n *\n * @param input - An Instant, ZonedDateTime, UTC ISO string, Unix timestamp, or Date\n * @returns A timezone-independent Temporal.Instant\n *\n * @example\n * ```typescript\n * const instant = toInstant('2025-01-20T20:00:00Z');\n * // 2025-01-20T20:00:00Z\n * ```\n *\n * @example\n * ```typescript\n * const zoned = Temporal.ZonedDateTime.from(\n * '2025-01-20T15:00:00-05:00[America/New_York]'\n * );\n * const instant = toInstant(zoned);\n * // 2025-01-20T20:00:00Z\n * ```\n */\nexport function toInstant(\n input: string | number | Date | Temporal.Instant | 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 isInstant(input) ? input : input.toInstant();\n}\n"],"mappings":";;;;;;AA0BO,SAAS,UACd,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,UAAU,KAAK,IAAI,QAAQ,MAAM,UAAU;AACpD;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTemporalInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NTMT5XGC.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-VQPIPLHX.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addMilliseconds
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FCJO72WG.js";
|
|
4
4
|
|
|
5
5
|
// src/subMilliseconds.ts
|
|
6
6
|
function subMilliseconds(input, milliseconds) {
|
|
@@ -10,4 +10,4 @@ function subMilliseconds(input, milliseconds) {
|
|
|
10
10
|
export {
|
|
11
11
|
subMilliseconds
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-VS2VCQLP.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTemporalInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NTMT5XGC.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-
|
|
14
|
+
//# sourceMappingURL=chunk-WGLZHBJG.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-VXOQ7IG5.js";
|
|
4
4
|
import {
|
|
5
5
|
normalizeTemporalInput
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NTMT5XGC.js";
|
|
7
7
|
|
|
8
8
|
// src/differenceInMilliseconds.ts
|
|
9
9
|
function differenceInMilliseconds2(laterDate, earlierDate) {
|
|
@@ -15,4 +15,4 @@ function differenceInMilliseconds2(laterDate, earlierDate) {
|
|
|
15
15
|
export {
|
|
16
16
|
differenceInMilliseconds2 as differenceInMilliseconds
|
|
17
17
|
};
|
|
18
|
-
//# sourceMappingURL=chunk-
|
|
18
|
+
//# sourceMappingURL=chunk-WTLAKRCT.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-VXOQ7IG5.js";
|
|
4
4
|
import {
|
|
5
5
|
normalizeTemporalInput
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NTMT5XGC.js";
|
|
7
7
|
|
|
8
8
|
// src/differenceInHours.ts
|
|
9
9
|
function differenceInHours(laterDate, earlierDate, options) {
|
|
@@ -16,4 +16,4 @@ function differenceInHours(laterDate, earlierDate, options) {
|
|
|
16
16
|
export {
|
|
17
17
|
differenceInHours
|
|
18
18
|
};
|
|
19
|
-
//# sourceMappingURL=chunk-
|
|
19
|
+
//# sourceMappingURL=chunk-X3ARINEH.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// src/shared/quarter.ts
|
|
2
|
+
function quarterOfMonth(month) {
|
|
3
|
+
return Math.floor((month - 1) / 3) + 1;
|
|
4
|
+
}
|
|
5
|
+
function quarterStartMonth(month) {
|
|
6
|
+
return Math.floor((month - 1) / 3) * 3 + 1;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export {
|
|
10
|
+
quarterOfMonth,
|
|
11
|
+
quarterStartMonth
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=chunk-XS2HUADA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/shared/quarter.ts"],"sourcesContent":["/**\n * @internal\n * Quarter math shared by the quarter family. A quarter spans 3 calendar months:\n * Q1 = Jan–Mar, Q2 = Apr–Jun, Q3 = Jul–Sep, Q4 = Oct–Dec.\n *\n * These are internal helpers - do not use directly.\n */\n\n/** The quarter (1-4) that a calendar month (1-12) belongs to. */\nexport function quarterOfMonth(month: number): 1 | 2 | 3 | 4 {\n return (Math.floor((month - 1) / 3) + 1) as 1 | 2 | 3 | 4;\n}\n\n/** The first month (1, 4, 7, or 10) of the quarter that a calendar month belongs to. */\nexport function quarterStartMonth(month: number): number {\n return Math.floor((month - 1) / 3) * 3 + 1;\n}\n"],"mappings":";AASO,SAAS,eAAe,OAA8B;AAC3D,SAAQ,KAAK,OAAO,QAAQ,KAAK,CAAC,IAAI;AACxC;AAGO,SAAS,kBAAkB,OAAuB;AACvD,SAAO,KAAK,OAAO,QAAQ,KAAK,CAAC,IAAI,IAAI;AAC3C;","names":[]}
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
Temporal,
|
|
3
3
|
isInstant,
|
|
4
4
|
isZonedDateTime
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-R7ZCA6AQ.js";
|
|
6
6
|
|
|
7
7
|
// src/simpleFormat.ts
|
|
8
8
|
function simpleFormat(input, options) {
|
|
@@ -59,4 +59,4 @@ function formatCompactTime(zdt) {
|
|
|
59
59
|
export {
|
|
60
60
|
simpleFormat
|
|
61
61
|
};
|
|
62
|
-
//# sourceMappingURL=chunk-
|
|
62
|
+
//# sourceMappingURL=chunk-XWBOD6MD.js.map
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeWithPlainDate
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZOHYNJUD.js";
|
|
4
4
|
import {
|
|
5
5
|
getEndOfDay
|
|
6
6
|
} from "./chunk-AVGNRINZ.js";
|
|
7
|
+
import {
|
|
8
|
+
isPlainDate
|
|
9
|
+
} from "./chunk-R7ZCA6AQ.js";
|
|
7
10
|
|
|
8
11
|
// src/endOfMonth.ts
|
|
9
12
|
function endOfMonth(input, timezone) {
|
|
13
|
+
if (isPlainDate(input) && timezone === void 0) {
|
|
14
|
+
return input.with({ day: input.daysInMonth });
|
|
15
|
+
}
|
|
10
16
|
const zonedDateTime = normalizeWithPlainDate(input, timezone);
|
|
11
17
|
const lastDay = zonedDateTime.with({ day: zonedDateTime.daysInMonth });
|
|
12
18
|
return getEndOfDay(lastDay);
|
|
@@ -15,4 +21,4 @@ function endOfMonth(input, timezone) {
|
|
|
15
21
|
export {
|
|
16
22
|
endOfMonth
|
|
17
23
|
};
|
|
18
|
-
//# sourceMappingURL=chunk-
|
|
24
|
+
//# sourceMappingURL=chunk-YNLBS34B.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/endOfMonth.ts"],"sourcesContent":["import { isPlainDate, Temporal } from './shared/temporal';\nimport type { Timezone } from './types';\nimport { getEndOfDay } from './shared/endOfDay';\nimport { normalizeWithPlainDate } from './shared/normalizeWithPlainDate';\n\n/**\n * Returns the last boundary of the month.\n * PlainDate inputs stay in calendar space unless a timezone is provided.\n *\n * @param input - A Temporal.Instant (UTC) or Temporal.ZonedDateTime\n * @returns ZonedDateTime at the last day of the month at 23:59:59.999999999\n *\n * @example\n * ```ts\n * // From Instant (always UTC)\n * const instant = Temporal.Instant.from('2025-01-15T12:00:00Z');\n * const end = endOfMonth(instant);\n * // 2025-01-31T23:59:59.999999999Z[UTC]\n * ```\n *\n * @example\n * ```ts\n * // From ZonedDateTime (uses its timezone)\n * const zoned = Temporal.ZonedDateTime.from('2025-02-15T15:30:00-05:00[America/New_York]');\n * const end = endOfMonth(zoned);\n * // 2025-02-28T23:59:59.999999999-05:00[America/New_York]\n * ```\n *\n * @example\n * ```ts\n * // From PlainDate (stays a date)\n * const date = Temporal.PlainDate.from('2025-02-15');\n * const end = endOfMonth(date);\n * // 2025-02-28\n * ```\n *\n * @example\n * ```ts\n * // From PlainDate with a timezone (returns a ZonedDateTime)\n * const date = Temporal.PlainDate.from('2025-02-15');\n * const end = endOfMonth(date, 'America/New_York');\n * // 2025-02-28T23:59:59.999999999-05:00[America/New_York]\n * ```\n */\nexport function endOfMonth(\n input: Temporal.Instant | Temporal.ZonedDateTime\n): Temporal.ZonedDateTime;\nexport function endOfMonth(input: Temporal.PlainDate): Temporal.PlainDate;\nexport function endOfMonth(\n input: Temporal.PlainDate,\n timezone: Timezone\n): Temporal.ZonedDateTime;\nexport function endOfMonth(\n input: Temporal.Instant | Temporal.ZonedDateTime | Temporal.PlainDate,\n timezone?: Timezone\n): Temporal.ZonedDateTime | Temporal.PlainDate {\n if (isPlainDate(input) && timezone === undefined) {\n return input.with({ day: input.daysInMonth });\n }\n\n const zonedDateTime = normalizeWithPlainDate(input, timezone!);\n const lastDay = zonedDateTime.with({ day: zonedDateTime.daysInMonth });\n return getEndOfDay(lastDay);\n}\n"],"mappings":";;;;;;;;;;;AAoDO,SAAS,WACd,OACA,UAC6C;AAC7C,MAAI,YAAY,KAAK,KAAK,aAAa,QAAW;AAChD,WAAO,MAAM,KAAK,EAAE,KAAK,MAAM,YAAY,CAAC;AAAA,EAC9C;AAEA,QAAM,gBAAgB,uBAAuB,OAAO,QAAS;AAC7D,QAAM,UAAU,cAAc,KAAK,EAAE,KAAK,cAAc,YAAY,CAAC;AACrE,SAAO,YAAY,OAAO;AAC5B;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Temporal
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-R7ZCA6AQ.js";
|
|
4
4
|
|
|
5
5
|
// src/now.ts
|
|
6
6
|
function now(timezone) {
|
|
@@ -10,4 +10,4 @@ function now(timezone) {
|
|
|
10
10
|
export {
|
|
11
11
|
now
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-YOSCEJ36.js.map
|