@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
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
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Temporal } from "@js-temporal/polyfill";
|
|
2
|
+
/**
|
|
3
|
+
* Adds the specified number of quarters (3-month blocks) to a datetime or date.
|
|
4
|
+
*
|
|
5
|
+
* Properly handles month-end dates and calendar edge cases through Temporal API.
|
|
6
|
+
* Instant inputs are converted to UTC; ZonedDateTime inputs preserve their
|
|
7
|
+
* timezone. PlainDate inputs stay in calendar space and return a PlainDate.
|
|
8
|
+
*
|
|
9
|
+
* @param input - A Temporal.Instant (UTC) or Temporal.ZonedDateTime
|
|
10
|
+
* @param quarters - Number of quarters to add (can be negative to subtract)
|
|
11
|
+
* @returns A ZonedDateTime (for Instant/ZonedDateTime) with the quarters added
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const instant = Temporal.Instant.from('2025-01-20T12:00:00Z');
|
|
16
|
+
* addQuarters(instant, 2);
|
|
17
|
+
* // 2025-07-20T12:00:00Z[UTC] (6 months later)
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* // Calendar arithmetic on a date stays a date
|
|
23
|
+
* addQuarters(Temporal.PlainDate.from('2025-01-31'), 1);
|
|
24
|
+
* // 2025-04-30 (Jan 31 → Apr 30)
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare function addQuarters(input: Temporal.Instant | Temporal.ZonedDateTime, quarters: number): Temporal.ZonedDateTime;
|
|
28
|
+
export declare function addQuarters(input: Temporal.PlainDate, quarters: number): Temporal.PlainDate;
|
|
29
|
+
//# sourceMappingURL=addQuarters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addQuarters.d.ts","sourceRoot":"","sources":["../src/addQuarters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAItD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,EAChD,QAAQ,EAAE,MAAM,GACf,QAAQ,CAAC,aAAa,CAAC;AAC1B,wBAAgB,WAAW,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,EAAE,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAAC,SAAS,CAAC"}
|
package/dist/addSeconds.js
CHANGED
package/dist/addWeeks.js
CHANGED
package/dist/addYears.js
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
quarterOfMonth
|
|
3
|
+
} from "./chunk-XS2HUADA.js";
|
|
4
|
+
import {
|
|
5
|
+
normalizeTemporalInput
|
|
6
|
+
} from "./chunk-NTMT5XGC.js";
|
|
7
|
+
import {
|
|
8
|
+
isPlainDate
|
|
9
|
+
} from "./chunk-R7ZCA6AQ.js";
|
|
10
|
+
|
|
11
|
+
// src/isSameQuarter.ts
|
|
12
|
+
function isSameQuarter(date1, date2) {
|
|
13
|
+
const a = isPlainDate(date1) ? date1 : normalizeTemporalInput(date1);
|
|
14
|
+
const b = isPlainDate(date2) ? date2 : normalizeTemporalInput(date2);
|
|
15
|
+
return a.year === b.year && quarterOfMonth(a.month) === quarterOfMonth(b.month);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
isSameQuarter
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=chunk-25CVKMFC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/isSameQuarter.ts"],"sourcesContent":["import type { Temporal } from \"@js-temporal/polyfill\";\nimport { isPlainDate } from \"./shared/temporal\";\nimport { normalizeTemporalInput } from \"./shared/normalizeTemporalInput\";\nimport { quarterOfMonth } from \"./shared/quarter\";\n\n/**\n * Returns true if both inputs fall in the same calendar quarter and year.\n *\n * Quarters: Q1 = Jan–Mar, Q2 = Apr–Jun, Q3 = Jul–Sep, Q4 = Oct–Dec.\n *\n * Instant inputs are converted to UTC; ZonedDateTime inputs keep their own\n * timezone. PlainDate inputs are compared directly — a quarter is intrinsic to\n * the calendar date, so no timezone is needed.\n *\n * @param date1 - First Instant or ZonedDateTime\n * @param date2 - Second Instant or ZonedDateTime\n * @returns true if both are in the same calendar quarter, false otherwise\n *\n * @example\n * ```ts\n * const jan = Temporal.ZonedDateTime.from('2025-01-15T08:00:00Z[UTC]');\n * const mar = Temporal.ZonedDateTime.from('2025-03-31T23:59:59Z[UTC]');\n * isSameQuarter(jan, mar); // true\n * ```\n *\n * @example\n * ```ts\n * // PlainDate comparison needs no timezone\n * const a = Temporal.PlainDate.from('2025-04-05');\n * const b = Temporal.PlainDate.from('2025-06-28');\n * isSameQuarter(a, b); // true (both Q2)\n * ```\n */\nexport function isSameQuarter(\n date1: Temporal.Instant | Temporal.ZonedDateTime,\n date2: Temporal.Instant | Temporal.ZonedDateTime,\n): boolean;\nexport function isSameQuarter(date1: Temporal.PlainDate, date2: Temporal.PlainDate): boolean;\nexport function isSameQuarter(\n date1: Temporal.Instant | Temporal.ZonedDateTime | Temporal.PlainDate,\n date2: Temporal.Instant | Temporal.ZonedDateTime | Temporal.PlainDate,\n): boolean {\n const a = isPlainDate(date1) ? date1 : normalizeTemporalInput(date1);\n const b = isPlainDate(date2) ? date2 : normalizeTemporalInput(date2);\n\n return a.year === b.year && quarterOfMonth(a.month) === quarterOfMonth(b.month);\n}\n"],"mappings":";;;;;;;;;;;AAsCO,SAAS,cACd,OACA,OACS;AACT,QAAM,IAAI,YAAY,KAAK,IAAI,QAAQ,uBAAuB,KAAK;AACnE,QAAM,IAAI,YAAY,KAAK,IAAI,QAAQ,uBAAuB,KAAK;AAEnE,SAAO,EAAE,SAAS,EAAE,QAAQ,eAAe,EAAE,KAAK,MAAM,eAAe,EAAE,KAAK;AAChF;","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/toPlainDate.ts
|
|
8
8
|
var PLAIN_DATE_PATTERN = /^\d{4}-\d{2}-\d{2}$/;
|
|
@@ -43,4 +43,4 @@ function toPlainDate(input, timezone) {
|
|
|
43
43
|
export {
|
|
44
44
|
toPlainDate
|
|
45
45
|
};
|
|
46
|
-
//# sourceMappingURL=chunk-
|
|
46
|
+
//# sourceMappingURL=chunk-2E4KCD3Y.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addMonths
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VQPIPLHX.js";
|
|
4
4
|
|
|
5
5
|
// src/subMonths.ts
|
|
6
6
|
function subMonths(input, months) {
|
|
@@ -10,4 +10,4 @@ function subMonths(input, months) {
|
|
|
10
10
|
export {
|
|
11
11
|
subMonths
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-2EFJSF2R.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/isSameNanosecond.ts
|
|
6
6
|
function isSameNanosecond(date1, date2) {
|
|
@@ -12,4 +12,4 @@ function isSameNanosecond(date1, date2) {
|
|
|
12
12
|
export {
|
|
13
13
|
isSameNanosecond
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=chunk-
|
|
15
|
+
//# sourceMappingURL=chunk-3LTTYG6N.js.map
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
plainDateToZonedDateTime
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-L5AMAEWX.js";
|
|
4
4
|
import {
|
|
5
5
|
normalizeTemporalInput
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NTMT5XGC.js";
|
|
7
7
|
import {
|
|
8
8
|
isPlainDate
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-R7ZCA6AQ.js";
|
|
10
10
|
|
|
11
11
|
// src/startOfWeek.ts
|
|
12
12
|
function startOfWeek(input, timezone) {
|
|
13
|
+
if (isPlainDate(input) && timezone === void 0) {
|
|
14
|
+
return input.subtract({ days: input.dayOfWeek - 1 });
|
|
15
|
+
}
|
|
13
16
|
const zonedDateTime = isPlainDate(input) ? plainDateToZonedDateTime(input, timezone) : normalizeTemporalInput(input);
|
|
14
17
|
const dayOfWeek = zonedDateTime.dayOfWeek;
|
|
15
18
|
const daysToSubtract = dayOfWeek - 1;
|
|
@@ -20,4 +23,4 @@ function startOfWeek(input, timezone) {
|
|
|
20
23
|
export {
|
|
21
24
|
startOfWeek
|
|
22
25
|
};
|
|
23
|
-
//# sourceMappingURL=chunk-
|
|
26
|
+
//# sourceMappingURL=chunk-3TS3D7WD.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/startOfWeek.ts"],"sourcesContent":["import { isPlainDate } from './shared/temporal';\nimport type { Temporal } from '@js-temporal/polyfill';\nimport type { Timezone } from './types';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\nimport { plainDateToZonedDateTime } from './shared/plainDateToZonedDateTime';\n\n/**\n * Returns the first boundary of the week (Monday).\n * Uses ISO 8601 week definition: weeks start on Monday.\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 Monday 00:00:00.000000000\n *\n * @example\n * ```ts\n * // From Instant (always UTC)\n * const instant = Temporal.Instant.from('2025-01-20T12:00:00Z'); // Monday\n * const start = startOfWeek(instant);\n * // 2025-01-20T00:00:00Z[UTC] (same day, it's already Monday)\n * ```\n *\n * @example\n * ```ts\n * // From ZonedDateTime (uses its timezone)\n * const zoned = Temporal.ZonedDateTime.from('2025-01-22T15:30:00-05:00[America/New_York]'); // Wednesday\n * const start = startOfWeek(zoned);\n * // 2025-01-20T00:00:00-05:00[America/New_York] (previous Monday)\n * ```\n *\n * @example\n * ```ts\n * // From PlainDate (stays a date)\n * const date = Temporal.PlainDate.from('2025-01-22'); // Wednesday\n * const start = startOfWeek(date);\n * // 2025-01-20 (previous Monday)\n * ```\n *\n * @example\n * ```ts\n * // From PlainDate with a timezone (returns a ZonedDateTime)\n * const date = Temporal.PlainDate.from('2025-01-22'); // Wednesday\n * const start = startOfWeek(date, 'America/New_York');\n * // 2025-01-20T00:00:00-05:00[America/New_York] (previous Monday)\n * ```\n */\nexport function startOfWeek(\n input: Temporal.Instant | Temporal.ZonedDateTime\n): Temporal.ZonedDateTime;\nexport function startOfWeek(input: Temporal.PlainDate): Temporal.PlainDate;\nexport function startOfWeek(\n input: Temporal.PlainDate,\n timezone: Timezone\n): Temporal.ZonedDateTime;\nexport function startOfWeek(\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.subtract({ days: input.dayOfWeek - 1 });\n }\n\n const zonedDateTime =\n isPlainDate(input)\n ? plainDateToZonedDateTime(input, timezone!)\n : normalizeTemporalInput(input);\n\n // Get the day of week (1 = Monday, 7 = Sunday in ISO 8601)\n const dayOfWeek = zonedDateTime.dayOfWeek;\n\n // Calculate days to subtract to get to Monday\n const daysToSubtract = dayOfWeek - 1;\n\n // Go to Monday, then get start of that day\n const monday = zonedDateTime.subtract({ days: daysToSubtract });\n\n return monday.startOfDay();\n}\n"],"mappings":";;;;;;;;;;;AAsDO,SAAS,YACd,OACA,UAC6C;AAC7C,MAAI,YAAY,KAAK,KAAK,aAAa,QAAW;AAChD,WAAO,MAAM,SAAS,EAAE,MAAM,MAAM,YAAY,EAAE,CAAC;AAAA,EACrD;AAEA,QAAM,gBACJ,YAAY,KAAK,IACb,yBAAyB,OAAO,QAAS,IACzC,uBAAuB,KAAK;AAGlC,QAAM,YAAY,cAAc;AAGhC,QAAM,iBAAiB,YAAY;AAGnC,QAAM,SAAS,cAAc,SAAS,EAAE,MAAM,eAAe,CAAC;AAE9D,SAAO,OAAO,WAAW;AAC3B;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTemporalInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NTMT5XGC.js";
|
|
4
4
|
|
|
5
5
|
// src/addMinutes.ts
|
|
6
6
|
function addMinutes(input, minutes) {
|
|
@@ -11,4 +11,4 @@ function addMinutes(input, minutes) {
|
|
|
11
11
|
export {
|
|
12
12
|
addMinutes
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=chunk-
|
|
14
|
+
//# sourceMappingURL=chunk-4PGGOVSG.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/eachDayOfInterval.ts
|
|
9
9
|
function eachDayOfInterval(interval) {
|
|
@@ -24,4 +24,4 @@ function eachDayOfInterval(interval) {
|
|
|
24
24
|
export {
|
|
25
25
|
eachDayOfInterval
|
|
26
26
|
};
|
|
27
|
-
//# sourceMappingURL=chunk-
|
|
27
|
+
//# sourceMappingURL=chunk-567DXBLA.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
addQuarters
|
|
3
|
+
} from "./chunk-UQ2F3I2S.js";
|
|
4
|
+
import {
|
|
5
|
+
isPlainDate
|
|
6
|
+
} from "./chunk-R7ZCA6AQ.js";
|
|
7
|
+
|
|
8
|
+
// src/subQuarters.ts
|
|
9
|
+
function subQuarters(input, quarters) {
|
|
10
|
+
return isPlainDate(input) ? addQuarters(input, -quarters) : addQuarters(input, -quarters);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
subQuarters
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=chunk-5Y5JH32Z.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/subQuarters.ts"],"sourcesContent":["import type { Temporal } from \"@js-temporal/polyfill\";\nimport { isPlainDate } from \"./shared/temporal\";\nimport { addQuarters } from \"./addQuarters\";\n\n/**\n * Subtracts the specified number of quarters (3-month blocks) from a datetime or date.\n *\n * This is a convenience wrapper around addQuarters with the count negated.\n * 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 subtract\n * @returns A ZonedDateTime (for Instant/ZonedDateTime) with the quarters subtracted\n *\n * @example\n * ```ts\n * const instant = Temporal.Instant.from('2025-07-20T12:00:00Z');\n * subQuarters(instant, 2);\n * // 2025-01-20T12:00:00Z[UTC] (6 months earlier)\n * ```\n *\n * @example\n * ```ts\n * subQuarters(Temporal.PlainDate.from('2025-07-20'), 1);\n * // 2025-04-20\n * ```\n */\nexport function subQuarters(\n input: Temporal.Instant | Temporal.ZonedDateTime,\n quarters: number,\n): Temporal.ZonedDateTime;\nexport function subQuarters(input: Temporal.PlainDate, quarters: number): Temporal.PlainDate;\nexport function subQuarters(\n input: Temporal.Instant | Temporal.ZonedDateTime | Temporal.PlainDate,\n quarters: number,\n): Temporal.ZonedDateTime | Temporal.PlainDate {\n // Branch so each call resolves to the matching addQuarters overload.\n return isPlainDate(input) ? addQuarters(input, -quarters) : addQuarters(input, -quarters);\n}\n"],"mappings":";;;;;;;;AAgCO,SAAS,YACd,OACA,UAC6C;AAE7C,SAAO,YAAY,KAAK,IAAI,YAAY,OAAO,CAAC,QAAQ,IAAI,YAAY,OAAO,CAAC,QAAQ;AAC1F;","names":[]}
|
|
@@ -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/shared/nowZoned.ts
|
|
9
9
|
function nowZoned() {
|
|
@@ -13,4 +13,4 @@ function nowZoned() {
|
|
|
13
13
|
export {
|
|
14
14
|
nowZoned
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=chunk-
|
|
16
|
+
//# sourceMappingURL=chunk-6RETOV6A.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/roundToNearestHour.ts
|
|
6
6
|
var MODE_TO_ROUNDING_MODE = {
|
|
@@ -22,4 +22,4 @@ function roundToNearestHour(input, options) {
|
|
|
22
22
|
export {
|
|
23
23
|
roundToNearestHour
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=chunk-
|
|
25
|
+
//# sourceMappingURL=chunk-6UMISP3B.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/addYears.ts
|
|
6
6
|
function addYears(input, years) {
|
|
@@ -11,4 +11,4 @@ function addYears(input, years) {
|
|
|
11
11
|
export {
|
|
12
12
|
addYears
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=chunk-
|
|
14
|
+
//# sourceMappingURL=chunk-6YU6BQOZ.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isAfter
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LSKER4FN.js";
|
|
4
4
|
import {
|
|
5
5
|
normalizeTemporalInput
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NTMT5XGC.js";
|
|
7
7
|
|
|
8
8
|
// src/isAfter.ts
|
|
9
9
|
function isAfter2(date1, date2) {
|
|
@@ -15,4 +15,4 @@ function isAfter2(date1, date2) {
|
|
|
15
15
|
export {
|
|
16
16
|
isAfter2 as isAfter
|
|
17
17
|
};
|
|
18
|
-
//# sourceMappingURL=chunk-
|
|
18
|
+
//# sourceMappingURL=chunk-7K5BJ6F7.js.map
|
|
@@ -1,12 +1,19 @@
|
|
|
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/endOfYear.ts
|
|
9
12
|
function endOfYear(input, timezone) {
|
|
13
|
+
if (isPlainDate(input) && timezone === void 0) {
|
|
14
|
+
const lastMonth2 = input.with({ month: input.monthsInYear });
|
|
15
|
+
return lastMonth2.with({ day: lastMonth2.daysInMonth });
|
|
16
|
+
}
|
|
10
17
|
const zonedDateTime = normalizeWithPlainDate(input, timezone);
|
|
11
18
|
const lastMonth = zonedDateTime.with({ month: zonedDateTime.monthsInYear });
|
|
12
19
|
const lastDay = lastMonth.with({ day: lastMonth.daysInMonth });
|
|
@@ -16,4 +23,4 @@ function endOfYear(input, timezone) {
|
|
|
16
23
|
export {
|
|
17
24
|
endOfYear
|
|
18
25
|
};
|
|
19
|
-
//# sourceMappingURL=chunk-
|
|
26
|
+
//# sourceMappingURL=chunk-7OEGJCW7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/endOfYear.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 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 the last day of the year at 23:59:59.999999999\n *\n * @example\n * ```ts\n * // From Instant (always UTC)\n * const instant = Temporal.Instant.from('2025-06-15T12:00:00Z');\n * const end = endOfYear(instant);\n * // 2025-12-31T23:59:59.999999999Z[UTC]\n * ```\n *\n * @example\n * ```ts\n * // From ZonedDateTime (uses its timezone)\n * const zoned = Temporal.ZonedDateTime.from('2025-06-15T15:30:00-05:00[America/New_York]');\n * const end = endOfYear(zoned);\n * // 2025-12-31T23:59:59.999999999-05:00[America/New_York]\n * ```\n *\n * @example\n * ```ts\n * // From PlainDate (stays a date)\n * const date = Temporal.PlainDate.from('2025-06-15');\n * const end = endOfYear(date);\n * // 2025-12-31\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 end = endOfYear(date, 'America/New_York');\n * // 2025-12-31T23:59:59.999999999-05:00[America/New_York]\n * ```\n */\nexport function endOfYear(\n input: Temporal.Instant | Temporal.ZonedDateTime\n): Temporal.ZonedDateTime;\nexport function endOfYear(input: Temporal.PlainDate): Temporal.PlainDate;\nexport function endOfYear(\n input: Temporal.PlainDate,\n timezone: Timezone\n): Temporal.ZonedDateTime;\nexport function endOfYear(\n input: Temporal.Instant | Temporal.ZonedDateTime | Temporal.PlainDate,\n timezone?: Timezone\n): Temporal.ZonedDateTime | Temporal.PlainDate {\n if (isPlainDate(input) && timezone === undefined) {\n const lastMonth = input.with({ month: input.monthsInYear });\n return lastMonth.with({ day: lastMonth.daysInMonth });\n }\n\n const zonedDateTime = normalizeWithPlainDate(input, timezone!);\n const lastMonth = zonedDateTime.with({ month: zonedDateTime.monthsInYear });\n const lastDay = lastMonth.with({ day: lastMonth.daysInMonth });\n return getEndOfDay(lastDay);\n}\n"],"mappings":";;;;;;;;;;;AAoDO,SAAS,UACd,OACA,UAC6C;AAC7C,MAAI,YAAY,KAAK,KAAK,aAAa,QAAW;AAChD,UAAMA,aAAY,MAAM,KAAK,EAAE,OAAO,MAAM,aAAa,CAAC;AAC1D,WAAOA,WAAU,KAAK,EAAE,KAAKA,WAAU,YAAY,CAAC;AAAA,EACtD;AAEA,QAAM,gBAAgB,uBAAuB,OAAO,QAAS;AAC7D,QAAM,YAAY,cAAc,KAAK,EAAE,OAAO,cAAc,aAAa,CAAC;AAC1E,QAAM,UAAU,UAAU,KAAK,EAAE,KAAK,UAAU,YAAY,CAAC;AAC7D,SAAO,YAAY,OAAO;AAC5B;","names":["lastMonth"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {
|
|
2
|
+
quarterStartMonth
|
|
3
|
+
} from "./chunk-XS2HUADA.js";
|
|
4
|
+
import {
|
|
5
|
+
normalizeWithPlainDate
|
|
6
|
+
} from "./chunk-ZOHYNJUD.js";
|
|
7
|
+
import {
|
|
8
|
+
isPlainDate
|
|
9
|
+
} from "./chunk-R7ZCA6AQ.js";
|
|
10
|
+
|
|
11
|
+
// src/startOfQuarter.ts
|
|
12
|
+
function startOfQuarter(input, timezone) {
|
|
13
|
+
if (isPlainDate(input) && timezone === void 0) {
|
|
14
|
+
return input.with({ month: quarterStartMonth(input.month), day: 1 });
|
|
15
|
+
}
|
|
16
|
+
const zonedDateTime = normalizeWithPlainDate(input, timezone);
|
|
17
|
+
const firstDay = zonedDateTime.with({
|
|
18
|
+
month: quarterStartMonth(zonedDateTime.month),
|
|
19
|
+
day: 1
|
|
20
|
+
});
|
|
21
|
+
return firstDay.startOfDay();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export {
|
|
25
|
+
startOfQuarter
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=chunk-7SCQV77A.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/startOfQuarter.ts"],"sourcesContent":["import { isPlainDate } from \"./shared/temporal\";\nimport type { Temporal } from \"@js-temporal/polyfill\";\nimport type { Timezone } from \"./types\";\nimport { normalizeWithPlainDate } from \"./shared/normalizeWithPlainDate\";\nimport { quarterStartMonth } from \"./shared/quarter\";\n\n/**\n * Returns a ZonedDateTime representing the first moment of the quarter\n * (first day of the quarter's starting month at midnight).\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 1st day of the quarter at 00:00:00.000000000\n *\n * @example\n * ```ts\n * // From Instant (always UTC)\n * const instant = Temporal.Instant.from('2025-05-15T12:00:00Z');\n * const start = startOfQuarter(instant);\n * // 2025-04-01T00:00:00Z[UTC]\n * ```\n *\n * @example\n * ```ts\n * // From ZonedDateTime (uses its timezone)\n * const zoned = Temporal.ZonedDateTime.from('2025-08-15T15:30:00-05:00[America/New_York]');\n * const start = startOfQuarter(zoned);\n * // 2025-07-01T00:00:00-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 start = startOfQuarter(date, 'America/New_York');\n * // 2025-10-01T00:00:00-04:00[America/New_York]\n * ```\n */\nexport function startOfQuarter(\n input: Temporal.Instant | Temporal.ZonedDateTime,\n): Temporal.ZonedDateTime;\nexport function startOfQuarter(input: Temporal.PlainDate): Temporal.PlainDate;\nexport function startOfQuarter(\n input: Temporal.PlainDate,\n timezone: Timezone,\n): Temporal.ZonedDateTime;\nexport function startOfQuarter(\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 → first day of quarter.\n if (isPlainDate(input) && timezone === undefined) {\n return input.with({ month: quarterStartMonth(input.month), day: 1 });\n }\n const zonedDateTime = normalizeWithPlainDate(input, timezone!);\n const firstDay = zonedDateTime.with({\n month: quarterStartMonth(zonedDateTime.month),\n day: 1,\n });\n return firstDay.startOfDay();\n}\n"],"mappings":";;;;;;;;;;;AA+CO,SAAS,eACd,OACA,UAC6C;AAE7C,MAAI,YAAY,KAAK,KAAK,aAAa,QAAW;AAChD,WAAO,MAAM,KAAK,EAAE,OAAO,kBAAkB,MAAM,KAAK,GAAG,KAAK,EAAE,CAAC;AAAA,EACrE;AACA,QAAM,gBAAgB,uBAAuB,OAAO,QAAS;AAC7D,QAAM,WAAW,cAAc,KAAK;AAAA,IAClC,OAAO,kBAAkB,cAAc,KAAK;AAAA,IAC5C,KAAK;AAAA,EACP,CAAC;AACD,SAAO,SAAS,WAAW;AAC7B;","names":[]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isBefore
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EVEMK2K2.js";
|
|
4
4
|
import {
|
|
5
5
|
nowZoned
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6RETOV6A.js";
|
|
7
7
|
import {
|
|
8
8
|
normalizeTemporalInput
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NTMT5XGC.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-A42NID5P.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
|
isInstant
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-R7ZCA6AQ.js";
|
|
7
7
|
|
|
8
8
|
// src/format.ts
|
|
9
9
|
function format(input, formatStr, options = {}) {
|
|
@@ -339,4 +339,4 @@ function isAm(period) {
|
|
|
339
339
|
export {
|
|
340
340
|
format
|
|
341
341
|
};
|
|
342
|
-
//# sourceMappingURL=chunk-
|
|
342
|
+
//# sourceMappingURL=chunk-BEGD73DT.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addNanoseconds
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WGLZHBJG.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-BTXU3OGV.js.map
|
|
@@ -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/startOfMonth.ts
|
|
6
9
|
function startOfMonth(input, timezone) {
|
|
10
|
+
if (isPlainDate(input) && timezone === void 0) {
|
|
11
|
+
return input.with({ day: 1 });
|
|
12
|
+
}
|
|
7
13
|
const zonedDateTime = normalizeWithPlainDate(input, timezone);
|
|
8
14
|
const firstDay = zonedDateTime.with({ day: 1 });
|
|
9
15
|
return firstDay.startOfDay();
|
|
@@ -12,4 +18,4 @@ function startOfMonth(input, timezone) {
|
|
|
12
18
|
export {
|
|
13
19
|
startOfMonth
|
|
14
20
|
};
|
|
15
|
-
//# sourceMappingURL=chunk-
|
|
21
|
+
//# sourceMappingURL=chunk-BV32K227.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/startOfMonth.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 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 1st day of the month at 00:00:00.000000000\n *\n * @example\n * ```ts\n * // From Instant (always UTC)\n * const instant = Temporal.Instant.from('2025-01-15T12:00:00Z');\n * const start = startOfMonth(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-01-15T15:30:00-05:00[America/New_York]');\n * const start = startOfMonth(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-01-15');\n * const start = startOfMonth(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-01-15');\n * const start = startOfMonth(date, 'America/New_York');\n * // 2025-01-01T00:00:00-05:00[America/New_York]\n * ```\n */\nexport function startOfMonth(\n input: Temporal.Instant | Temporal.ZonedDateTime\n): Temporal.ZonedDateTime;\nexport function startOfMonth(input: Temporal.PlainDate): Temporal.PlainDate;\nexport function startOfMonth(\n input: Temporal.PlainDate,\n timezone: Timezone\n): Temporal.ZonedDateTime;\nexport function startOfMonth(\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: 1 });\n }\n\n const zonedDateTime = normalizeWithPlainDate(input, timezone!);\n const firstDay = zonedDateTime.with({ day: 1 });\n return firstDay.startOfDay();\n}\n"],"mappings":";;;;;;;;AAmDO,SAAS,aACd,OACA,UAC6C;AAC7C,MAAI,YAAY,KAAK,KAAK,aAAa,QAAW;AAChD,WAAO,MAAM,KAAK,EAAE,KAAK,EAAE,CAAC;AAAA,EAC9B;AAEA,QAAM,gBAAgB,uBAAuB,OAAO,QAAS;AAC7D,QAAM,WAAW,cAAc,KAAK,EAAE,KAAK,EAAE,CAAC;AAC9C,SAAO,SAAS,WAAW;AAC7B;","names":[]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isAfter
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LSKER4FN.js";
|
|
4
4
|
import {
|
|
5
5
|
nowZoned
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6RETOV6A.js";
|
|
7
7
|
import {
|
|
8
8
|
normalizeTemporalInput
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NTMT5XGC.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-CCVPCHUO.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/differenceInMonths.ts
|
|
6
6
|
function differenceInMonths(laterDate, earlierDate, options) {
|
|
@@ -14,4 +14,4 @@ function differenceInMonths(laterDate, earlierDate, options) {
|
|
|
14
14
|
export {
|
|
15
15
|
differenceInMonths
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=chunk-
|
|
17
|
+
//# sourceMappingURL=chunk-CIA46DWB.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/isSameSecond.ts
|
|
6
6
|
function isSameSecond(date1, date2) {
|
|
@@ -12,4 +12,4 @@ function isSameSecond(date1, date2) {
|
|
|
12
12
|
export {
|
|
13
13
|
isSameSecond
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=chunk-
|
|
15
|
+
//# sourceMappingURL=chunk-CSOSM46M.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/differenceInMicroseconds.ts
|
|
6
6
|
function differenceInMicroseconds(laterDate, earlierDate) {
|
|
@@ -13,4 +13,4 @@ function differenceInMicroseconds(laterDate, earlierDate) {
|
|
|
13
13
|
export {
|
|
14
14
|
differenceInMicroseconds
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=chunk-
|
|
16
|
+
//# sourceMappingURL=chunk-DBVGH55Z.js.map
|