@gobrand/tiempo 3.2.0 → 3.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -8
- package/dist/addBusinessDays.js +4 -4
- 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 +1 -1
- package/dist/addQuarters.js +3 -3
- package/dist/addSeconds.js +3 -3
- package/dist/addWeeks.js +3 -3
- package/dist/addYears.js +3 -3
- package/dist/areIntervalsOverlapping.js +3 -3
- package/dist/{chunk-CN3OICYB.js → chunk-2LXWY2VY.js} +2 -2
- package/dist/{chunk-K3L6MJJB.js → chunk-2MWQYQ53.js} +2 -2
- package/dist/{chunk-LRIVI5ZC.js → chunk-34UWPATE.js} +2 -2
- package/dist/{chunk-QVSHSIA3.js → chunk-3OF6TFYK.js} +2 -2
- package/dist/{chunk-4KAIF44F.js → chunk-3YNUMQFB.js} +3 -3
- package/dist/{chunk-DZ3647ZK.js → chunk-4A3ORKMC.js} +3 -3
- package/dist/{chunk-Y24VUXMX.js → chunk-4JCRRIM3.js} +3 -3
- package/dist/{chunk-Y24VUXMX.js.map → chunk-4JCRRIM3.js.map} +1 -1
- package/dist/{chunk-IXNGK5OF.js → chunk-5EX3GTEU.js} +2 -2
- package/dist/{chunk-KTMCYEU5.js → chunk-5GRUOAYD.js} +2 -2
- package/dist/{chunk-KTMCYEU5.js.map → chunk-5GRUOAYD.js.map} +1 -1
- package/dist/{chunk-KZCSP3DU.js → chunk-5YKAVRED.js} +3 -3
- package/dist/{chunk-KYS54PLJ.js → chunk-6M654ZYJ.js} +3 -3
- package/dist/chunk-6M654ZYJ.js.map +1 -0
- package/dist/{chunk-DRBZDI52.js → chunk-6O66POF3.js} +2 -2
- package/dist/{chunk-U7VOIXLY.js → chunk-6SEPAWIA.js} +2 -2
- package/dist/{chunk-X27XGVCT.js → chunk-7DVEJNCP.js} +2 -2
- package/dist/{chunk-OF5YEVUT.js → chunk-7J7N4PCE.js} +2 -2
- package/dist/{chunk-OF5YEVUT.js.map → chunk-7J7N4PCE.js.map} +1 -1
- package/dist/{chunk-C7QA4J6V.js → chunk-7NHKDMBY.js} +2 -2
- package/dist/{chunk-NMMMAMKP.js → chunk-7WGGUDW4.js} +1 -1
- package/dist/chunk-7WGGUDW4.js.map +1 -0
- package/dist/{chunk-DGUAV5XN.js → chunk-7ZJIEKIZ.js} +2 -2
- package/dist/chunk-7ZJIEKIZ.js.map +1 -0
- package/dist/{chunk-7IKCDOCT.js → chunk-AEAZ2F2T.js} +2 -2
- package/dist/{chunk-3HD7HEN4.js → chunk-APWSLQ47.js} +4 -4
- package/dist/{chunk-DYIISNVW.js → chunk-AWERPSJ5.js} +5 -5
- package/dist/{chunk-32AWWYBF.js → chunk-B7RDUXDN.js} +2 -2
- package/dist/{chunk-LQ3EQYIX.js → chunk-BE7CIKP7.js} +14 -6
- package/dist/chunk-BE7CIKP7.js.map +1 -0
- package/dist/{chunk-BI42E23Z.js → chunk-BM4OZR7U.js} +4 -4
- package/dist/{chunk-BI42E23Z.js.map → chunk-BM4OZR7U.js.map} +1 -1
- package/dist/{chunk-4FQCY75E.js → chunk-C4LUGHIM.js} +4 -4
- package/dist/chunk-C4LUGHIM.js.map +1 -0
- package/dist/{chunk-3S6TSXZ3.js → chunk-CCDDXIAC.js} +2 -2
- package/dist/{chunk-BMX7CIRD.js → chunk-CMOBOTVN.js} +1 -1
- package/dist/chunk-CMOBOTVN.js.map +1 -0
- package/dist/{chunk-7NGP7SAD.js → chunk-COQJXPPT.js} +5 -5
- package/dist/{chunk-7NGP7SAD.js.map → chunk-COQJXPPT.js.map} +1 -1
- package/dist/{chunk-SLH6TKGN.js → chunk-CX37IV4D.js} +3 -3
- package/dist/{chunk-HYSGJJUR.js → chunk-D2HKS2OM.js} +2 -2
- package/dist/{chunk-4GEF7B7W.js → chunk-D73HU7YA.js} +3 -3
- package/dist/{chunk-OMYVTYHI.js → chunk-DAWWOF5W.js} +2 -2
- package/dist/{chunk-GOJ45AG7.js → chunk-DCQCZCKG.js} +4 -4
- package/dist/{chunk-5WHGX2J3.js → chunk-DEVXW65H.js} +2 -2
- package/dist/{chunk-R6D3Y5NV.js → chunk-DFVLLH5O.js} +2 -2
- package/dist/{chunk-ZM32S3YU.js → chunk-DYDSR35L.js} +2 -2
- package/dist/{chunk-ZM32S3YU.js.map → chunk-DYDSR35L.js.map} +1 -1
- package/dist/{chunk-QNZJR53W.js → chunk-DZFUKW5U.js} +4 -4
- package/dist/{chunk-QNZJR53W.js.map → chunk-DZFUKW5U.js.map} +1 -1
- package/dist/{chunk-F3UZDWOQ.js → chunk-EMJXV6KH.js} +2 -2
- package/dist/{chunk-F3UZDWOQ.js.map → chunk-EMJXV6KH.js.map} +1 -1
- package/dist/{chunk-DVZDJ5LM.js → chunk-EMLUESE5.js} +5 -5
- package/dist/{chunk-QDY2KMYX.js → chunk-EQ3AZDKF.js} +3 -3
- package/dist/chunk-EQ3AZDKF.js.map +1 -0
- package/dist/{chunk-GQXJICRA.js → chunk-EWRNJC27.js} +2 -2
- package/dist/{chunk-TD6MVGV2.js → chunk-EYTJNGGV.js} +2 -2
- package/dist/{chunk-HCVE7FSF.js → chunk-FS7VH6AY.js} +2 -2
- package/dist/{chunk-HCVE7FSF.js.map → chunk-FS7VH6AY.js.map} +1 -1
- package/dist/{chunk-IWVSM77B.js → chunk-FTXHKXCS.js} +2 -2
- package/dist/{chunk-WTLMIOKZ.js → chunk-G7X7NHPV.js} +6 -3
- package/dist/{chunk-WTLMIOKZ.js.map → chunk-G7X7NHPV.js.map} +1 -1
- package/dist/{chunk-3HF4F36S.js → chunk-GLKCUJIZ.js} +3 -3
- package/dist/{chunk-GXSVYUCG.js → chunk-GZKKAIXF.js} +2 -2
- package/dist/{chunk-CDKIT7D3.js → chunk-H5TI3O4P.js} +1 -1
- package/dist/chunk-H5TI3O4P.js.map +1 -0
- package/dist/{chunk-TU3LNQKW.js → chunk-HMPHUFC6.js} +3 -3
- package/dist/{chunk-4VWUTQKP.js → chunk-HQ7JUUWD.js} +9 -5
- package/dist/chunk-HQ7JUUWD.js.map +1 -0
- package/dist/{chunk-H43LMOCK.js → chunk-HXB6CDB4.js} +3 -3
- package/dist/{chunk-SHKSAHJO.js → chunk-IOHTFQCP.js} +2 -2
- package/dist/{chunk-7PH5BPMS.js → chunk-IXRFVP3X.js} +2 -2
- package/dist/{chunk-XSHFR2SX.js → chunk-IZPKAMAP.js} +2 -2
- package/dist/{chunk-3XGUCQ2A.js → chunk-JBGAF2FW.js} +2 -2
- package/dist/{chunk-6UBFKQIJ.js → chunk-JDKM6JTT.js} +2 -2
- package/dist/{chunk-ADPVFELS.js → chunk-K6IGDI5W.js} +2 -2
- package/dist/{chunk-ADPVFELS.js.map → chunk-K6IGDI5W.js.map} +1 -1
- package/dist/{chunk-AUOZACFS.js → chunk-KISBF5GX.js} +2 -2
- package/dist/{chunk-67XABEBT.js → chunk-KUDGVLQT.js} +11 -6
- package/dist/{chunk-67XABEBT.js.map → chunk-KUDGVLQT.js.map} +1 -1
- package/dist/{chunk-ZXKU4SKR.js → chunk-L535UIYN.js} +3 -3
- package/dist/{chunk-TIZJRCAA.js → chunk-L7X3FQZI.js} +2 -2
- package/dist/{chunk-TIZJRCAA.js.map → chunk-L7X3FQZI.js.map} +1 -1
- package/dist/{chunk-YMJHVVM4.js → chunk-LJMPJUHN.js} +2 -2
- package/dist/{chunk-NL5MQVGD.js → chunk-LKDENGBC.js} +2 -2
- package/dist/{chunk-A34P5Z5O.js → chunk-LL7XWZGU.js} +2 -2
- package/dist/chunk-LL7XWZGU.js.map +1 -0
- package/dist/{chunk-VDV24TWQ.js → chunk-LTYIPGQD.js} +2 -2
- package/dist/{chunk-JA5ER27P.js → chunk-LXAT3CDM.js} +2 -2
- package/dist/chunk-LXAT3CDM.js.map +1 -0
- package/dist/{chunk-MVGBYHG5.js → chunk-LY7IXVZO.js} +3 -3
- package/dist/{chunk-EBOLL4LY.js → chunk-M2QFNUJF.js} +2 -2
- package/dist/{chunk-BSVOJYJ7.js → chunk-M4ESIRFH.js} +1 -1
- package/dist/chunk-M4ESIRFH.js.map +1 -0
- package/dist/{chunk-RDMDCTHJ.js → chunk-MLD3VIOP.js} +2 -2
- package/dist/{chunk-2LT2XOAL.js → chunk-MPJ6UOLX.js} +4 -4
- package/dist/{chunk-2LT2XOAL.js.map → chunk-MPJ6UOLX.js.map} +1 -1
- package/dist/{chunk-JGPTGV5X.js → chunk-MRJNMV4A.js} +3 -3
- package/dist/{chunk-PLPGYCQQ.js → chunk-MYCH45BC.js} +4 -4
- package/dist/{chunk-XMEPH226.js → chunk-MZ26BHHP.js} +3 -3
- package/dist/{chunk-EH4GVGXD.js → chunk-N5YFRFLA.js} +2 -2
- package/dist/{chunk-EH4GVGXD.js.map → chunk-N5YFRFLA.js.map} +1 -1
- package/dist/{chunk-ZNRTNR2Q.js → chunk-OJIV6AKO.js} +3 -3
- package/dist/chunk-OJIV6AKO.js.map +1 -0
- package/dist/{chunk-DBOIK3XA.js → chunk-ONTXMGEZ.js} +2 -2
- package/dist/{chunk-YKXRVQ4S.js → chunk-OURPZP7V.js} +2 -2
- package/dist/{chunk-MWUVGTKC.js → chunk-OZ5APQB7.js} +5 -5
- package/dist/{chunk-OOOVMKOG.js → chunk-PCYPESIN.js} +2 -2
- package/dist/{chunk-NZLRMN35.js → chunk-PENSGCVW.js} +2 -2
- package/dist/{chunk-6XEHR3MG.js → chunk-PI3QU5U5.js} +2 -2
- package/dist/{chunk-6XEHR3MG.js.map → chunk-PI3QU5U5.js.map} +1 -1
- package/dist/{chunk-42IFQS4W.js → chunk-PJABNMRI.js} +3 -3
- package/dist/{chunk-3OOGJRXH.js → chunk-POCGMXLO.js} +2 -2
- package/dist/{chunk-VM2YJ5PN.js → chunk-PXKPP6C4.js} +2 -2
- package/dist/{chunk-HCORON7B.js → chunk-Q6MDBQRJ.js} +4 -4
- package/dist/{chunk-HCORON7B.js.map → chunk-Q6MDBQRJ.js.map} +1 -1
- package/dist/{chunk-TCB3IDJM.js → chunk-QCIY5PSJ.js} +4 -4
- package/dist/{chunk-LXOLIOAD.js → chunk-QF4M4T6G.js} +14 -6
- package/dist/{chunk-LXOLIOAD.js.map → chunk-QF4M4T6G.js.map} +1 -1
- package/dist/{chunk-4YCEFGZA.js → chunk-QFQHFBN4.js} +3 -3
- package/dist/{chunk-ZW32E6EJ.js → chunk-QKIREPRK.js} +9 -9
- package/dist/{chunk-ZW32E6EJ.js.map → chunk-QKIREPRK.js.map} +1 -1
- package/dist/{chunk-LMOAA73F.js → chunk-QPE2V3MY.js} +3 -3
- package/dist/{chunk-2AID4P2C.js → chunk-R6CQ6XSS.js} +2 -2
- package/dist/{chunk-2AID4P2C.js.map → chunk-R6CQ6XSS.js.map} +1 -1
- package/dist/{chunk-6QH4NCPA.js → chunk-RCX6YW4I.js} +2 -2
- package/dist/{chunk-EAO2SO4N.js → chunk-RFUXK65B.js} +2 -2
- package/dist/{chunk-OMUK2MOH.js → chunk-RMVIA3NK.js} +2 -2
- package/dist/{chunk-2JXI3CAL.js → chunk-S5CDK44R.js} +4 -4
- package/dist/{chunk-GU3CZAIN.js → chunk-SKHUBXIN.js} +2 -2
- package/dist/{chunk-KZYWHHAQ.js → chunk-SURP2NUP.js} +2 -2
- package/dist/{chunk-IDB3R3G5.js → chunk-TH6YVPP4.js} +3 -3
- package/dist/{chunk-V2NSN6ET.js → chunk-TP3VDQLF.js} +2 -2
- package/dist/{chunk-3X2U6I44.js → chunk-TZ4NUY3W.js} +3 -3
- package/dist/{chunk-6QOLNYFY.js → chunk-UB3F342R.js} +2 -2
- package/dist/chunk-UB3F342R.js.map +1 -0
- package/dist/{chunk-YSDLXJHE.js → chunk-UIOLC7XM.js} +2 -2
- package/dist/{chunk-PAM6VJQM.js → chunk-UP5M7NHW.js} +3 -3
- package/dist/chunk-UP5M7NHW.js.map +1 -0
- package/dist/{chunk-IIEHQPKE.js → chunk-UPWUAGEV.js} +6 -6
- package/dist/{chunk-TI6WBLCB.js → chunk-UQ5GR6IX.js} +2 -2
- package/dist/{chunk-Q6QLOUXJ.js → chunk-UTM7YAT4.js} +2 -2
- package/dist/{chunk-HT6L4VRQ.js → chunk-UYHQBNQ4.js} +2 -2
- package/dist/{chunk-HT6L4VRQ.js.map → chunk-UYHQBNQ4.js.map} +1 -1
- package/dist/{chunk-R5XRTUWH.js → chunk-VQFWMNZO.js} +2 -2
- package/dist/{chunk-R2DCUSBY.js → chunk-WALS2M6Z.js} +2 -2
- package/dist/{chunk-K6NQZIAW.js → chunk-WTZ4LRQT.js} +2 -2
- package/dist/{chunk-3D4YR2SR.js → chunk-WVBZIXQP.js} +3 -3
- package/dist/{chunk-3D4YR2SR.js.map → chunk-WVBZIXQP.js.map} +1 -1
- package/dist/{chunk-525OLFRD.js → chunk-WWCLSC2B.js} +3 -3
- package/dist/chunk-WWCLSC2B.js.map +1 -0
- package/dist/{chunk-U6VFT2A5.js → chunk-X4ULMQ53.js} +2 -2
- package/dist/{chunk-OEPVYNB6.js → chunk-XD4JKMGT.js} +2 -2
- package/dist/{chunk-K7SY2MAX.js → chunk-XEAP4MXS.js} +3 -3
- package/dist/{chunk-BPMS34GV.js → chunk-XKS2HTEX.js} +3 -3
- package/dist/chunk-XKS2HTEX.js.map +1 -0
- package/dist/{chunk-TWXUGWYX.js → chunk-YN3Z5H5O.js} +1 -1
- package/dist/chunk-YN3Z5H5O.js.map +1 -0
- package/dist/{chunk-QZ6WXAUO.js → chunk-YPAI5UGF.js} +2 -2
- package/dist/{chunk-HRCTWTP3.js → chunk-YSUNJQBP.js} +3 -3
- package/dist/{chunk-NOWUJERX.js → chunk-Z7C5ZNPZ.js} +3 -3
- package/dist/{chunk-NOWUJERX.js.map → chunk-Z7C5ZNPZ.js.map} +1 -1
- package/dist/{chunk-QJYU5TLL.js → chunk-ZBNR46A5.js} +2 -2
- package/dist/{chunk-QJYU5TLL.js.map → chunk-ZBNR46A5.js.map} +1 -1
- package/dist/{chunk-JQ4Z4JTW.js → chunk-ZMAMJNWT.js} +2 -2
- package/dist/{chunk-NVFFQJEW.js → chunk-ZVAPV5JP.js} +4 -4
- package/dist/{chunk-NVFFQJEW.js.map → chunk-ZVAPV5JP.js.map} +1 -1
- package/dist/clamp.js +3 -3
- package/dist/closestTo.js +3 -3
- package/dist/compareAsc.js +3 -3
- package/dist/compareDesc.js +3 -3
- package/dist/differenceInBusinessDays.js +4 -4
- package/dist/differenceInCalendarDays.js +4 -4
- package/dist/differenceInCalendarMonths.js +4 -4
- package/dist/differenceInCalendarQuarters.js +4 -4
- package/dist/differenceInCalendarWeeks.js +4 -4
- package/dist/differenceInCalendarYears.js +4 -4
- package/dist/differenceInDays.js +3 -3
- package/dist/differenceInHours.js +3 -3
- package/dist/differenceInMicroseconds.js +3 -3
- package/dist/differenceInMilliseconds.js +3 -3
- package/dist/differenceInMinutes.js +3 -3
- package/dist/differenceInMonths.js +3 -3
- package/dist/differenceInNanoseconds.js +3 -3
- package/dist/differenceInQuarters.d.ts +2 -2
- package/dist/differenceInQuarters.js +4 -4
- package/dist/differenceInSeconds.js +3 -3
- package/dist/differenceInWeeks.js +3 -3
- package/dist/differenceInYears.js +3 -3
- package/dist/eachDayOfInterval.js +4 -4
- package/dist/eachHourOfInterval.d.ts.map +1 -1
- package/dist/eachHourOfInterval.js +3 -3
- package/dist/eachMinuteOfInterval.js +3 -3
- package/dist/eachMonthOfInterval.js +5 -5
- package/dist/eachQuarterOfInterval.d.ts +1 -1
- package/dist/eachQuarterOfInterval.js +4 -4
- package/dist/eachWeekOfInterval.js +5 -5
- package/dist/eachYearOfInterval.js +5 -5
- package/dist/endOfDay.d.ts.map +1 -1
- package/dist/endOfDay.js +6 -6
- package/dist/endOfMonth.d.ts.map +1 -1
- package/dist/endOfMonth.js +6 -6
- package/dist/endOfQuarter.d.ts +2 -2
- package/dist/endOfQuarter.js +6 -6
- package/dist/endOfWeek.js +5 -5
- package/dist/endOfYear.d.ts.map +1 -1
- package/dist/endOfYear.js +6 -6
- package/dist/format.js +4 -4
- package/dist/formatPlainDate.js +2 -2
- package/dist/getQuarter.d.ts +1 -1
- package/dist/getQuarter.js +3 -3
- package/dist/index.d.ts +116 -116
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +124 -124
- package/dist/intlFormatDistance.js +10 -10
- package/dist/isAfter.js +3 -3
- package/dist/isBefore.js +3 -3
- package/dist/isEqual.js +3 -3
- package/dist/isFuture.d.ts.map +1 -1
- package/dist/isFuture.js +5 -5
- package/dist/isPast.d.ts.map +1 -1
- package/dist/isPast.js +5 -5
- package/dist/isPlainDateAfter.d.ts.map +1 -1
- package/dist/isPlainDateAfter.js +2 -2
- package/dist/isPlainDateBefore.d.ts.map +1 -1
- package/dist/isPlainDateBefore.js +2 -2
- package/dist/isPlainDateEqual.d.ts.map +1 -1
- package/dist/isPlainDateEqual.js +2 -2
- package/dist/isPlainTimeAfter.d.ts.map +1 -1
- package/dist/isPlainTimeAfter.js +2 -2
- package/dist/isPlainTimeBefore.d.ts.map +1 -1
- package/dist/isPlainTimeBefore.js +2 -2
- package/dist/isPlainTimeEqual.d.ts.map +1 -1
- package/dist/isPlainTimeEqual.js +2 -2
- package/dist/isSameDay.d.ts.map +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 +1 -1
- package/dist/isSameQuarter.js +3 -3
- package/dist/isSameSecond.js +3 -3
- package/dist/isSameWeek.js +3 -3
- package/dist/isSameYear.js +3 -3
- package/dist/isToday.js +6 -6
- package/dist/isTomorrow.js +6 -6
- package/dist/isWeekend.js +4 -4
- package/dist/isWithinInterval.js +6 -6
- package/dist/isYesterday.js +6 -6
- package/dist/max.js +3 -3
- package/dist/min.js +3 -3
- package/dist/nextDay.js +3 -3
- package/dist/now.js +2 -2
- package/dist/parse.js +2 -2
- package/dist/previousDay.js +3 -3
- package/dist/roundToNearestHour.js +3 -3
- package/dist/roundToNearestMinute.js +3 -3
- package/dist/roundToNearestSecond.js +3 -3
- package/dist/shared/businessDays.js +3 -3
- package/dist/shared/calendarDates.js +3 -3
- package/dist/shared/compare.js +2 -2
- package/dist/shared/differenceInMilliseconds.js +1 -1
- package/dist/shared/endOfDay.d.ts.map +1 -1
- package/dist/shared/endOfDay.js +1 -1
- package/dist/shared/isAfter.d.ts.map +1 -1
- package/dist/shared/isAfter.js +1 -1
- package/dist/shared/isBefore.d.ts.map +1 -1
- package/dist/shared/isBefore.js +1 -1
- package/dist/shared/normalizeTemporalInput.js +2 -2
- package/dist/shared/normalizeWithPlainDate.js +4 -4
- package/dist/shared/nowZoned.js +3 -3
- package/dist/shared/plainDateToZonedDateTime.js +2 -2
- package/dist/shared/relativeDay.js +5 -5
- package/dist/shared/temporal.d.ts +1 -1
- package/dist/shared/temporal.js +1 -1
- package/dist/simpleFormat.d.ts.map +1 -1
- package/dist/simpleFormat.js +2 -2
- package/dist/startOfDay.d.ts.map +1 -1
- package/dist/startOfDay.js +5 -5
- package/dist/startOfMonth.d.ts.map +1 -1
- package/dist/startOfMonth.js +5 -5
- package/dist/startOfQuarter.d.ts +2 -2
- package/dist/startOfQuarter.js +5 -5
- package/dist/startOfWeek.js +4 -4
- package/dist/startOfYear.d.ts.map +1 -1
- package/dist/startOfYear.js +5 -5
- package/dist/subBusinessDays.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 +1 -1
- package/dist/subQuarters.js +4 -4
- package/dist/subSeconds.js +4 -4
- package/dist/subWeeks.js +4 -4
- package/dist/subYears.js +4 -4
- package/dist/toDate.d.ts.map +1 -1
- package/dist/toDate.js +2 -2
- package/dist/toInstant.js +2 -2
- package/dist/toIso.d.ts.map +1 -1
- package/dist/toIso.js +2 -2
- package/dist/toIso9075.d.ts.map +1 -1
- package/dist/toIso9075.js +2 -2
- package/dist/toPlainDate.js +2 -2
- package/dist/toPlainTime.js +2 -2
- package/dist/toZonedTime.js +2 -2
- package/dist/today.js +2 -2
- package/package.json +48 -26
- package/dist/chunk-4FQCY75E.js.map +0 -1
- package/dist/chunk-4VWUTQKP.js.map +0 -1
- package/dist/chunk-525OLFRD.js.map +0 -1
- package/dist/chunk-6QOLNYFY.js.map +0 -1
- package/dist/chunk-A34P5Z5O.js.map +0 -1
- package/dist/chunk-BMX7CIRD.js.map +0 -1
- package/dist/chunk-BPMS34GV.js.map +0 -1
- package/dist/chunk-BSVOJYJ7.js.map +0 -1
- package/dist/chunk-CDKIT7D3.js.map +0 -1
- package/dist/chunk-DGUAV5XN.js.map +0 -1
- package/dist/chunk-JA5ER27P.js.map +0 -1
- package/dist/chunk-KYS54PLJ.js.map +0 -1
- package/dist/chunk-LQ3EQYIX.js.map +0 -1
- package/dist/chunk-NMMMAMKP.js.map +0 -1
- package/dist/chunk-PAM6VJQM.js.map +0 -1
- package/dist/chunk-QDY2KMYX.js.map +0 -1
- package/dist/chunk-TWXUGWYX.js.map +0 -1
- package/dist/chunk-ZNRTNR2Q.js.map +0 -1
- /package/dist/{chunk-CN3OICYB.js.map → chunk-2LXWY2VY.js.map} +0 -0
- /package/dist/{chunk-K3L6MJJB.js.map → chunk-2MWQYQ53.js.map} +0 -0
- /package/dist/{chunk-LRIVI5ZC.js.map → chunk-34UWPATE.js.map} +0 -0
- /package/dist/{chunk-QVSHSIA3.js.map → chunk-3OF6TFYK.js.map} +0 -0
- /package/dist/{chunk-4KAIF44F.js.map → chunk-3YNUMQFB.js.map} +0 -0
- /package/dist/{chunk-DZ3647ZK.js.map → chunk-4A3ORKMC.js.map} +0 -0
- /package/dist/{chunk-IXNGK5OF.js.map → chunk-5EX3GTEU.js.map} +0 -0
- /package/dist/{chunk-KZCSP3DU.js.map → chunk-5YKAVRED.js.map} +0 -0
- /package/dist/{chunk-DRBZDI52.js.map → chunk-6O66POF3.js.map} +0 -0
- /package/dist/{chunk-U7VOIXLY.js.map → chunk-6SEPAWIA.js.map} +0 -0
- /package/dist/{chunk-X27XGVCT.js.map → chunk-7DVEJNCP.js.map} +0 -0
- /package/dist/{chunk-C7QA4J6V.js.map → chunk-7NHKDMBY.js.map} +0 -0
- /package/dist/{chunk-7IKCDOCT.js.map → chunk-AEAZ2F2T.js.map} +0 -0
- /package/dist/{chunk-3HD7HEN4.js.map → chunk-APWSLQ47.js.map} +0 -0
- /package/dist/{chunk-DYIISNVW.js.map → chunk-AWERPSJ5.js.map} +0 -0
- /package/dist/{chunk-32AWWYBF.js.map → chunk-B7RDUXDN.js.map} +0 -0
- /package/dist/{chunk-3S6TSXZ3.js.map → chunk-CCDDXIAC.js.map} +0 -0
- /package/dist/{chunk-SLH6TKGN.js.map → chunk-CX37IV4D.js.map} +0 -0
- /package/dist/{chunk-HYSGJJUR.js.map → chunk-D2HKS2OM.js.map} +0 -0
- /package/dist/{chunk-4GEF7B7W.js.map → chunk-D73HU7YA.js.map} +0 -0
- /package/dist/{chunk-OMYVTYHI.js.map → chunk-DAWWOF5W.js.map} +0 -0
- /package/dist/{chunk-GOJ45AG7.js.map → chunk-DCQCZCKG.js.map} +0 -0
- /package/dist/{chunk-5WHGX2J3.js.map → chunk-DEVXW65H.js.map} +0 -0
- /package/dist/{chunk-R6D3Y5NV.js.map → chunk-DFVLLH5O.js.map} +0 -0
- /package/dist/{chunk-DVZDJ5LM.js.map → chunk-EMLUESE5.js.map} +0 -0
- /package/dist/{chunk-GQXJICRA.js.map → chunk-EWRNJC27.js.map} +0 -0
- /package/dist/{chunk-TD6MVGV2.js.map → chunk-EYTJNGGV.js.map} +0 -0
- /package/dist/{chunk-IWVSM77B.js.map → chunk-FTXHKXCS.js.map} +0 -0
- /package/dist/{chunk-3HF4F36S.js.map → chunk-GLKCUJIZ.js.map} +0 -0
- /package/dist/{chunk-GXSVYUCG.js.map → chunk-GZKKAIXF.js.map} +0 -0
- /package/dist/{chunk-TU3LNQKW.js.map → chunk-HMPHUFC6.js.map} +0 -0
- /package/dist/{chunk-H43LMOCK.js.map → chunk-HXB6CDB4.js.map} +0 -0
- /package/dist/{chunk-SHKSAHJO.js.map → chunk-IOHTFQCP.js.map} +0 -0
- /package/dist/{chunk-7PH5BPMS.js.map → chunk-IXRFVP3X.js.map} +0 -0
- /package/dist/{chunk-XSHFR2SX.js.map → chunk-IZPKAMAP.js.map} +0 -0
- /package/dist/{chunk-3XGUCQ2A.js.map → chunk-JBGAF2FW.js.map} +0 -0
- /package/dist/{chunk-6UBFKQIJ.js.map → chunk-JDKM6JTT.js.map} +0 -0
- /package/dist/{chunk-AUOZACFS.js.map → chunk-KISBF5GX.js.map} +0 -0
- /package/dist/{chunk-ZXKU4SKR.js.map → chunk-L535UIYN.js.map} +0 -0
- /package/dist/{chunk-YMJHVVM4.js.map → chunk-LJMPJUHN.js.map} +0 -0
- /package/dist/{chunk-NL5MQVGD.js.map → chunk-LKDENGBC.js.map} +0 -0
- /package/dist/{chunk-VDV24TWQ.js.map → chunk-LTYIPGQD.js.map} +0 -0
- /package/dist/{chunk-MVGBYHG5.js.map → chunk-LY7IXVZO.js.map} +0 -0
- /package/dist/{chunk-EBOLL4LY.js.map → chunk-M2QFNUJF.js.map} +0 -0
- /package/dist/{chunk-RDMDCTHJ.js.map → chunk-MLD3VIOP.js.map} +0 -0
- /package/dist/{chunk-JGPTGV5X.js.map → chunk-MRJNMV4A.js.map} +0 -0
- /package/dist/{chunk-PLPGYCQQ.js.map → chunk-MYCH45BC.js.map} +0 -0
- /package/dist/{chunk-XMEPH226.js.map → chunk-MZ26BHHP.js.map} +0 -0
- /package/dist/{chunk-DBOIK3XA.js.map → chunk-ONTXMGEZ.js.map} +0 -0
- /package/dist/{chunk-YKXRVQ4S.js.map → chunk-OURPZP7V.js.map} +0 -0
- /package/dist/{chunk-MWUVGTKC.js.map → chunk-OZ5APQB7.js.map} +0 -0
- /package/dist/{chunk-OOOVMKOG.js.map → chunk-PCYPESIN.js.map} +0 -0
- /package/dist/{chunk-NZLRMN35.js.map → chunk-PENSGCVW.js.map} +0 -0
- /package/dist/{chunk-42IFQS4W.js.map → chunk-PJABNMRI.js.map} +0 -0
- /package/dist/{chunk-3OOGJRXH.js.map → chunk-POCGMXLO.js.map} +0 -0
- /package/dist/{chunk-VM2YJ5PN.js.map → chunk-PXKPP6C4.js.map} +0 -0
- /package/dist/{chunk-TCB3IDJM.js.map → chunk-QCIY5PSJ.js.map} +0 -0
- /package/dist/{chunk-4YCEFGZA.js.map → chunk-QFQHFBN4.js.map} +0 -0
- /package/dist/{chunk-LMOAA73F.js.map → chunk-QPE2V3MY.js.map} +0 -0
- /package/dist/{chunk-6QH4NCPA.js.map → chunk-RCX6YW4I.js.map} +0 -0
- /package/dist/{chunk-EAO2SO4N.js.map → chunk-RFUXK65B.js.map} +0 -0
- /package/dist/{chunk-OMUK2MOH.js.map → chunk-RMVIA3NK.js.map} +0 -0
- /package/dist/{chunk-2JXI3CAL.js.map → chunk-S5CDK44R.js.map} +0 -0
- /package/dist/{chunk-GU3CZAIN.js.map → chunk-SKHUBXIN.js.map} +0 -0
- /package/dist/{chunk-KZYWHHAQ.js.map → chunk-SURP2NUP.js.map} +0 -0
- /package/dist/{chunk-IDB3R3G5.js.map → chunk-TH6YVPP4.js.map} +0 -0
- /package/dist/{chunk-V2NSN6ET.js.map → chunk-TP3VDQLF.js.map} +0 -0
- /package/dist/{chunk-3X2U6I44.js.map → chunk-TZ4NUY3W.js.map} +0 -0
- /package/dist/{chunk-YSDLXJHE.js.map → chunk-UIOLC7XM.js.map} +0 -0
- /package/dist/{chunk-IIEHQPKE.js.map → chunk-UPWUAGEV.js.map} +0 -0
- /package/dist/{chunk-TI6WBLCB.js.map → chunk-UQ5GR6IX.js.map} +0 -0
- /package/dist/{chunk-Q6QLOUXJ.js.map → chunk-UTM7YAT4.js.map} +0 -0
- /package/dist/{chunk-R5XRTUWH.js.map → chunk-VQFWMNZO.js.map} +0 -0
- /package/dist/{chunk-R2DCUSBY.js.map → chunk-WALS2M6Z.js.map} +0 -0
- /package/dist/{chunk-K6NQZIAW.js.map → chunk-WTZ4LRQT.js.map} +0 -0
- /package/dist/{chunk-U6VFT2A5.js.map → chunk-X4ULMQ53.js.map} +0 -0
- /package/dist/{chunk-OEPVYNB6.js.map → chunk-XD4JKMGT.js.map} +0 -0
- /package/dist/{chunk-K7SY2MAX.js.map → chunk-XEAP4MXS.js.map} +0 -0
- /package/dist/{chunk-QZ6WXAUO.js.map → chunk-YPAI5UGF.js.map} +0 -0
- /package/dist/{chunk-HRCTWTP3.js.map → chunk-YSUNJQBP.js.map} +0 -0
- /package/dist/{chunk-JQ4Z4JTW.js.map → chunk-ZMAMJNWT.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Temporal
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-M4ESIRFH.js";
|
|
4
4
|
|
|
5
5
|
// src/shared/plainDateToZonedDateTime.ts
|
|
6
6
|
function plainDateToZonedDateTime(date, timezone) {
|
|
@@ -13,4 +13,4 @@ function plainDateToZonedDateTime(date, timezone) {
|
|
|
13
13
|
export {
|
|
14
14
|
plainDateToZonedDateTime
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=chunk-
|
|
16
|
+
//# sourceMappingURL=chunk-R6CQ6XSS.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/shared/plainDateToZonedDateTime.ts"],"sourcesContent":["import { Temporal } from './temporal';\nimport type { Timezone } from '../types';\n\n/**\n * @internal\n * Converts a PlainDate to a ZonedDateTime at midnight in the specified timezone.\n * This is an internal helper - do not use directly.\n */\nexport function plainDateToZonedDateTime(\n date: Temporal.PlainDate,\n timezone: Timezone\n): Temporal.ZonedDateTime {\n return date.toZonedDateTime({\n timeZone: timezone,\n plainTime: Temporal.PlainTime.from('00:00')
|
|
1
|
+
{"version":3,"sources":["../src/shared/plainDateToZonedDateTime.ts"],"sourcesContent":["import { Temporal } from './temporal';\nimport type { Timezone } from '../types';\n\n/**\n * @internal\n * Converts a PlainDate to a ZonedDateTime at midnight in the specified timezone.\n * This is an internal helper - do not use directly.\n */\nexport function plainDateToZonedDateTime(\n date: Temporal.PlainDate,\n timezone: Timezone\n): Temporal.ZonedDateTime {\n return date.toZonedDateTime({\n timeZone: timezone,\n plainTime: Temporal.PlainTime.from('00:00')\n });\n}\n"],"mappings":";;;;;AAQO,SAAS,yBACd,MACA,UACwB;AACxB,SAAO,KAAK,gBAAgB;AAAA,IAC1B,UAAU;AAAA,IACV,WAAW,SAAS,UAAU,KAAK,OAAO;AAAA,EAC5C,CAAC;AACH;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addMilliseconds
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KISBF5GX.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-RCX6YW4I.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addMinutes
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GZKKAIXF.js";
|
|
4
4
|
|
|
5
5
|
// src/subMinutes.ts
|
|
6
6
|
function subMinutes(input, minutes) {
|
|
@@ -10,4 +10,4 @@ function subMinutes(input, minutes) {
|
|
|
10
10
|
export {
|
|
11
11
|
subMinutes
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-RFUXK65B.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-XS2HUADA.js";
|
|
4
4
|
import {
|
|
5
5
|
calendarDates
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HXB6CDB4.js";
|
|
7
7
|
|
|
8
8
|
// src/differenceInCalendarQuarters.ts
|
|
9
9
|
function differenceInCalendarQuarters(laterDate, earlierDate) {
|
|
@@ -16,4 +16,4 @@ function differenceInCalendarQuarters(laterDate, earlierDate) {
|
|
|
16
16
|
export {
|
|
17
17
|
differenceInCalendarQuarters
|
|
18
18
|
};
|
|
19
|
-
//# sourceMappingURL=chunk-
|
|
19
|
+
//# sourceMappingURL=chunk-RMVIA3NK.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addBusinessDaysSkipping
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QFQHFBN4.js";
|
|
4
4
|
import {
|
|
5
5
|
normalizeTemporalInput
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UTM7YAT4.js";
|
|
7
7
|
import {
|
|
8
8
|
isPlainDate
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-M4ESIRFH.js";
|
|
10
10
|
|
|
11
11
|
// src/addBusinessDays.ts
|
|
12
12
|
function addBusinessDays(input, days, holidays = []) {
|
|
@@ -19,4 +19,4 @@ function addBusinessDays(input, days, holidays = []) {
|
|
|
19
19
|
export {
|
|
20
20
|
addBusinessDays
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=chunk-
|
|
22
|
+
//# sourceMappingURL=chunk-S5CDK44R.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTemporalInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UTM7YAT4.js";
|
|
4
4
|
|
|
5
5
|
// src/differenceInHours.ts
|
|
6
6
|
function differenceInHours(laterDate, earlierDate, options) {
|
|
@@ -13,4 +13,4 @@ function differenceInHours(laterDate, earlierDate, options) {
|
|
|
13
13
|
export {
|
|
14
14
|
differenceInHours
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=chunk-
|
|
16
|
+
//# sourceMappingURL=chunk-SKHUBXIN.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-M2XB72L5.js";
|
|
4
4
|
import {
|
|
5
5
|
calendarDates
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HXB6CDB4.js";
|
|
7
7
|
|
|
8
8
|
// src/differenceInCalendarWeeks.ts
|
|
9
9
|
function differenceInCalendarWeeks(laterDate, earlierDate, options) {
|
|
@@ -16,4 +16,4 @@ function differenceInCalendarWeeks(laterDate, earlierDate, options) {
|
|
|
16
16
|
export {
|
|
17
17
|
differenceInCalendarWeeks
|
|
18
18
|
};
|
|
19
|
-
//# sourceMappingURL=chunk-
|
|
19
|
+
//# sourceMappingURL=chunk-SURP2NUP.js.map
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-M2XB72L5.js";
|
|
4
4
|
import {
|
|
5
5
|
normalizeTemporalInput
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UTM7YAT4.js";
|
|
7
7
|
import {
|
|
8
8
|
isPlainDate
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-M4ESIRFH.js";
|
|
10
10
|
|
|
11
11
|
// src/nextDay.ts
|
|
12
12
|
function nextDay(input, day) {
|
|
@@ -18,4 +18,4 @@ function nextDay(input, day) {
|
|
|
18
18
|
export {
|
|
19
19
|
nextDay
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=chunk-
|
|
21
|
+
//# sourceMappingURL=chunk-TH6YVPP4.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compare
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DAWWOF5W.js";
|
|
4
4
|
|
|
5
5
|
// src/isEqual.ts
|
|
6
6
|
function isEqual(date1, date2) {
|
|
@@ -10,4 +10,4 @@ function isEqual(date1, date2) {
|
|
|
10
10
|
export {
|
|
11
11
|
isEqual
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-TP3VDQLF.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTemporalInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UTM7YAT4.js";
|
|
4
4
|
import {
|
|
5
5
|
isPlainDate
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-M4ESIRFH.js";
|
|
7
7
|
|
|
8
8
|
// src/addWeeks.ts
|
|
9
9
|
function addWeeks(input, weeks) {
|
|
@@ -16,4 +16,4 @@ function addWeeks(input, weeks) {
|
|
|
16
16
|
export {
|
|
17
17
|
addWeeks
|
|
18
18
|
};
|
|
19
|
-
//# sourceMappingURL=chunk-
|
|
19
|
+
//# sourceMappingURL=chunk-TZ4NUY3W.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTemporalInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UTM7YAT4.js";
|
|
4
4
|
|
|
5
5
|
// src/roundToNearestMinute.ts
|
|
6
6
|
var MODE_TO_ROUNDING_MODE = {
|
|
@@ -22,4 +22,4 @@ function roundToNearestMinute(input, options) {
|
|
|
22
22
|
export {
|
|
23
23
|
roundToNearestMinute
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=chunk-
|
|
25
|
+
//# sourceMappingURL=chunk-UB3F342R.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/roundToNearestMinute.ts"],"sourcesContent":["import type { Temporal } from './shared/temporal';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\n\n/**\n * Options for rounding to nearest minute.\n */\nexport interface RoundToNearestMinuteOptions {\n /**\n * The rounding mode to use.\n *\n * Given time 14:37:20:\n * - `'round'` → 14:37 (20 sec < 30, rounds DOWN to nearest)\n * - `'ceil'` → 14:38 (always rounds UP to next minute)\n * - `'floor'` → 14:37 (always rounds DOWN to current minute)\n *\n * Given time 14:37:00 with nearestTo: 15:\n * - `'round'` → 14:30 (37 is closer to 30 than 45)\n * - `'ceil'` → 14:45 (always rounds UP to next 15-min slot)\n * - `'floor'` → 14:30 (always rounds DOWN to current 15-min slot)\n *\n * @default 'round'\n */\n mode?: 'round' | 'ceil' | 'floor';\n /**\n * Round to the nearest N minutes. Must divide evenly into 60.\n * Valid values: 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30\n * @example nearestTo: 15 rounds to quarter-hour marks (00, 15, 30, 45)\n */\n nearestTo?: 1 | 2 | 3 | 4 | 5 | 6 | 10 | 12 | 15 | 20 | 30;\n}\n\nconst MODE_TO_ROUNDING_MODE = {\n round: 'halfExpand',\n ceil: 'ceil',\n floor: 'floor'\n} as const;\n\n/**\n * Rounds a datetime to the nearest minute boundary.\n *\n * ## Mode comparison (given 14:37 with 15-min slots)\n *\n * ```\n * 14:30 ─────────●───────────────────── 14:45\n * 14:37\n *\n * 'round' → 14:30 (nearest slot - 37 is closer to 30 than 45)\n * 'ceil' → 14:45 (next slot - always up)\n * 'floor' → 14:30 (current slot - always down)\n * ```\n *\n * @param input - A Temporal.Instant (UTC) or Temporal.ZonedDateTime\n * @param options - Rounding options\n * @returns ZonedDateTime rounded to the minute boundary\n *\n * @example\n * ```ts\n * // 15-minute booking slots at 14:37\n * const time = Temporal.ZonedDateTime.from('2025-01-20T14:37:00[America/New_York]');\n *\n * roundToNearestMinute(time, { nearestTo: 15 }); // → 14:30 (nearest)\n * roundToNearestMinute(time, { mode: 'ceil', nearestTo: 15 }); // → 14:45 (next slot)\n * roundToNearestMinute(time, { mode: 'floor', nearestTo: 15 }); // → 14:30 (current slot)\n * ```\n *\n * @example\n * ```ts\n * // Basic minute rounding (no slots)\n * const time = Temporal.ZonedDateTime.from('2025-01-20T14:37:42[America/New_York]');\n *\n * roundToNearestMinute(time); // → 14:38 (42 sec >= 30)\n * roundToNearestMinute(time, { mode: 'ceil' }); // → 14:38 (always up)\n * roundToNearestMinute(time, { mode: 'floor' }); // → 14:37 (always down)\n * ```\n *\n * @example\n * ```ts\n * // Billing: round up to 30-minute increments\n * const sessionEnd = Temporal.ZonedDateTime.from('2025-01-20T11:07:00[America/New_York]');\n * roundToNearestMinute(sessionEnd, { mode: 'ceil', nearestTo: 30 });\n * // → 11:30 (bill for 30 mins even though session was 7 mins)\n * ```\n */\nexport function roundToNearestMinute(\n input: Temporal.Instant | Temporal.ZonedDateTime,\n options?: RoundToNearestMinuteOptions\n): Temporal.ZonedDateTime {\n const zonedDateTime = normalizeTemporalInput(input);\n const mode = options?.mode ?? 'round';\n const nearestTo = options?.nearestTo ?? 1;\n\n return zonedDateTime.round({\n smallestUnit: 'minute',\n roundingMode: MODE_TO_ROUNDING_MODE[mode],\n roundingIncrement: nearestTo\n });\n}\n"],"mappings":";;;;;AA+BA,IAAM,wBAAwB;AAAA,EAC5B,OAAO;AAAA,EACP,MAAM;AAAA,EACN,OAAO;AACT;AAgDO,SAAS,qBACd,OACA,SACwB;AACxB,QAAM,gBAAgB,uBAAuB,KAAK;AAClD,QAAM,OAAO,SAAS,QAAQ;AAC9B,QAAM,YAAY,SAAS,aAAa;AAExC,SAAO,cAAc,MAAM;AAAA,IACzB,cAAc;AAAA,IACd,cAAc,sBAAsB,IAAI;AAAA,IACxC,mBAAmB;AAAA,EACrB,CAAC;AACH;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compare
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DAWWOF5W.js";
|
|
4
4
|
|
|
5
5
|
// src/min.ts
|
|
6
6
|
function min(values) {
|
|
@@ -13,4 +13,4 @@ function min(values) {
|
|
|
13
13
|
export {
|
|
14
14
|
min
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=chunk-
|
|
16
|
+
//# sourceMappingURL=chunk-UIOLC7XM.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
differenceInMonths
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5YKAVRED.js";
|
|
4
4
|
import {
|
|
5
5
|
isPlainDate
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-M4ESIRFH.js";
|
|
7
7
|
|
|
8
8
|
// src/differenceInQuarters.ts
|
|
9
9
|
function differenceInQuarters(laterDate, earlierDate, options) {
|
|
@@ -22,4 +22,4 @@ function differenceInQuarters(laterDate, earlierDate, options) {
|
|
|
22
22
|
export {
|
|
23
23
|
differenceInQuarters
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=chunk-
|
|
25
|
+
//# sourceMappingURL=chunk-UP5M7NHW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/differenceInQuarters.ts"],"sourcesContent":["import { type Temporal, isPlainDate } from './shared/temporal';\nimport { differenceInMonths } from './differenceInMonths';\nimport type { DifferenceOptions } from './shared/differenceOptions';\n\n/**\n * Returns the number of quarters (3-month blocks) between two datetimes or dates.\n * The result is positive if laterDate is after earlierDate, negative if before.\n *\n * Uses calendar-aware, elapsed-time calculation (a quarter is three months).\n * Instant inputs are converted to UTC; ZonedDateTime inputs keep their timezone.\n * PlainDate inputs are compared directly — no timezone needed.\n *\n * @param laterDate - The later Instant or ZonedDateTime\n * @param earlierDate - The earlier Instant or ZonedDateTime\n * @param options - Optional { fractional } to return the precise value\n * @returns The number of quarters, truncated toward zero (pass { fractional: true } for the precise value)\n *\n * @example\n * ```ts\n * const later = Temporal.Instant.from('2025-07-20T12:00:00Z');\n * const earlier = Temporal.Instant.from('2025-01-20T12:00:00Z');\n * differenceInQuarters(later, earlier); // 2\n * ```\n *\n * @example\n * ```ts\n * // PlainDate comparison needs no timezone\n * const later = Temporal.PlainDate.from('2025-07-20');\n * const earlier = Temporal.PlainDate.from('2025-01-20');\n * differenceInQuarters(later, earlier); // 2\n * ```\n */\nexport function differenceInQuarters(\n laterDate: Temporal.Instant | Temporal.ZonedDateTime,\n earlierDate: Temporal.Instant | Temporal.ZonedDateTime,\n options?: DifferenceOptions\n): number;\nexport function differenceInQuarters(\n laterDate: Temporal.PlainDate,\n earlierDate: Temporal.PlainDate,\n options?: DifferenceOptions\n): number;\nexport function differenceInQuarters(\n laterDate: Temporal.Instant | Temporal.ZonedDateTime | Temporal.PlainDate,\n earlierDate: Temporal.Instant | Temporal.ZonedDateTime | Temporal.PlainDate,\n options?: DifferenceOptions\n): number {\n // A quarter is three months, so work in elapsed months and divide by 3.\n // Serialize the other date to preserve its calendar across implementations.\n const months =\n isPlainDate(laterDate) && isPlainDate(earlierDate)\n ? earlierDate.until(laterDate.toString()).total({\n unit: 'months',\n relativeTo: earlierDate\n })\n : differenceInMonths(\n laterDate as Temporal.Instant | Temporal.ZonedDateTime,\n earlierDate as Temporal.Instant | Temporal.ZonedDateTime,\n { fractional: true }\n );\n\n const quarters = months / 3;\n return options?.fractional ? quarters : Math.trunc(quarters);\n}\n"],"mappings":";;;;;;;;AA0CO,SAAS,qBACd,WACA,aACA,SACQ;AAGR,QAAM,SACJ,YAAY,SAAS,KAAK,YAAY,WAAW,IAC7C,YAAY,MAAM,UAAU,SAAS,CAAC,EAAE,MAAM;AAAA,IAC5C,MAAM;AAAA,IACN,YAAY;AAAA,EACd,CAAC,IACD;AAAA,IACE;AAAA,IACA;AAAA,IACA,EAAE,YAAY,KAAK;AAAA,EACrB;AAEN,QAAM,WAAW,SAAS;AAC1B,SAAO,SAAS,aAAa,WAAW,KAAK,MAAM,QAAQ;AAC7D;","names":[]}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isBefore
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CMOBOTVN.js";
|
|
4
4
|
import {
|
|
5
5
|
isAfter
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-H5TI3O4P.js";
|
|
7
7
|
import {
|
|
8
8
|
compare
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DAWWOF5W.js";
|
|
10
10
|
import {
|
|
11
11
|
normalizeTemporalInput
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-UTM7YAT4.js";
|
|
13
13
|
import {
|
|
14
14
|
isPlainDate,
|
|
15
15
|
isPlainTime
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-M4ESIRFH.js";
|
|
17
17
|
|
|
18
18
|
// src/isWithinInterval.ts
|
|
19
19
|
function isWithinInterval(date, interval) {
|
|
@@ -33,4 +33,4 @@ function isWithinInterval(date, interval) {
|
|
|
33
33
|
export {
|
|
34
34
|
isWithinInterval
|
|
35
35
|
};
|
|
36
|
-
//# sourceMappingURL=chunk-
|
|
36
|
+
//# sourceMappingURL=chunk-UPWUAGEV.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTemporalInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UTM7YAT4.js";
|
|
4
4
|
|
|
5
5
|
// src/addMicroseconds.ts
|
|
6
6
|
function addMicroseconds(input, microseconds) {
|
|
@@ -11,4 +11,4 @@ function addMicroseconds(input, microseconds) {
|
|
|
11
11
|
export {
|
|
12
12
|
addMicroseconds
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=chunk-
|
|
14
|
+
//# sourceMappingURL=chunk-UQ5GR6IX.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isInstant,
|
|
3
3
|
isZonedDateTime
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-M4ESIRFH.js";
|
|
5
5
|
|
|
6
6
|
// src/shared/normalizeTemporalInput.ts
|
|
7
7
|
function normalizeTemporalInput(input) {
|
|
@@ -15,4 +15,4 @@ function normalizeTemporalInput(input) {
|
|
|
15
15
|
export {
|
|
16
16
|
normalizeTemporalInput
|
|
17
17
|
};
|
|
18
|
-
//# sourceMappingURL=chunk-
|
|
18
|
+
//# sourceMappingURL=chunk-UTM7YAT4.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isInstant
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-M4ESIRFH.js";
|
|
4
4
|
|
|
5
5
|
// src/toDate.ts
|
|
6
6
|
function toDate(input) {
|
|
@@ -13,4 +13,4 @@ function toDate(input) {
|
|
|
13
13
|
export {
|
|
14
14
|
toDate
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=chunk-
|
|
16
|
+
//# sourceMappingURL=chunk-UYHQBNQ4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/toDate.ts"],"sourcesContent":["import { type Temporal, isInstant } from './shared/temporal';\n\n/**\n * Convert a Temporal.Instant or ZonedDateTime to a Date object.\n *\n * @param input - A Temporal.Instant or Temporal.ZonedDateTime\n * @returns A Date object representing the same moment in time\n *\n * @example\n * ```typescript\n * // From Instant\n * const instant = Temporal.Instant.from(\"2025-01-20T20:00:00Z\");\n * const date = toDate(instant);\n * // date.toISOString() === \"2025-01-20T20:00:00.000Z\"\n *\n * // From ZonedDateTime\n * const zoned = Temporal.ZonedDateTime.from(\"2025-01-20T15:00:00-05:00[America/New_York]\");\n * const date2 = toDate(zoned);\n * // date2.toISOString() === \"2025-01-20T20:00:00.000Z\"\n *\n * // Use with Drizzle ORM (for storing back to database)\n * async function publish(id: string, at: Temporal.Instant) {\n * await db.update(posts).set({ publishedAt: toDate(at) }).where(eq(posts.id, id));\n * }\n * ```\n */\nexport function toDate(
|
|
1
|
+
{"version":3,"sources":["../src/toDate.ts"],"sourcesContent":["import { type Temporal, isInstant } from './shared/temporal';\n\n/**\n * Convert a Temporal.Instant or ZonedDateTime to a Date object.\n *\n * @param input - A Temporal.Instant or Temporal.ZonedDateTime\n * @returns A Date object representing the same moment in time\n *\n * @example\n * ```typescript\n * // From Instant\n * const instant = Temporal.Instant.from(\"2025-01-20T20:00:00Z\");\n * const date = toDate(instant);\n * // date.toISOString() === \"2025-01-20T20:00:00.000Z\"\n *\n * // From ZonedDateTime\n * const zoned = Temporal.ZonedDateTime.from(\"2025-01-20T15:00:00-05:00[America/New_York]\");\n * const date2 = toDate(zoned);\n * // date2.toISOString() === \"2025-01-20T20:00:00.000Z\"\n *\n * // Use with Drizzle ORM (for storing back to database)\n * async function publish(id: string, at: Temporal.Instant) {\n * await db.update(posts).set({ publishedAt: toDate(at) }).where(eq(posts.id, id));\n * }\n * ```\n */\nexport function toDate(input: Temporal.Instant | Temporal.ZonedDateTime): Date {\n if (isInstant(input)) {\n return new Date(input.toString());\n }\n\n return new Date(input.toInstant().toString());\n}\n"],"mappings":";;;;;AA0BO,SAAS,OAAO,OAAwD;AAC7E,MAAI,UAAU,KAAK,GAAG;AACpB,WAAO,IAAI,KAAK,MAAM,SAAS,CAAC;AAAA,EAClC;AAEA,SAAO,IAAI,KAAK,MAAM,UAAU,EAAE,SAAS,CAAC;AAC9C;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTemporalInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UTM7YAT4.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-VQFWMNZO.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTemporalInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UTM7YAT4.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-WALS2M6Z.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTemporalInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UTM7YAT4.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-WTZ4LRQT.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeWithPlainDate
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QCIY5PSJ.js";
|
|
4
4
|
import {
|
|
5
5
|
isPlainDate
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-M4ESIRFH.js";
|
|
7
7
|
|
|
8
8
|
// src/startOfMonth.ts
|
|
9
9
|
function startOfMonth(input, timezone) {
|
|
@@ -18,4 +18,4 @@ function startOfMonth(input, timezone) {
|
|
|
18
18
|
export {
|
|
19
19
|
startOfMonth
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=chunk-
|
|
21
|
+
//# sourceMappingURL=chunk-WVBZIXQP.js.map
|
|
@@ -1 +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:00+00:00[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(
|
|
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:00+00:00[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(input: Temporal.PlainDate, timezone: Timezone): 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":";;;;;;;;AAgDO,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":[]}
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-XS2HUADA.js";
|
|
4
4
|
import {
|
|
5
5
|
normalizeTemporalInput
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UTM7YAT4.js";
|
|
7
7
|
import {
|
|
8
8
|
isPlainDate
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-M4ESIRFH.js";
|
|
10
10
|
|
|
11
11
|
// src/getQuarter.ts
|
|
12
12
|
function getQuarter(input) {
|
|
@@ -17,4 +17,4 @@ function getQuarter(input) {
|
|
|
17
17
|
export {
|
|
18
18
|
getQuarter
|
|
19
19
|
};
|
|
20
|
-
//# sourceMappingURL=chunk-
|
|
20
|
+
//# sourceMappingURL=chunk-WWCLSC2B.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/getQuarter.ts"],"sourcesContent":["import { type Temporal, isPlainDate } from './shared/temporal';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\nimport { quarterOfMonth } from './shared/quarter';\n\n/**\n * Returns the quarter (1-4) that a datetime or date falls in.\n *\n * Quarters: Q1 = Jan–Mar, Q2 = Apr–Jun, Q3 = Jul–Sep, Q4 = Oct–Dec.\n *\n * A quarter is intrinsic to the calendar date, so no timezone is ever needed.\n * `Instant` inputs are interpreted in UTC; `ZonedDateTime` inputs use their own\n * timezone; `PlainDate` inputs use their calendar month directly.\n *\n * @param input - A Temporal.Instant (UTC), Temporal.ZonedDateTime, or Temporal.PlainDate\n * @returns The quarter number: 1, 2, 3, or 4\n *\n * @example\n * ```ts\n * getQuarter(Temporal.Instant.from('2025-05-15T12:00:00Z')); // 2\n * getQuarter(Temporal.PlainDate.from('2025-11-15')); // 4\n * ```\n */\nexport function getQuarter(\n input: Temporal.Instant | Temporal.ZonedDateTime | Temporal.PlainDate\n): 1 | 2 | 3 | 4 {\n const month = isPlainDate(input) ? input.month : normalizeTemporalInput(input).month;\n return quarterOfMonth(month);\n}\n"],"mappings":";;;;;;;;;;;AAsBO,SAAS,WACd,OACe;AACf,QAAM,QAAQ,YAAY,KAAK,IAAI,MAAM,QAAQ,uBAAuB,KAAK,EAAE;AAC/E,SAAO,eAAe,KAAK;AAC7B;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
calendarDates
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HXB6CDB4.js";
|
|
4
4
|
|
|
5
5
|
// src/differenceInCalendarMonths.ts
|
|
6
6
|
function differenceInCalendarMonths(laterDate, earlierDate) {
|
|
@@ -11,4 +11,4 @@ function differenceInCalendarMonths(laterDate, earlierDate) {
|
|
|
11
11
|
export {
|
|
12
12
|
differenceInCalendarMonths
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=chunk-
|
|
14
|
+
//# sourceMappingURL=chunk-X4ULMQ53.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTemporalInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UTM7YAT4.js";
|
|
4
4
|
|
|
5
5
|
// src/differenceInMinutes.ts
|
|
6
6
|
function differenceInMinutes(laterDate, earlierDate, options) {
|
|
@@ -13,4 +13,4 @@ function differenceInMinutes(laterDate, earlierDate, options) {
|
|
|
13
13
|
export {
|
|
14
14
|
differenceInMinutes
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=chunk-
|
|
16
|
+
//# sourceMappingURL=chunk-XD4JKMGT.js.map
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
isWeekendDay,
|
|
3
3
|
isoDate,
|
|
4
4
|
weekdayHolidays
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-QFQHFBN4.js";
|
|
6
6
|
import {
|
|
7
7
|
Temporal,
|
|
8
8
|
isPlainDate
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-M4ESIRFH.js";
|
|
10
10
|
|
|
11
11
|
// src/differenceInBusinessDays.ts
|
|
12
12
|
function differenceInBusinessDays(laterDate, earlierDate, holidays = []) {
|
|
@@ -33,4 +33,4 @@ function differenceInBusinessDays(laterDate, earlierDate, holidays = []) {
|
|
|
33
33
|
export {
|
|
34
34
|
differenceInBusinessDays
|
|
35
35
|
};
|
|
36
|
-
//# sourceMappingURL=chunk-
|
|
36
|
+
//# sourceMappingURL=chunk-XEAP4MXS.js.map
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-XS2HUADA.js";
|
|
4
4
|
import {
|
|
5
5
|
normalizeTemporalInput
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UTM7YAT4.js";
|
|
7
7
|
import {
|
|
8
8
|
isPlainDate
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-M4ESIRFH.js";
|
|
10
10
|
|
|
11
11
|
// src/isSameQuarter.ts
|
|
12
12
|
function isSameQuarter(date1, date2) {
|
|
@@ -18,4 +18,4 @@ function isSameQuarter(date1, date2) {
|
|
|
18
18
|
export {
|
|
19
19
|
isSameQuarter
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=chunk-
|
|
21
|
+
//# sourceMappingURL=chunk-XKS2HTEX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/isSameQuarter.ts"],"sourcesContent":["import { type Temporal, 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:00+00:00[UTC]');\n * const mar = Temporal.ZonedDateTime.from('2025-03-31T23:59:59+00:00[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":";;;;;;;;;;;AAqCO,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":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/formatPlainDate.ts"],"sourcesContent":["import { Temporal } from './shared/temporal';\n\nexport interface FormatPlainDateOptions {\n locale?: string;\n}\n\n/**\n * Format a Temporal.PlainDate using date-fns-like format tokens.\n * Uses Intl.DateTimeFormat under the hood for locale support.\n *\n * Only supports date-related tokens (no time or timezone tokens).\n *\n * @param date - A Temporal.PlainDate to format\n * @param formatStr - Format string using date-fns tokens (e.g., \"yyyy-MM-dd\")\n * @param options - Optional configuration for locale\n * @returns Formatted date string\n *\n * @example\n * ```typescript\n * const date = Temporal.PlainDate.from(\"2025-01-20\");\n *\n * formatPlainDate(date, \"yyyy-MM-dd\"); // \"2025-01-20\"\n * formatPlainDate(date, \"MMMM d, yyyy\"); // \"January 20, 2025\"\n * formatPlainDate(date, \"EEEE, MMMM do, yyyy\"); // \"Monday, January 20th, 2025\"\n *\n * // With locale\n * formatPlainDate(date, \"MMMM d, yyyy\", { locale: \"es-ES\" }); // \"enero 20, 2025\"\n * ```\n */\nexport function formatPlainDate(\n date: Temporal.PlainDate,\n formatStr: string,\n options: FormatPlainDateOptions = {}\n): string {\n const { locale = 'en-US' } = options;\n\n let result = '';\n let i = 0;\n const len = formatStr.length;\n\n while (i < len) {\n const char = formatStr[i];\n if (!char) break;\n\n // Handle escaped text\n if (char === \"'\") {\n // Check for double single quote (not inside a string, just '')\n if (i + 1 < len && formatStr[i + 1] === \"'\") {\n result += \"'\";\n i += 2;\n continue;\n }\n // Find closing quote, handling '' inside the string\n i++;\n while (i < len) {\n if (formatStr[i] === \"'\") {\n // Check if it's a doubled quote ''\n if (i + 1 < len && formatStr[i + 1] === \"'\") {\n result += \"'\";\n i += 2;\n } else {\n // End of quoted string\n i++;\n break;\n }\n } else {\n result += formatStr[i];\n i++;\n }\n }\n continue;\n }\n\n // Check for tokens by looking ahead\n const token = consumeToken(formatStr, i, char);\n if (token !== null) {\n result += formatToken(token, date, locale);\n i += token.length;\n } else {\n result += char;\n i++;\n }\n }\n\n return result;\n}\n\nfunction consumeToken(formatStr: string, start: number, char: string): string | null {\n // Special case for 'Mo' and 'do' - these end with 'o'\n if (char === 'M' && start + 1 < formatStr.length && formatStr[start + 1] === 'o') {\n return 'Mo';\n }\n if (char === 'd' && start + 1 < formatStr.length && formatStr[start + 1] === 'o') {\n return 'do';\n }\n\n // Count how many consecutive identical characters\n let end = start;\n while (end < formatStr.length && formatStr[end] === char) {\n end++;\n }\n const count = end - start;\n\n // Valid tokens for PlainDate (date-only, no time/timezone)\n const validTokens = [\n // Era\n 'GGGGG',\n 'GGGG',\n 'GGG',\n 'GG',\n 'G',\n // Year\n 'yyyy',\n 'yyy',\n 'yy',\n 'y',\n // Quarter\n 'QQQQQ',\n 'QQQQ',\n 'QQQ',\n 'QQ',\n 'Q',\n // Month\n 'MMMMM',\n 'MMMM',\n 'MMM',\n 'MM',\n 'M',\n // Day\n 'dd',\n 'd',\n // Weekday\n 'EEEEEE',\n 'EEEEE',\n 'EEEE',\n 'EEE',\n 'EE',\n 'E'\n ];\n\n // Try to match from longest to shortest\n for (let len = Math.min(count, 6); len > 0; len--) {\n const candidate = char.repeat(len);\n if (validTokens.includes(candidate)) {\n return candidate;\n }\n }\n\n return null;\n}\n\nfunction formatToken(token: string, date: Temporal.PlainDate, locale: string): string {\n switch (token) {\n // Era\n case 'GGGGG':\n return formatPart(date, 'era', 'narrow', locale);\n case 'GGGG':\n return formatPart(date, 'era', 'long', locale);\n case 'GGG':\n case 'GG':\n case 'G':\n return formatPart(date, 'era', 'short', locale);\n\n // Year\n case 'yyyy':\n return date.year.toString().padStart(4, '0');\n case 'yyy':\n return date.year.toString().padStart(3, '0');\n case 'yy':\n return (date.year % 100).toString().padStart(2, '0');\n case 'y':\n return date.year.toString();\n\n // Quarter\n case 'QQQQQ':\n return Math.ceil(date.month / 3).toString();\n case 'QQQQ': {\n const quarter = Math.ceil(date.month / 3);\n return `${quarter}${getOrdinalSuffix(quarter)} quarter`;\n }\n case 'QQQ':\n return `Q${Math.ceil(date.month / 3)}`;\n case 'QQ':\n return Math.ceil(date.month / 3)\n .toString()\n .padStart(2, '0');\n case 'Q':\n return Math.ceil(date.month / 3).toString();\n\n // Month\n case 'MMMMM':\n return formatPart(date, 'month', 'narrow', locale);\n case 'MMMM':\n return formatPart(date, 'month', 'long', locale);\n case 'MMM':\n return formatPart(date, 'month', 'short', locale);\n case 'MM':\n return date.month.toString().padStart(2, '0');\n case 'Mo':\n return `${date.month}${getOrdinalSuffix(date.month)}`;\n case 'M':\n return date.month.toString();\n\n // Day of month\n case 'do':\n return `${date.day}${getOrdinalSuffix(date.day)}`;\n case 'dd':\n return date.day.toString().padStart(2, '0');\n case 'd':\n return date.day.toString();\n\n // Day of week\n case 'EEEEEE':\n return formatPart(date, 'weekday', 'short', locale).slice(0, 2);\n case 'EEEEE':\n return formatPart(date, 'weekday', 'narrow', locale);\n case 'EEEE':\n return formatPart(date, 'weekday', 'long', locale);\n case 'EEE':\n case 'EE':\n case 'E':\n return formatPart(date, 'weekday', 'short', locale);\n\n default:\n return token;\n }\n}\n\nfunction formatPart(\n date: Temporal.PlainDate,\n part: 'era' | 'year' | 'month' | 'weekday' | 'day',\n style: 'narrow' | 'short' | 'long' | 'numeric' | '2-digit',\n locale: string\n): string {\n const options: Intl.DateTimeFormatOptions = {\n [part]: style,\n timeZone: 'UTC',\n calendar: date.calendarId === 'iso8601' ? undefined : date.calendarId\n };\n\n return (\n new Intl.DateTimeFormat(locale, options)\n .formatToParts(date.toZonedDateTime('UTC').epochMilliseconds)\n .find((value) => value.type === part)?.value ?? ''\n );\n}\n\nfunction getOrdinalSuffix(num: number): string {\n const j = num % 10;\n const k = num % 100;\n if (j === 1 && k !== 11) return 'st';\n if (j === 2 && k !== 12) return 'nd';\n if (j === 3 && k !== 13) return 'rd';\n return 'th';\n}\n"],"mappings":"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","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTemporalInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UTM7YAT4.js";
|
|
4
4
|
|
|
5
5
|
// src/isSameHour.ts
|
|
6
6
|
function isSameHour(date1, date2) {
|
|
@@ -12,4 +12,4 @@ function isSameHour(date1, date2) {
|
|
|
12
12
|
export {
|
|
13
13
|
isSameHour
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=chunk-
|
|
15
|
+
//# sourceMappingURL=chunk-YPAI5UGF.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTemporalInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UTM7YAT4.js";
|
|
4
4
|
import {
|
|
5
5
|
isPlainDate
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-M4ESIRFH.js";
|
|
7
7
|
|
|
8
8
|
// src/addYears.ts
|
|
9
9
|
function addYears(input, years) {
|
|
@@ -16,4 +16,4 @@ function addYears(input, years) {
|
|
|
16
16
|
export {
|
|
17
17
|
addYears
|
|
18
18
|
};
|
|
19
|
-
//# sourceMappingURL=chunk-
|
|
19
|
+
//# sourceMappingURL=chunk-YSUNJQBP.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeWithPlainDate
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QCIY5PSJ.js";
|
|
4
4
|
import {
|
|
5
5
|
getEndOfDay
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7WGGUDW4.js";
|
|
7
7
|
|
|
8
8
|
// src/endOfDay.ts
|
|
9
9
|
function endOfDay(input, timezone) {
|
|
@@ -14,4 +14,4 @@ function endOfDay(input, timezone) {
|
|
|
14
14
|
export {
|
|
15
15
|
endOfDay
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=chunk-
|
|
17
|
+
//# sourceMappingURL=chunk-Z7C5ZNPZ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/endOfDay.ts"],"sourcesContent":["import { Temporal } from './shared/temporal';\nimport type { Timezone } from './types';\nimport { getEndOfDay } from './shared/endOfDay';\nimport { normalizeWithPlainDate } from './shared/normalizeWithPlainDate';\n\n/**\n * Returns a ZonedDateTime representing the last nanosecond of the day.\n *\n * @param input - A Temporal.Instant (UTC) or Temporal.ZonedDateTime\n * @returns ZonedDateTime at 23:59:59.999999999\n *\n * @example\n * ```ts\n * // From Instant (always UTC)\n * const instant = Temporal.Instant.from('2025-01-20T12:00:00Z');\n * const end = endOfDay(instant);\n * // 2025-01-20T23:59:59.999999999+00:00[UTC]\n * ```\n *\n * @example\n * ```ts\n * // From ZonedDateTime (uses its timezone)\n * const zoned = Temporal.ZonedDateTime.from('2025-01-20T15:30:00-05:00[America/New_York]');\n * const end = endOfDay(zoned);\n * // 2025-01-20T23:59:59.999999999-05:00[America/New_York]\n * ```\n *\n * @example\n * ```ts\n * // From PlainDate (requires timezone)\n * const date = Temporal.PlainDate.from('2025-01-20');\n * const end = endOfDay(date, 'America/New_York');\n * // 2025-01-20T23:59:59.999999999-05:00[America/New_York]\n * ```\n */\nexport function endOfDay(
|
|
1
|
+
{"version":3,"sources":["../src/endOfDay.ts"],"sourcesContent":["import { Temporal } from './shared/temporal';\nimport type { Timezone } from './types';\nimport { getEndOfDay } from './shared/endOfDay';\nimport { normalizeWithPlainDate } from './shared/normalizeWithPlainDate';\n\n/**\n * Returns a ZonedDateTime representing the last nanosecond of the day.\n *\n * @param input - A Temporal.Instant (UTC) or Temporal.ZonedDateTime\n * @returns ZonedDateTime at 23:59:59.999999999\n *\n * @example\n * ```ts\n * // From Instant (always UTC)\n * const instant = Temporal.Instant.from('2025-01-20T12:00:00Z');\n * const end = endOfDay(instant);\n * // 2025-01-20T23:59:59.999999999+00:00[UTC]\n * ```\n *\n * @example\n * ```ts\n * // From ZonedDateTime (uses its timezone)\n * const zoned = Temporal.ZonedDateTime.from('2025-01-20T15:30:00-05:00[America/New_York]');\n * const end = endOfDay(zoned);\n * // 2025-01-20T23:59:59.999999999-05:00[America/New_York]\n * ```\n *\n * @example\n * ```ts\n * // From PlainDate (requires timezone)\n * const date = Temporal.PlainDate.from('2025-01-20');\n * const end = endOfDay(date, 'America/New_York');\n * // 2025-01-20T23:59:59.999999999-05:00[America/New_York]\n * ```\n */\nexport function endOfDay(input: Temporal.Instant | Temporal.ZonedDateTime): Temporal.ZonedDateTime;\nexport function endOfDay(input: Temporal.PlainDate, timezone: Timezone): Temporal.ZonedDateTime;\nexport function endOfDay(\n input: Temporal.Instant | Temporal.ZonedDateTime | Temporal.PlainDate,\n timezone?: Timezone\n): Temporal.ZonedDateTime {\n const zonedDateTime = normalizeWithPlainDate(input, timezone!);\n return getEndOfDay(zonedDateTime);\n}\n"],"mappings":";;;;;;;;AAqCO,SAAS,SACd,OACA,UACwB;AACxB,QAAM,gBAAgB,uBAAuB,OAAO,QAAS;AAC7D,SAAO,YAAY,aAAa;AAClC;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Temporal
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-M4ESIRFH.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-ZBNR46A5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/isPlainTimeAfter.ts"],"sourcesContent":["import { Temporal } from './shared/temporal';\n\n/**\n * Returns true if the first plain time is after the second plain time.\n * Compares wall-clock times without date or timezone considerations.\n *\n * @param time1 - First plain time\n * @param time2 - Second plain time\n * @returns true if time1 is after time2, false otherwise\n *\n * @example\n * ```ts\n * const morning = Temporal.PlainTime.from('09:00');\n * const evening = Temporal.PlainTime.from('17:00');\n *\n * isPlainTimeAfter(evening, morning); // true\n * isPlainTimeAfter(morning, evening); // false\n * isPlainTimeAfter(morning, morning); // false\n * ```\n */\nexport function isPlainTimeAfter(
|
|
1
|
+
{"version":3,"sources":["../src/isPlainTimeAfter.ts"],"sourcesContent":["import { Temporal } from './shared/temporal';\n\n/**\n * Returns true if the first plain time is after the second plain time.\n * Compares wall-clock times without date or timezone considerations.\n *\n * @param time1 - First plain time\n * @param time2 - Second plain time\n * @returns true if time1 is after time2, false otherwise\n *\n * @example\n * ```ts\n * const morning = Temporal.PlainTime.from('09:00');\n * const evening = Temporal.PlainTime.from('17:00');\n *\n * isPlainTimeAfter(evening, morning); // true\n * isPlainTimeAfter(morning, evening); // false\n * isPlainTimeAfter(morning, morning); // false\n * ```\n */\nexport function isPlainTimeAfter(time1: Temporal.PlainTime, time2: Temporal.PlainTime): boolean {\n return Temporal.PlainTime.compare(time1, time2) > 0;\n}\n"],"mappings":";;;;;AAoBO,SAAS,iBAAiB,OAA2B,OAAoC;AAC9F,SAAO,SAAS,UAAU,QAAQ,OAAO,KAAK,IAAI;AACpD;","names":[]}
|