@gobrand/tiempo 3.2.0 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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 +33 -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
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
isInstant,
|
|
4
4
|
isPlainDate,
|
|
5
5
|
isZonedDateTime
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-M4ESIRFH.js";
|
|
7
7
|
|
|
8
8
|
// src/toPlainDate.ts
|
|
9
9
|
var PLAIN_DATE_PATTERN = /^\d{4}-\d{2}-\d{2}$/;
|
|
@@ -13,19 +13,25 @@ function toPlainDate(input, timezone) {
|
|
|
13
13
|
}
|
|
14
14
|
if (input instanceof Date) {
|
|
15
15
|
if (timezone === void 0) {
|
|
16
|
-
throw new Error(
|
|
16
|
+
throw new Error(
|
|
17
|
+
"Timezone is required unless input is a ZonedDateTime, PlainDateLike, or plain date string"
|
|
18
|
+
);
|
|
17
19
|
}
|
|
18
20
|
return Temporal.Instant.from(input.toISOString()).toZonedDateTimeISO(timezone).toPlainDate();
|
|
19
21
|
}
|
|
20
22
|
if (isInstant(input)) {
|
|
21
23
|
if (timezone === void 0) {
|
|
22
|
-
throw new Error(
|
|
24
|
+
throw new Error(
|
|
25
|
+
"Timezone is required unless input is a ZonedDateTime, PlainDateLike, or plain date string"
|
|
26
|
+
);
|
|
23
27
|
}
|
|
24
28
|
return input.toZonedDateTimeISO(timezone).toPlainDate();
|
|
25
29
|
}
|
|
26
30
|
if (isZonedDateTime(input)) {
|
|
27
31
|
if (timezone === void 0) {
|
|
28
|
-
throw new Error(
|
|
32
|
+
throw new Error(
|
|
33
|
+
"Timezone is required unless input is a ZonedDateTime, PlainDateLike, or plain date string"
|
|
34
|
+
);
|
|
29
35
|
}
|
|
30
36
|
return input.toInstant().toZonedDateTimeISO(timezone).toPlainDate();
|
|
31
37
|
}
|
|
@@ -36,7 +42,9 @@ function toPlainDate(input, timezone) {
|
|
|
36
42
|
if (PLAIN_DATE_PATTERN.test(input)) {
|
|
37
43
|
return Temporal.PlainDate.from(input);
|
|
38
44
|
}
|
|
39
|
-
throw new Error(
|
|
45
|
+
throw new Error(
|
|
46
|
+
"Timezone is required unless input is a ZonedDateTime, PlainDateLike, or plain date string"
|
|
47
|
+
);
|
|
40
48
|
}
|
|
41
49
|
return Temporal.PlainDate.from(isPlainDate(input) ? input.toString() : input);
|
|
42
50
|
}
|
|
@@ -44,4 +52,4 @@ function toPlainDate(input, timezone) {
|
|
|
44
52
|
export {
|
|
45
53
|
toPlainDate
|
|
46
54
|
};
|
|
47
|
-
//# sourceMappingURL=chunk-
|
|
55
|
+
//# sourceMappingURL=chunk-BE7CIKP7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/toPlainDate.ts"],"sourcesContent":["import { Temporal, isInstant, isZonedDateTime, isPlainDate } from './shared/temporal';\nimport type { Timezone } from './types';\n\n// Pattern to detect plain date strings: YYYY-MM-DD\nconst PLAIN_DATE_PATTERN = /^\\d{4}-\\d{2}-\\d{2}$/;\n\n/**\n * Parse a plain date or extract the calendar date from a datetime.\n *\n * @param input - A PlainDateLike object, plain date string (YYYY-MM-DD), ZonedDateTime, or datetime input requiring timezone\n * @param timezone - IANA timezone identifier. Required for ISO strings, Date, and Instant inputs.\n * @returns A Temporal.PlainDate representing the calendar date\n *\n * @example\n * ```typescript\n * import { toPlainDate, toZonedTime } from '@gobrand/tiempo';\n *\n * // From PlainDateLike object (no timezone needed)\n * const date = toPlainDate({ year: 2025, month: 1, day: 20 }); // 2025-01-20\n *\n * // From plain date string (no timezone needed)\n * const date2 = toPlainDate(\"2025-01-20\"); // 2025-01-20\n *\n * // From ZonedDateTime (no timezone needed)\n * const zdt = toZonedTime(\"2025-01-20T15:30:00Z\", \"America/New_York\");\n * const date3 = toPlainDate(zdt); // 2025-01-20\n *\n * // From UTC string with timezone\n * const date4 = toPlainDate(\"2025-01-20T15:30:00Z\", \"America/New_York\"); // 2025-01-20\n *\n * // From Date with timezone\n * const jsDate = new Date(\"2025-01-20T15:30:00.000Z\");\n * const date5 = toPlainDate(jsDate, \"Europe/London\"); // 2025-01-20\n *\n * // Date boundary crossing: 23:00 UTC on Jan 20 → Jan 21 in Tokyo\n * const date6 = toPlainDate(\"2025-01-20T23:00:00Z\", \"Asia/Tokyo\"); // 2025-01-21\n * ```\n */\nexport function toPlainDate(input: Temporal.ZonedDateTime): Temporal.PlainDate;\nexport function toPlainDate(\n input: string | Date | Temporal.Instant | Temporal.ZonedDateTime,\n timezone: Timezone\n): Temporal.PlainDate;\nexport function toPlainDate(input: Temporal.PlainDateLike | string): Temporal.PlainDate;\nexport function toPlainDate(\n input: string | Date | Temporal.Instant | Temporal.ZonedDateTime | Temporal.PlainDateLike,\n timezone?: Timezone\n): Temporal.PlainDate {\n // ZonedDateTime without timezone override\n if (isZonedDateTime(input) && timezone === undefined) {\n return input.toPlainDate();\n }\n\n // Date requires timezone\n if (input instanceof Date) {\n if (timezone === undefined) {\n throw new Error(\n 'Timezone is required unless input is a ZonedDateTime, PlainDateLike, or plain date string'\n );\n }\n return Temporal.Instant.from(input.toISOString()).toZonedDateTimeISO(timezone).toPlainDate();\n }\n\n // Instant requires timezone\n if (isInstant(input)) {\n if (timezone === undefined) {\n throw new Error(\n 'Timezone is required unless input is a ZonedDateTime, PlainDateLike, or plain date string'\n );\n }\n return input.toZonedDateTimeISO(timezone).toPlainDate();\n }\n\n // ZonedDateTime with timezone override\n if (isZonedDateTime(input)) {\n if (timezone === undefined) {\n throw new Error(\n 'Timezone is required unless input is a ZonedDateTime, PlainDateLike, or plain date string'\n );\n }\n return input.toInstant().toZonedDateTimeISO(timezone).toPlainDate();\n }\n\n // String: ISO datetime (requires timezone) or plain date (no timezone)\n if (typeof input === 'string') {\n if (timezone !== undefined) {\n return Temporal.Instant.from(input).toZonedDateTimeISO(timezone).toPlainDate();\n }\n if (PLAIN_DATE_PATTERN.test(input)) {\n return Temporal.PlainDate.from(input);\n }\n throw new Error(\n 'Timezone is required unless input is a ZonedDateTime, PlainDateLike, or plain date string'\n );\n }\n\n // Foreign PlainDate objects expose calendarId, while property bags use calendar.\n // A canonical string keeps the ISO date and calendar together across implementations.\n return Temporal.PlainDate.from(isPlainDate(input) ? input.toString() : input);\n}\n"],"mappings":";;;;;;;;AAIA,IAAM,qBAAqB;AAwCpB,SAAS,YACd,OACA,UACoB;AAEpB,MAAI,gBAAgB,KAAK,KAAK,aAAa,QAAW;AACpD,WAAO,MAAM,YAAY;AAAA,EAC3B;AAGA,MAAI,iBAAiB,MAAM;AACzB,QAAI,aAAa,QAAW;AAC1B,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAAA,IACF;AACA,WAAO,SAAS,QAAQ,KAAK,MAAM,YAAY,CAAC,EAAE,mBAAmB,QAAQ,EAAE,YAAY;AAAA,EAC7F;AAGA,MAAI,UAAU,KAAK,GAAG;AACpB,QAAI,aAAa,QAAW;AAC1B,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAAA,IACF;AACA,WAAO,MAAM,mBAAmB,QAAQ,EAAE,YAAY;AAAA,EACxD;AAGA,MAAI,gBAAgB,KAAK,GAAG;AAC1B,QAAI,aAAa,QAAW;AAC1B,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAAA,IACF;AACA,WAAO,MAAM,UAAU,EAAE,mBAAmB,QAAQ,EAAE,YAAY;AAAA,EACpE;AAGA,MAAI,OAAO,UAAU,UAAU;AAC7B,QAAI,aAAa,QAAW;AAC1B,aAAO,SAAS,QAAQ,KAAK,KAAK,EAAE,mBAAmB,QAAQ,EAAE,YAAY;AAAA,IAC/E;AACA,QAAI,mBAAmB,KAAK,KAAK,GAAG;AAClC,aAAO,SAAS,UAAU,KAAK,KAAK;AAAA,IACtC;AACA,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAIA,SAAO,SAAS,UAAU,KAAK,YAAY,KAAK,IAAI,MAAM,SAAS,IAAI,KAAK;AAC9E;","names":[]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isBefore
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CMOBOTVN.js";
|
|
4
4
|
import {
|
|
5
5
|
nowZoned
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-D73HU7YA.js";
|
|
7
7
|
import {
|
|
8
8
|
normalizeTemporalInput
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-UTM7YAT4.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-BM4OZR7U.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/isPast.ts"],"sourcesContent":["import type { Temporal } from './shared/temporal';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\nimport { isBefore } from './shared/isBefore';\nimport { nowZoned } from './shared/nowZoned';\n\n/**\n * Returns true if the given datetime is in the past.\n * Compares by the underlying instant (epoch time) against the current time.\n *\n * @param date - Datetime to check (Instant or ZonedDateTime)\n * @returns true if date is before the current instant, false otherwise\n *\n * @example\n * ```ts\n * const yesterday = Temporal.Now.zonedDateTimeISO().subtract({ days: 1 });\n * const tomorrow = Temporal.Now.zonedDateTimeISO().add({ days: 1 });\n *\n * isPast(yesterday); // true\n * isPast(tomorrow); // false\n * ```\n *\n * @example\n * ```ts\n * // Works with Instant too\n * const pastInstant = Temporal.Now.instant().subtract({ hours: 1 });\n *\n * isPast(pastInstant); // true\n * ```\n *\n * @example\n * ```ts\n * // Works with any timezone\n * const pastInTokyo = Temporal.ZonedDateTime.from('1970-01-01T00:00:00+09:00[Asia/Tokyo]');\n *\n * isPast(pastInTokyo); // true\n * ```\n */\nexport function isPast(
|
|
1
|
+
{"version":3,"sources":["../src/isPast.ts"],"sourcesContent":["import type { Temporal } from './shared/temporal';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\nimport { isBefore } from './shared/isBefore';\nimport { nowZoned } from './shared/nowZoned';\n\n/**\n * Returns true if the given datetime is in the past.\n * Compares by the underlying instant (epoch time) against the current time.\n *\n * @param date - Datetime to check (Instant or ZonedDateTime)\n * @returns true if date is before the current instant, false otherwise\n *\n * @example\n * ```ts\n * const yesterday = Temporal.Now.zonedDateTimeISO().subtract({ days: 1 });\n * const tomorrow = Temporal.Now.zonedDateTimeISO().add({ days: 1 });\n *\n * isPast(yesterday); // true\n * isPast(tomorrow); // false\n * ```\n *\n * @example\n * ```ts\n * // Works with Instant too\n * const pastInstant = Temporal.Now.instant().subtract({ hours: 1 });\n *\n * isPast(pastInstant); // true\n * ```\n *\n * @example\n * ```ts\n * // Works with any timezone\n * const pastInTokyo = Temporal.ZonedDateTime.from('1970-01-01T00:00:00+09:00[Asia/Tokyo]');\n *\n * isPast(pastInTokyo); // true\n * ```\n */\nexport function isPast(date: Temporal.Instant | Temporal.ZonedDateTime): boolean {\n const zoned = normalizeTemporalInput(date);\n\n return isBefore(zoned, nowZoned());\n}\n"],"mappings":";;;;;;;;;;;AAqCO,SAAS,OAAO,MAA0D;AAC/E,QAAM,QAAQ,uBAAuB,IAAI;AAEzC,SAAO,SAAS,OAAO,SAAS,CAAC;AACnC;","names":[]}
|
|
@@ -1,15 +1,15 @@
|
|
|
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
|
import {
|
|
8
8
|
quarterStartMonth
|
|
9
9
|
} from "./chunk-XS2HUADA.js";
|
|
10
10
|
import {
|
|
11
11
|
isPlainDate
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-M4ESIRFH.js";
|
|
13
13
|
|
|
14
14
|
// src/endOfQuarter.ts
|
|
15
15
|
function endOfQuarter(input, timezone) {
|
|
@@ -32,4 +32,4 @@ function endOfQuarter(input, timezone) {
|
|
|
32
32
|
export {
|
|
33
33
|
endOfQuarter
|
|
34
34
|
};
|
|
35
|
-
//# sourceMappingURL=chunk-
|
|
35
|
+
//# sourceMappingURL=chunk-C4LUGHIM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/endOfQuarter.ts"],"sourcesContent":["import { type Temporal, isPlainDate } from './shared/temporal';\nimport type { Timezone } from './types';\nimport { getEndOfDay } from './shared/endOfDay';\nimport { normalizeWithPlainDate } from './shared/normalizeWithPlainDate';\nimport { quarterStartMonth } from './shared/quarter';\n\n/**\n * Returns a ZonedDateTime representing the last moment of the quarter\n * (last day of the quarter's ending month at 23:59:59.999999999).\n *\n * Quarters: Q1 = Jan–Mar, Q2 = Apr–Jun, Q3 = Jul–Sep, Q4 = Oct–Dec.\n *\n * @param input - A Temporal.Instant (UTC) or Temporal.ZonedDateTime\n * @returns ZonedDateTime at the last day of the quarter at 23:59:59.999999999\n *\n * @example\n * ```ts\n * // From Instant (always UTC)\n * const instant = Temporal.Instant.from('2025-05-15T12:00:00Z');\n * const end = endOfQuarter(instant);\n * // 2025-06-30T23:59:59.999999999+00:00[UTC]\n * ```\n *\n * @example\n * ```ts\n * // From ZonedDateTime (uses its timezone)\n * const zoned = Temporal.ZonedDateTime.from('2025-02-15T15:30:00-05:00[America/New_York]');\n * const end = endOfQuarter(zoned);\n * // 2025-03-31T23:59:59.999999999-04:00[America/New_York]\n * ```\n *\n * @example\n * ```ts\n * // From a PlainDate in a timezone\n * const date = Temporal.PlainDate.from('2025-11-15');\n * const end = endOfQuarter(date, 'America/New_York');\n * // 2025-12-31T23:59:59.999999999-05:00[America/New_York]\n * ```\n */\nexport function endOfQuarter(\n input: Temporal.Instant | Temporal.ZonedDateTime\n): Temporal.ZonedDateTime;\nexport function endOfQuarter(input: Temporal.PlainDate): Temporal.PlainDate;\nexport function endOfQuarter(input: Temporal.PlainDate, timezone: Timezone): Temporal.ZonedDateTime;\nexport function endOfQuarter(\n input: Temporal.Instant | Temporal.ZonedDateTime | Temporal.PlainDate,\n timezone?: Timezone\n): Temporal.ZonedDateTime | Temporal.PlainDate {\n // PlainDate with no timezone stays in calendar space → last day of quarter.\n if (isPlainDate(input) && timezone === undefined) {\n const endMonth = input.with({\n month: quarterStartMonth(input.month) + 2,\n day: 1\n });\n return endMonth.with({ day: endMonth.daysInMonth });\n }\n const zonedDateTime = normalizeWithPlainDate(input, timezone!);\n const endMonth = zonedDateTime.with({\n month: quarterStartMonth(zonedDateTime.month) + 2,\n day: 1\n });\n const lastDay = endMonth.with({ day: endMonth.daysInMonth });\n return getEndOfDay(lastDay);\n}\n"],"mappings":";;;;;;;;;;;;;;AA4CO,SAAS,aACd,OACA,UAC6C;AAE7C,MAAI,YAAY,KAAK,KAAK,aAAa,QAAW;AAChD,UAAMA,YAAW,MAAM,KAAK;AAAA,MAC1B,OAAO,kBAAkB,MAAM,KAAK,IAAI;AAAA,MACxC,KAAK;AAAA,IACP,CAAC;AACD,WAAOA,UAAS,KAAK,EAAE,KAAKA,UAAS,YAAY,CAAC;AAAA,EACpD;AACA,QAAM,gBAAgB,uBAAuB,OAAO,QAAS;AAC7D,QAAM,WAAW,cAAc,KAAK;AAAA,IAClC,OAAO,kBAAkB,cAAc,KAAK,IAAI;AAAA,IAChD,KAAK;AAAA,EACP,CAAC;AACD,QAAM,UAAU,SAAS,KAAK,EAAE,KAAK,SAAS,YAAY,CAAC;AAC3D,SAAO,YAAY,OAAO;AAC5B;","names":["endMonth"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compare
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DAWWOF5W.js";
|
|
4
4
|
|
|
5
5
|
// src/clamp.ts
|
|
6
6
|
function clamp(value, interval) {
|
|
@@ -15,4 +15,4 @@ function clamp(value, interval) {
|
|
|
15
15
|
export {
|
|
16
16
|
clamp
|
|
17
17
|
};
|
|
18
|
-
//# sourceMappingURL=chunk-
|
|
18
|
+
//# sourceMappingURL=chunk-CCDDXIAC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/shared/isBefore.ts"],"sourcesContent":["import type { Temporal } from './temporal';\n\nexport function isBefore(date1: Temporal.ZonedDateTime, date2: Temporal.ZonedDateTime): boolean {\n return date1.epochNanoseconds < date2.epochNanoseconds;\n}\n"],"mappings":";AAEO,SAAS,SAAS,OAA+B,OAAwC;AAC9F,SAAO,MAAM,mBAAmB,MAAM;AACxC;","names":[]}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isPlainDateBefore
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DYDSR35L.js";
|
|
4
4
|
import {
|
|
5
5
|
isPlainDateAfter
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-K6IGDI5W.js";
|
|
7
7
|
import {
|
|
8
8
|
normalizeTemporalInput
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-UTM7YAT4.js";
|
|
10
10
|
import {
|
|
11
11
|
Temporal,
|
|
12
12
|
isPlainDate
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-M4ESIRFH.js";
|
|
14
14
|
|
|
15
15
|
// src/eachMonthOfInterval.ts
|
|
16
16
|
function eachMonthOfInterval(interval) {
|
|
@@ -63,4 +63,4 @@ function eachMonthOfInterval(interval) {
|
|
|
63
63
|
export {
|
|
64
64
|
eachMonthOfInterval
|
|
65
65
|
};
|
|
66
|
-
//# sourceMappingURL=chunk-
|
|
66
|
+
//# sourceMappingURL=chunk-COQJXPPT.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/eachMonthOfInterval.ts"],"sourcesContent":["import { Temporal, isPlainDate } from './shared/temporal';\nimport { isPlainDateAfter } from './isPlainDateAfter';\nimport { isPlainDateBefore } from './isPlainDateBefore';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\n\n/**\n * PlainDate endpoints return date-only period starts in the start calendar.\n * Mixed date-only/timeline endpoints are rejected. Reversed endpoints return [].\n *\n * Uses the start endpoint's calendar and timezone, including for the end bound.\n * Native and polyfill endpoints may be mixed.\n *\n * Returns an array of ZonedDateTime objects for each month within the interval.\n * Each element represents the first moment of the month (day 1 at midnight).\n * The interval is inclusive of both start and end months.\n *\n * For Instant inputs, UTC is used as the timezone.\n * For ZonedDateTime inputs, the timezone of the start date is preserved.\n *\n * @param interval - The interval with start and end datetimes\n * @returns Array of ZonedDateTime at start of each month in the interval\n *\n * @example\n * ```ts\n * const start = Temporal.ZonedDateTime.from('2025-01-15T10:00:00+00:00[UTC]');\n * const end = Temporal.ZonedDateTime.from('2025-04-20T14:00:00+00:00[UTC]');\n *\n * const months = eachMonthOfInterval({ start, end });\n * // [\n * // 2025-01-01T00:00:00+00:00[UTC],\n * // 2025-02-01T00:00:00+00:00[UTC],\n * // 2025-03-01T00:00:00+00:00[UTC],\n * // 2025-04-01T00:00:00+00:00[UTC]\n * // ]\n * ```\n *\n * @example\n * ```ts\n * // Cross-year boundary\n * const start = Temporal.ZonedDateTime.from('2024-11-15T00:00:00+00:00[UTC]');\n * const end = Temporal.ZonedDateTime.from('2025-02-15T00:00:00+00:00[UTC]');\n *\n * const months = eachMonthOfInterval({ start, end });\n * // [\n * // 2024-11-01T00:00:00+00:00[UTC],\n * // 2024-12-01T00:00:00+00:00[UTC],\n * // 2025-01-01T00:00:00+00:00[UTC],\n * // 2025-02-01T00:00:00+00:00[UTC]\n * // ]\n * ```\n */\nexport function eachMonthOfInterval(interval: {\n start: Temporal.PlainDate;\n end: Temporal.PlainDate;\n}): Temporal.PlainDate[];\nexport function eachMonthOfInterval(interval: {\n start: Temporal.Instant | Temporal.ZonedDateTime;\n end: Temporal.Instant | Temporal.ZonedDateTime;\n}): Temporal.ZonedDateTime[];\nexport function eachMonthOfInterval(interval: {\n start: Temporal.Instant | Temporal.ZonedDateTime | Temporal.PlainDate;\n end: Temporal.Instant | Temporal.ZonedDateTime | Temporal.PlainDate;\n}): Temporal.ZonedDateTime[] | Temporal.PlainDate[] {\n if (isPlainDate(interval.start) || isPlainDate(interval.end)) {\n if (!isPlainDate(interval.start) || !isPlainDate(interval.end)) {\n throw new TypeError('PlainDate intervals require two PlainDate endpoints');\n }\n if (isPlainDateAfter(interval.start, interval.end)) return [];\n const end = interval.end.withCalendar(interval.start.calendarId);\n const last = end.with({ day: 1 });\n let current = interval.start.with({ day: 1 });\n const dates: Temporal.PlainDate[] = [];\n while (isPlainDateBefore(current, last)) {\n dates.push(current);\n current = current.add({ months: 1 });\n }\n dates.push(current);\n return dates;\n }\n const startZoned = normalizeTemporalInput(interval.start);\n const endZoned = normalizeTemporalInput(interval.end);\n if (startZoned.epochNanoseconds > endZoned.epochNanoseconds) return [];\n\n const timezone = startZoned.timeZoneId;\n\n // Get start of the starting month\n const startYearMonth = Temporal.PlainYearMonth.from({\n year: startZoned.year,\n month: startZoned.month,\n calendar: startZoned.calendarId
|
|
1
|
+
{"version":3,"sources":["../src/eachMonthOfInterval.ts"],"sourcesContent":["import { Temporal, isPlainDate } from './shared/temporal';\nimport { isPlainDateAfter } from './isPlainDateAfter';\nimport { isPlainDateBefore } from './isPlainDateBefore';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\n\n/**\n * PlainDate endpoints return date-only period starts in the start calendar.\n * Mixed date-only/timeline endpoints are rejected. Reversed endpoints return [].\n *\n * Uses the start endpoint's calendar and timezone, including for the end bound.\n * Native and polyfill endpoints may be mixed.\n *\n * Returns an array of ZonedDateTime objects for each month within the interval.\n * Each element represents the first moment of the month (day 1 at midnight).\n * The interval is inclusive of both start and end months.\n *\n * For Instant inputs, UTC is used as the timezone.\n * For ZonedDateTime inputs, the timezone of the start date is preserved.\n *\n * @param interval - The interval with start and end datetimes\n * @returns Array of ZonedDateTime at start of each month in the interval\n *\n * @example\n * ```ts\n * const start = Temporal.ZonedDateTime.from('2025-01-15T10:00:00+00:00[UTC]');\n * const end = Temporal.ZonedDateTime.from('2025-04-20T14:00:00+00:00[UTC]');\n *\n * const months = eachMonthOfInterval({ start, end });\n * // [\n * // 2025-01-01T00:00:00+00:00[UTC],\n * // 2025-02-01T00:00:00+00:00[UTC],\n * // 2025-03-01T00:00:00+00:00[UTC],\n * // 2025-04-01T00:00:00+00:00[UTC]\n * // ]\n * ```\n *\n * @example\n * ```ts\n * // Cross-year boundary\n * const start = Temporal.ZonedDateTime.from('2024-11-15T00:00:00+00:00[UTC]');\n * const end = Temporal.ZonedDateTime.from('2025-02-15T00:00:00+00:00[UTC]');\n *\n * const months = eachMonthOfInterval({ start, end });\n * // [\n * // 2024-11-01T00:00:00+00:00[UTC],\n * // 2024-12-01T00:00:00+00:00[UTC],\n * // 2025-01-01T00:00:00+00:00[UTC],\n * // 2025-02-01T00:00:00+00:00[UTC]\n * // ]\n * ```\n */\nexport function eachMonthOfInterval(interval: {\n start: Temporal.PlainDate;\n end: Temporal.PlainDate;\n}): Temporal.PlainDate[];\nexport function eachMonthOfInterval(interval: {\n start: Temporal.Instant | Temporal.ZonedDateTime;\n end: Temporal.Instant | Temporal.ZonedDateTime;\n}): Temporal.ZonedDateTime[];\nexport function eachMonthOfInterval(interval: {\n start: Temporal.Instant | Temporal.ZonedDateTime | Temporal.PlainDate;\n end: Temporal.Instant | Temporal.ZonedDateTime | Temporal.PlainDate;\n}): Temporal.ZonedDateTime[] | Temporal.PlainDate[] {\n if (isPlainDate(interval.start) || isPlainDate(interval.end)) {\n if (!isPlainDate(interval.start) || !isPlainDate(interval.end)) {\n throw new TypeError('PlainDate intervals require two PlainDate endpoints');\n }\n if (isPlainDateAfter(interval.start, interval.end)) return [];\n const end = interval.end.withCalendar(interval.start.calendarId);\n const last = end.with({ day: 1 });\n let current = interval.start.with({ day: 1 });\n const dates: Temporal.PlainDate[] = [];\n while (isPlainDateBefore(current, last)) {\n dates.push(current);\n current = current.add({ months: 1 });\n }\n dates.push(current);\n return dates;\n }\n const startZoned = normalizeTemporalInput(interval.start);\n const endZoned = normalizeTemporalInput(interval.end);\n if (startZoned.epochNanoseconds > endZoned.epochNanoseconds) return [];\n\n const timezone = startZoned.timeZoneId;\n\n // Get start of the starting month\n const startYearMonth = Temporal.PlainYearMonth.from({\n year: startZoned.year,\n month: startZoned.month,\n calendar: startZoned.calendarId\n });\n\n // Get end month in the same timezone\n const endInTimezone = endZoned.withTimeZone(timezone).withCalendar(startZoned.calendarId);\n const endYearMonth = Temporal.PlainYearMonth.from({\n year: endInTimezone.year,\n month: endInTimezone.month,\n calendar: startZoned.calendarId\n });\n\n const months: Temporal.ZonedDateTime[] = [];\n let current = startYearMonth;\n\n while (Temporal.PlainYearMonth.compare(current, endYearMonth) <= 0) {\n const firstOfMonth = current.toPlainDate({ day: 1 });\n months.push(\n firstOfMonth.toZonedDateTime({\n timeZone: timezone,\n plainTime: new Temporal.PlainTime()\n })\n );\n current = current.add({ months: 1 });\n }\n\n return months;\n}\n"],"mappings":";;;;;;;;;;;;;;;AA2DO,SAAS,oBAAoB,UAGgB;AAClD,MAAI,YAAY,SAAS,KAAK,KAAK,YAAY,SAAS,GAAG,GAAG;AAC5D,QAAI,CAAC,YAAY,SAAS,KAAK,KAAK,CAAC,YAAY,SAAS,GAAG,GAAG;AAC9D,YAAM,IAAI,UAAU,qDAAqD;AAAA,IAC3E;AACA,QAAI,iBAAiB,SAAS,OAAO,SAAS,GAAG,EAAG,QAAO,CAAC;AAC5D,UAAM,MAAM,SAAS,IAAI,aAAa,SAAS,MAAM,UAAU;AAC/D,UAAM,OAAO,IAAI,KAAK,EAAE,KAAK,EAAE,CAAC;AAChC,QAAIA,WAAU,SAAS,MAAM,KAAK,EAAE,KAAK,EAAE,CAAC;AAC5C,UAAM,QAA8B,CAAC;AACrC,WAAO,kBAAkBA,UAAS,IAAI,GAAG;AACvC,YAAM,KAAKA,QAAO;AAClB,MAAAA,WAAUA,SAAQ,IAAI,EAAE,QAAQ,EAAE,CAAC;AAAA,IACrC;AACA,UAAM,KAAKA,QAAO;AAClB,WAAO;AAAA,EACT;AACA,QAAM,aAAa,uBAAuB,SAAS,KAAK;AACxD,QAAM,WAAW,uBAAuB,SAAS,GAAG;AACpD,MAAI,WAAW,mBAAmB,SAAS,iBAAkB,QAAO,CAAC;AAErE,QAAM,WAAW,WAAW;AAG5B,QAAM,iBAAiB,SAAS,eAAe,KAAK;AAAA,IAClD,MAAM,WAAW;AAAA,IACjB,OAAO,WAAW;AAAA,IAClB,UAAU,WAAW;AAAA,EACvB,CAAC;AAGD,QAAM,gBAAgB,SAAS,aAAa,QAAQ,EAAE,aAAa,WAAW,UAAU;AACxF,QAAM,eAAe,SAAS,eAAe,KAAK;AAAA,IAChD,MAAM,cAAc;AAAA,IACpB,OAAO,cAAc;AAAA,IACrB,UAAU,WAAW;AAAA,EACvB,CAAC;AAED,QAAM,SAAmC,CAAC;AAC1C,MAAI,UAAU;AAEd,SAAO,SAAS,eAAe,QAAQ,SAAS,YAAY,KAAK,GAAG;AAClE,UAAM,eAAe,QAAQ,YAAY,EAAE,KAAK,EAAE,CAAC;AACnD,WAAO;AAAA,MACL,aAAa,gBAAgB;AAAA,QAC3B,UAAU;AAAA,QACV,WAAW,IAAI,SAAS,UAAU;AAAA,MACpC,CAAC;AAAA,IACH;AACA,cAAU,QAAQ,IAAI,EAAE,QAAQ,EAAE,CAAC;AAAA,EACrC;AAEA,SAAO;AACT;","names":["current"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addWeeks
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TZ4NUY3W.js";
|
|
4
4
|
import {
|
|
5
5
|
isPlainDate
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-M4ESIRFH.js";
|
|
7
7
|
|
|
8
8
|
// src/subWeeks.ts
|
|
9
9
|
function subWeeks(input, weeks) {
|
|
@@ -13,4 +13,4 @@ function subWeeks(input, weeks) {
|
|
|
13
13
|
export {
|
|
14
14
|
subWeeks
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=chunk-
|
|
16
|
+
//# sourceMappingURL=chunk-CX37IV4D.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/isSameMonth.ts
|
|
6
6
|
function isSameMonth(date1, date2) {
|
|
@@ -12,4 +12,4 @@ function isSameMonth(date1, date2) {
|
|
|
12
12
|
export {
|
|
13
13
|
isSameMonth
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=chunk-
|
|
15
|
+
//# sourceMappingURL=chunk-D2HKS2OM.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
|
Temporal
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-M4ESIRFH.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-D73HU7YA.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
Temporal,
|
|
3
3
|
isPlainDate,
|
|
4
4
|
isPlainTime
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-M4ESIRFH.js";
|
|
6
6
|
|
|
7
7
|
// src/shared/compare.ts
|
|
8
8
|
function assertSameDomain(a, b) {
|
|
@@ -44,4 +44,4 @@ export {
|
|
|
44
44
|
compare,
|
|
45
45
|
position
|
|
46
46
|
};
|
|
47
|
-
//# sourceMappingURL=chunk-
|
|
47
|
+
//# sourceMappingURL=chunk-DAWWOF5W.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isWeekendDay
|
|
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/isWeekend.ts
|
|
12
12
|
function isWeekend(input) {
|
|
@@ -17,4 +17,4 @@ function isWeekend(input) {
|
|
|
17
17
|
export {
|
|
18
18
|
isWeekend
|
|
19
19
|
};
|
|
20
|
-
//# sourceMappingURL=chunk-
|
|
20
|
+
//# sourceMappingURL=chunk-DCQCZCKG.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/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-DEVXW65H.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/areIntervalsOverlapping.ts
|
|
6
6
|
function areIntervalsOverlapping(left, right, options) {
|
|
@@ -14,4 +14,4 @@ function areIntervalsOverlapping(left, right, options) {
|
|
|
14
14
|
export {
|
|
15
15
|
areIntervalsOverlapping
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=chunk-
|
|
17
|
+
//# sourceMappingURL=chunk-DFVLLH5O.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Temporal
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-M4ESIRFH.js";
|
|
4
4
|
|
|
5
5
|
// src/isPlainDateBefore.ts
|
|
6
6
|
function isPlainDateBefore(date1, date2) {
|
|
@@ -13,4 +13,4 @@ function isPlainDateBefore(date1, date2) {
|
|
|
13
13
|
export {
|
|
14
14
|
isPlainDateBefore
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=chunk-
|
|
16
|
+
//# sourceMappingURL=chunk-DYDSR35L.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/isPlainDateBefore.ts"],"sourcesContent":["import { Temporal } from './shared/temporal';\n\n/**\n * Returns true if the first plain date is before the second plain date.\n * Compares calendar dates without time or timezone considerations.\n *\n * @param date1 - First plain date\n * @param date2 - Second plain date\n * @returns true if date1 is before date2, false otherwise\n *\n * @example\n * ```ts\n * const jan20 = Temporal.PlainDate.from('2025-01-20');\n * const jan25 = Temporal.PlainDate.from('2025-01-25');\n *\n * isPlainDateBefore(jan20, jan25); // true\n * isPlainDateBefore(jan25, jan20); // false\n * isPlainDateBefore(jan20, jan20); // false\n * ```\n */\nexport function isPlainDateBefore(
|
|
1
|
+
{"version":3,"sources":["../src/isPlainDateBefore.ts"],"sourcesContent":["import { Temporal } from './shared/temporal';\n\n/**\n * Returns true if the first plain date is before the second plain date.\n * Compares calendar dates without time or timezone considerations.\n *\n * @param date1 - First plain date\n * @param date2 - Second plain date\n * @returns true if date1 is before date2, false otherwise\n *\n * @example\n * ```ts\n * const jan20 = Temporal.PlainDate.from('2025-01-20');\n * const jan25 = Temporal.PlainDate.from('2025-01-25');\n *\n * isPlainDateBefore(jan20, jan25); // true\n * isPlainDateBefore(jan25, jan20); // false\n * isPlainDateBefore(jan20, jan20); // false\n * ```\n */\nexport function isPlainDateBefore(date1: Temporal.PlainDate, date2: Temporal.PlainDate): boolean {\n // Only foreign objects need conversion; strings retain their calendar annotations.\n return (\n Temporal.PlainDate.compare(\n Temporal.PlainDate.prototype.isPrototypeOf(date1) ? date1 : date1.toString(),\n Temporal.PlainDate.prototype.isPrototypeOf(date2) ? date2 : date2.toString()\n ) < 0\n );\n}\n"],"mappings":";;;;;AAoBO,SAAS,kBAAkB,OAA2B,OAAoC;AAE/F,SACE,SAAS,UAAU;AAAA,IACjB,SAAS,UAAU,UAAU,cAAc,KAAK,IAAI,QAAQ,MAAM,SAAS;AAAA,IAC3E,SAAS,UAAU,UAAU,cAAc,KAAK,IAAI,QAAQ,MAAM,SAAS;AAAA,EAC7E,IAAI;AAER;","names":[]}
|
|
@@ -1,12 +1,12 @@
|
|
|
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
|
import {
|
|
8
8
|
isPlainDate
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-M4ESIRFH.js";
|
|
10
10
|
|
|
11
11
|
// src/endOfYear.ts
|
|
12
12
|
function endOfYear(input, timezone) {
|
|
@@ -23,4 +23,4 @@ function endOfYear(input, timezone) {
|
|
|
23
23
|
export {
|
|
24
24
|
endOfYear
|
|
25
25
|
};
|
|
26
|
-
//# sourceMappingURL=chunk-
|
|
26
|
+
//# sourceMappingURL=chunk-DZFUKW5U.js.map
|
|
@@ -1 +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.999999999+00:00[UTC]\n * ```\n *\n * @example\n * ```ts\n * // From ZonedDateTime (uses its timezone)\n * const zoned = Temporal.ZonedDateTime.from('2025-06-15T15:30:00-04: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(
|
|
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.999999999+00:00[UTC]\n * ```\n *\n * @example\n * ```ts\n * // From ZonedDateTime (uses its timezone)\n * const zoned = Temporal.ZonedDateTime.from('2025-06-15T15:30:00-04: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(input: Temporal.Instant | Temporal.ZonedDateTime): Temporal.ZonedDateTime;\nexport function endOfYear(input: Temporal.PlainDate): Temporal.PlainDate;\nexport function endOfYear(input: Temporal.PlainDate, timezone: Timezone): 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":";;;;;;;;;;;AA+CO,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"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTemporalInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UTM7YAT4.js";
|
|
4
4
|
|
|
5
5
|
// src/isSameDay.ts
|
|
6
6
|
function isSameDay(date1, date2) {
|
|
@@ -12,4 +12,4 @@ function isSameDay(date1, date2) {
|
|
|
12
12
|
export {
|
|
13
13
|
isSameDay
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=chunk-
|
|
15
|
+
//# sourceMappingURL=chunk-EMJXV6KH.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/isSameDay.ts"],"sourcesContent":["import { Temporal } from './shared/temporal';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\n\n/**\n * Returns true if both datetimes fall on the same calendar day.\n * Compares the year, month, and day fields directly.\n *\n * Instant inputs are converted to UTC. For ZonedDateTime inputs, their\n * timezone is preserved. Convert to a common timezone before calling if\n * you need to compare from a specific perspective.\n *\n * @param date1 - First datetime (Instant or ZonedDateTime)\n * @param date2 - Second datetime (Instant or ZonedDateTime)\n * @returns true if both dates are on the same calendar day, false otherwise\n *\n * @example\n * ```ts\n * // Same timezone, same day\n * const morning = Temporal.ZonedDateTime.from('2025-01-20T08:00:00+00:00[UTC]');\n * const evening = Temporal.ZonedDateTime.from('2025-01-20T23:00:00+00:00[UTC]');\n *\n * isSameDay(morning, evening); // true\n * ```\n *\n * @example\n * ```ts\n * // Same timezone, different days\n * const today = Temporal.ZonedDateTime.from('2025-01-20T23:59:59+00:00[UTC]');\n * const tomorrow = Temporal.ZonedDateTime.from('2025-01-21T00:00:00+00:00[UTC]');\n *\n * isSameDay(today, tomorrow); // false\n * ```\n *\n * @example\n * ```ts\n * // Different timezones - compares their local calendar days\n * const ny = Temporal.ZonedDateTime.from('2025-01-20T23:00:00-05:00[America/New_York]');\n * const tokyo = Temporal.ZonedDateTime.from('2025-01-21T13:00:00+09:00[Asia/Tokyo]');\n *\n * // Same instant, different calendar days from each person's perspective\n * isSameDay(ny, tokyo); // false (Jan 20 in NY, Jan 21 in Tokyo)\n *\n * // Convert to UTC to compare in UTC timezone\n * isSameDay(ny.withTimeZone('UTC'), tokyo.withTimeZone('UTC')); // true (both Jan 21 in UTC)\n *\n * // Convert to NY timezone to compare from NY perspective\n * isSameDay(ny, tokyo.withTimeZone('America/New_York')); // true (both Jan 20 in NY)\n * ```\n *\n * @example\n * ```ts\n * // Instant inputs are converted to UTC\n * const instant1 = Temporal.Instant.from('2025-01-20T10:00:00Z');\n * const instant2 = Temporal.Instant.from('2025-01-20T23:00:00Z');\n *\n * isSameDay(instant1, instant2); // true (both Jan 20 in UTC)\n * ```\n */\nexport function isSameDay(\n date1: Temporal.Instant | Temporal.ZonedDateTime,\n date2: Temporal.Instant | Temporal.ZonedDateTime\n): boolean {\n const zoned1 = normalizeTemporalInput(date1);\n const zoned2 = normalizeTemporalInput(date2);\n\n return
|
|
1
|
+
{"version":3,"sources":["../src/isSameDay.ts"],"sourcesContent":["import { Temporal } from './shared/temporal';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\n\n/**\n * Returns true if both datetimes fall on the same calendar day.\n * Compares the year, month, and day fields directly.\n *\n * Instant inputs are converted to UTC. For ZonedDateTime inputs, their\n * timezone is preserved. Convert to a common timezone before calling if\n * you need to compare from a specific perspective.\n *\n * @param date1 - First datetime (Instant or ZonedDateTime)\n * @param date2 - Second datetime (Instant or ZonedDateTime)\n * @returns true if both dates are on the same calendar day, false otherwise\n *\n * @example\n * ```ts\n * // Same timezone, same day\n * const morning = Temporal.ZonedDateTime.from('2025-01-20T08:00:00+00:00[UTC]');\n * const evening = Temporal.ZonedDateTime.from('2025-01-20T23:00:00+00:00[UTC]');\n *\n * isSameDay(morning, evening); // true\n * ```\n *\n * @example\n * ```ts\n * // Same timezone, different days\n * const today = Temporal.ZonedDateTime.from('2025-01-20T23:59:59+00:00[UTC]');\n * const tomorrow = Temporal.ZonedDateTime.from('2025-01-21T00:00:00+00:00[UTC]');\n *\n * isSameDay(today, tomorrow); // false\n * ```\n *\n * @example\n * ```ts\n * // Different timezones - compares their local calendar days\n * const ny = Temporal.ZonedDateTime.from('2025-01-20T23:00:00-05:00[America/New_York]');\n * const tokyo = Temporal.ZonedDateTime.from('2025-01-21T13:00:00+09:00[Asia/Tokyo]');\n *\n * // Same instant, different calendar days from each person's perspective\n * isSameDay(ny, tokyo); // false (Jan 20 in NY, Jan 21 in Tokyo)\n *\n * // Convert to UTC to compare in UTC timezone\n * isSameDay(ny.withTimeZone('UTC'), tokyo.withTimeZone('UTC')); // true (both Jan 21 in UTC)\n *\n * // Convert to NY timezone to compare from NY perspective\n * isSameDay(ny, tokyo.withTimeZone('America/New_York')); // true (both Jan 20 in NY)\n * ```\n *\n * @example\n * ```ts\n * // Instant inputs are converted to UTC\n * const instant1 = Temporal.Instant.from('2025-01-20T10:00:00Z');\n * const instant2 = Temporal.Instant.from('2025-01-20T23:00:00Z');\n *\n * isSameDay(instant1, instant2); // true (both Jan 20 in UTC)\n * ```\n */\nexport function isSameDay(\n date1: Temporal.Instant | Temporal.ZonedDateTime,\n date2: Temporal.Instant | Temporal.ZonedDateTime\n): boolean {\n const zoned1 = normalizeTemporalInput(date1);\n const zoned2 = normalizeTemporalInput(date2);\n\n return zoned1.year === zoned2.year && zoned1.month === zoned2.month && zoned1.day === zoned2.day;\n}\n"],"mappings":";;;;;AA0DO,SAAS,UACd,OACA,OACS;AACT,QAAM,SAAS,uBAAuB,KAAK;AAC3C,QAAM,SAAS,uBAAuB,KAAK;AAE3C,SAAO,OAAO,SAAS,OAAO,QAAQ,OAAO,UAAU,OAAO,SAAS,OAAO,QAAQ,OAAO;AAC/F;","names":[]}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getEndOfDay
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7WGGUDW4.js";
|
|
4
4
|
import {
|
|
5
5
|
plainDateToZonedDateTime
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-R6CQ6XSS.js";
|
|
7
7
|
import {
|
|
8
8
|
daysIntoWeek
|
|
9
9
|
} from "./chunk-M2XB72L5.js";
|
|
10
10
|
import {
|
|
11
11
|
normalizeTemporalInput
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-UTM7YAT4.js";
|
|
13
13
|
import {
|
|
14
14
|
isPlainDate
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-M4ESIRFH.js";
|
|
16
16
|
|
|
17
17
|
// src/endOfWeek.ts
|
|
18
18
|
function endOfWeek(input, timezoneOrOptions, options) {
|
|
@@ -30,4 +30,4 @@ function endOfWeek(input, timezoneOrOptions, options) {
|
|
|
30
30
|
export {
|
|
31
31
|
endOfWeek
|
|
32
32
|
};
|
|
33
|
-
//# sourceMappingURL=chunk-
|
|
33
|
+
//# sourceMappingURL=chunk-EMLUESE5.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/addQuarters.ts
|
|
9
9
|
function addQuarters(input, quarters) {
|
|
@@ -16,4 +16,4 @@ function addQuarters(input, quarters) {
|
|
|
16
16
|
export {
|
|
17
17
|
addQuarters
|
|
18
18
|
};
|
|
19
|
-
//# sourceMappingURL=chunk-
|
|
19
|
+
//# sourceMappingURL=chunk-EQ3AZDKF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/addQuarters.ts"],"sourcesContent":["import { type Temporal, isPlainDate } from './shared/temporal';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\n\n/**\n * Adds the specified number of quarters (3-month blocks) to a datetime or date.\n *\n * Properly handles month-end dates and calendar edge cases through Temporal API.\n * Instant inputs are converted to UTC; ZonedDateTime inputs preserve their\n * timezone. PlainDate inputs stay in calendar space and return a PlainDate.\n *\n * @param input - A Temporal.Instant (UTC), Temporal.ZonedDateTime, or Temporal.PlainDate\n * @param quarters - Number of quarters to add (can be negative to subtract)\n * @returns PlainDate for a date input; otherwise ZonedDateTime with the quarters added\n *\n * @example\n * ```ts\n * const instant = Temporal.Instant.from('2025-01-20T12:00:00Z');\n * addQuarters(instant, 2);\n * // 2025-07-20T12:00:00+00:00[UTC] (6 months later)\n * ```\n *\n * @example\n * ```ts\n * // Calendar arithmetic on a date stays a date\n * addQuarters(Temporal.PlainDate.from('2025-01-31'), 1);\n * // 2025-04-30 (Jan 31 → Apr 30)\n * ```\n */\nexport function addQuarters(\n input: Temporal.Instant | Temporal.ZonedDateTime,\n quarters: number\n): Temporal.ZonedDateTime;\nexport function addQuarters(input: Temporal.PlainDate, quarters: number): Temporal.PlainDate;\nexport function addQuarters(\n input: Temporal.Instant | Temporal.ZonedDateTime | Temporal.PlainDate,\n quarters: number\n): Temporal.ZonedDateTime | Temporal.PlainDate {\n if (isPlainDate(input)) {\n return input.add({ months: quarters * 3 });\n }\n return normalizeTemporalInput(input).add({ months: quarters * 3 });\n}\n"],"mappings":";;;;;;;;AAiCO,SAAS,YACd,OACA,UAC6C;AAC7C,MAAI,YAAY,KAAK,GAAG;AACtB,WAAO,MAAM,IAAI,EAAE,QAAQ,WAAW,EAAE,CAAC;AAAA,EAC3C;AACA,SAAO,uBAAuB,KAAK,EAAE,IAAI,EAAE,QAAQ,WAAW,EAAE,CAAC;AACnE;","names":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
assertSameDomain,
|
|
3
3
|
position
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DAWWOF5W.js";
|
|
5
5
|
|
|
6
6
|
// src/closestTo.ts
|
|
7
7
|
function closestTo(target, candidates) {
|
|
@@ -23,4 +23,4 @@ function closestTo(target, candidates) {
|
|
|
23
23
|
export {
|
|
24
24
|
closestTo
|
|
25
25
|
};
|
|
26
|
-
//# sourceMappingURL=chunk-
|
|
26
|
+
//# sourceMappingURL=chunk-EWRNJC27.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-3KE6GK4R.js";
|
|
4
4
|
import {
|
|
5
5
|
normalizeTemporalInput
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UTM7YAT4.js";
|
|
7
7
|
|
|
8
8
|
// src/differenceInMilliseconds.ts
|
|
9
9
|
function differenceInMilliseconds2(laterDate, earlierDate) {
|
|
@@ -15,4 +15,4 @@ function differenceInMilliseconds2(laterDate, earlierDate) {
|
|
|
15
15
|
export {
|
|
16
16
|
differenceInMilliseconds2 as differenceInMilliseconds
|
|
17
17
|
};
|
|
18
|
-
//# sourceMappingURL=chunk-
|
|
18
|
+
//# sourceMappingURL=chunk-EYTJNGGV.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/toIso.ts
|
|
6
6
|
function toIso(input, options = {}) {
|
|
@@ -17,4 +17,4 @@ function toIso(input, options = {}) {
|
|
|
17
17
|
export {
|
|
18
18
|
toIso
|
|
19
19
|
};
|
|
20
|
-
//# sourceMappingURL=chunk-
|
|
20
|
+
//# sourceMappingURL=chunk-FS7VH6AY.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/toIso.ts"],"sourcesContent":["import { type Temporal, isInstant } from './shared/temporal';\n\nexport type IsoMode = 'utc' | 'offset';\n\nexport interface ToIsoOptions {\n /**\n * Output mode for time zone designator.\n * - 'utc' (default): UTC time with Z suffix\n * - 'offset': local time with offset suffix\n */\n mode?: IsoMode;\n}\n\n/**\n * Convert a Temporal.Instant to a UTC ISO 8601 string.\n */\nexport function toIso(input: Temporal.Instant): string;\n\n/**\n * Convert a Temporal.ZonedDateTime to an ISO 8601 string.\n *\n * @param input - A Temporal.ZonedDateTime\n * @param options - Output options\n *\n * @example\n * ```typescript\n * const zoned = Temporal.ZonedDateTime.from(\"2025-01-20T15:00:00-05:00[America/New_York]\");\n *\n * toIso(zoned); // \"2025-01-20T20:00:00Z\"\n * toIso(zoned, { mode: 'utc' }); // \"2025-01-20T20:00:00Z\"\n * toIso(zoned, { mode: 'offset' }); // \"2025-01-20T15:00:00-05:00\"\n * ```\n */\nexport function toIso(
|
|
1
|
+
{"version":3,"sources":["../src/toIso.ts"],"sourcesContent":["import { type Temporal, isInstant } from './shared/temporal';\n\nexport type IsoMode = 'utc' | 'offset';\n\nexport interface ToIsoOptions {\n /**\n * Output mode for time zone designator.\n * - 'utc' (default): UTC time with Z suffix\n * - 'offset': local time with offset suffix\n */\n mode?: IsoMode;\n}\n\n/**\n * Convert a Temporal.Instant to a UTC ISO 8601 string.\n */\nexport function toIso(input: Temporal.Instant): string;\n\n/**\n * Convert a Temporal.ZonedDateTime to an ISO 8601 string.\n *\n * @param input - A Temporal.ZonedDateTime\n * @param options - Output options\n *\n * @example\n * ```typescript\n * const zoned = Temporal.ZonedDateTime.from(\"2025-01-20T15:00:00-05:00[America/New_York]\");\n *\n * toIso(zoned); // \"2025-01-20T20:00:00Z\"\n * toIso(zoned, { mode: 'utc' }); // \"2025-01-20T20:00:00Z\"\n * toIso(zoned, { mode: 'offset' }); // \"2025-01-20T15:00:00-05:00\"\n * ```\n */\nexport function toIso(input: Temporal.ZonedDateTime, options?: ToIsoOptions): string;\n\nexport function toIso(\n input: Temporal.Instant | Temporal.ZonedDateTime,\n options: ToIsoOptions = {}\n): string {\n const { mode = 'utc' } = options;\n\n if (isInstant(input)) {\n return input.toString();\n }\n\n if (mode === 'offset') {\n return input.toString({ timeZoneName: 'never' });\n }\n\n return input.toInstant().toString();\n}\n"],"mappings":";;;;;AAmCO,SAAS,MACd,OACA,UAAwB,CAAC,GACjB;AACR,QAAM,EAAE,OAAO,MAAM,IAAI;AAEzB,MAAI,UAAU,KAAK,GAAG;AACpB,WAAO,MAAM,SAAS;AAAA,EACxB;AAEA,MAAI,SAAS,UAAU;AACrB,WAAO,MAAM,SAAS,EAAE,cAAc,QAAQ,CAAC;AAAA,EACjD;AAEA,SAAO,MAAM,UAAU,EAAE,SAAS;AACpC;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addNanoseconds
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-B7RDUXDN.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-FTXHKXCS.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
Temporal,
|
|
3
3
|
isInstant,
|
|
4
4
|
isZonedDateTime
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-M4ESIRFH.js";
|
|
6
6
|
|
|
7
7
|
// src/simpleFormat.ts
|
|
8
8
|
function simpleFormat(input, options) {
|
|
@@ -20,7 +20,10 @@ function simpleFormat(input, options) {
|
|
|
20
20
|
zdt = input;
|
|
21
21
|
}
|
|
22
22
|
} else {
|
|
23
|
-
zdt = input.toZonedDateTime({
|
|
23
|
+
zdt = input.toZonedDateTime({
|
|
24
|
+
timeZone: timeZone ?? "UTC",
|
|
25
|
+
plainTime: new Temporal.PlainTime()
|
|
26
|
+
});
|
|
24
27
|
}
|
|
25
28
|
const parts = [];
|
|
26
29
|
if (dateFormat) {
|
|
@@ -59,4 +62,4 @@ function formatCompactTime(zdt) {
|
|
|
59
62
|
export {
|
|
60
63
|
simpleFormat
|
|
61
64
|
};
|
|
62
|
-
//# sourceMappingURL=chunk-
|
|
65
|
+
//# sourceMappingURL=chunk-G7X7NHPV.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/simpleFormat.ts"],"sourcesContent":["import { Temporal, isInstant, isZonedDateTime } from './shared/temporal';\nimport type { Timezone } from './types';\n\ninterface BaseOptions {\n locale?: string;\n timeZone?: Timezone;\n}\n\ninterface DateOnlyOptions extends BaseOptions {\n date: 'compact' | 'auto' | 'full';\n time?: never;\n}\n\ninterface TimeOnlyOptions extends BaseOptions {\n date?: never;\n time: '12h' | '24h' | 'compact';\n}\n\ninterface DateAndTimeOptions extends BaseOptions {\n date: 'compact' | 'auto' | 'full';\n time: '12h' | '24h' | 'compact';\n}\n\nexport type SimpleFormatOptions = DateOnlyOptions | TimeOnlyOptions | DateAndTimeOptions;\n\n/**\n * Format a Temporal date/time in a human-friendly way.\n *\n * Pass `date`, `time`, or both to control what's displayed.\n * At least one of `date` or `time` is required.\n *\n * @param input - A Temporal.Instant, ZonedDateTime, or PlainDate\n * @param options - Format options (at least `date` or `time` required)\n *\n * Date formats:\n * - `'compact'` - \"Dec 23\" (never shows year)\n * - `'auto'` - \"Dec 23\" or \"Dec 23, 2020\" (shows year only if not current year)\n * - `'full'` - \"Dec 23, 2026\" (always shows year)\n *\n * Time formats:\n * - `'12h'` - \"3:30 PM\"\n * - `'24h'` - \"15:30\"\n * - `'compact'` - \"9am\" or \"2:30pm\" (omits minutes when zero, lowercase am/pm)\n *\n * @example\n * ```typescript\n * const zdt = Temporal.ZonedDateTime.from(\"2026-12-23T09:00:00[America/New_York]\");\n * const pastZdt = Temporal.ZonedDateTime.from(\"2020-12-23T14:30:00[America/New_York]\");\n *\n * // Date only\n * simpleFormat(zdt, { date: 'compact' }); // \"Dec 23\"\n * simpleFormat(zdt, { date: 'auto' }); // \"Dec 23\"\n * simpleFormat(pastZdt, { date: 'auto' }); // \"Dec 23, 2020\"\n * simpleFormat(zdt, { date: 'full' }); // \"Dec 23, 2026\"\n *\n * // Time only\n * simpleFormat(zdt, { time: 'compact' }); // \"9am\"\n * simpleFormat(pastZdt, { time: 'compact' }); // \"2:30pm\"\n * simpleFormat(zdt, { time: '12h' }); // \"9:00 AM\"\n * simpleFormat(zdt, { time: '24h' }); // \"09:00\"\n *\n * // Date and time\n * simpleFormat(zdt, { date: 'auto', time: 'compact' }); // \"Dec 23, 9am\"\n * simpleFormat(zdt, { date: 'full', time: '12h' }); // \"Dec 23, 2026, 9:00 AM\"\n *\n * // With Instant (timeZone required)\n * const instant = Temporal.Instant.from(\"2026-12-23T14:00:00Z\");\n * simpleFormat(instant, { date: 'auto', timeZone: 'America/New_York' }); // \"Dec 23\"\n * ```\n */\nexport function simpleFormat(\n input: Temporal.PlainDate | Temporal.ZonedDateTime | Temporal.Instant,\n options: SimpleFormatOptions\n): string {\n const { locale = 'en-US', timeZone } = options;\n const dateFormat = 'date' in options ? options.date : undefined;\n const timeFormat = 'time' in options ? options.time : undefined;\n\n // Convert input to ZonedDateTime for consistent handling\n let zdt: Temporal.ZonedDateTime;\n\n if (isInstant(input)) {\n const tz = timeZone ?? 'UTC';\n zdt = input.toZonedDateTimeISO(tz);\n } else if (isZonedDateTime(input)) {\n if (timeZone) {\n zdt = input.toInstant().toZonedDateTimeISO(timeZone);\n } else {\n zdt = input;\n }\n } else {\n // PlainDate - convert to ZonedDateTime at midnight UTC for formatting\n zdt = input.toZonedDateTime({
|
|
1
|
+
{"version":3,"sources":["../src/simpleFormat.ts"],"sourcesContent":["import { Temporal, isInstant, isZonedDateTime } from './shared/temporal';\nimport type { Timezone } from './types';\n\ninterface BaseOptions {\n locale?: string;\n timeZone?: Timezone;\n}\n\ninterface DateOnlyOptions extends BaseOptions {\n date: 'compact' | 'auto' | 'full';\n time?: never;\n}\n\ninterface TimeOnlyOptions extends BaseOptions {\n date?: never;\n time: '12h' | '24h' | 'compact';\n}\n\ninterface DateAndTimeOptions extends BaseOptions {\n date: 'compact' | 'auto' | 'full';\n time: '12h' | '24h' | 'compact';\n}\n\nexport type SimpleFormatOptions = DateOnlyOptions | TimeOnlyOptions | DateAndTimeOptions;\n\n/**\n * Format a Temporal date/time in a human-friendly way.\n *\n * Pass `date`, `time`, or both to control what's displayed.\n * At least one of `date` or `time` is required.\n *\n * @param input - A Temporal.Instant, ZonedDateTime, or PlainDate\n * @param options - Format options (at least `date` or `time` required)\n *\n * Date formats:\n * - `'compact'` - \"Dec 23\" (never shows year)\n * - `'auto'` - \"Dec 23\" or \"Dec 23, 2020\" (shows year only if not current year)\n * - `'full'` - \"Dec 23, 2026\" (always shows year)\n *\n * Time formats:\n * - `'12h'` - \"3:30 PM\"\n * - `'24h'` - \"15:30\"\n * - `'compact'` - \"9am\" or \"2:30pm\" (omits minutes when zero, lowercase am/pm)\n *\n * @example\n * ```typescript\n * const zdt = Temporal.ZonedDateTime.from(\"2026-12-23T09:00:00[America/New_York]\");\n * const pastZdt = Temporal.ZonedDateTime.from(\"2020-12-23T14:30:00[America/New_York]\");\n *\n * // Date only\n * simpleFormat(zdt, { date: 'compact' }); // \"Dec 23\"\n * simpleFormat(zdt, { date: 'auto' }); // \"Dec 23\"\n * simpleFormat(pastZdt, { date: 'auto' }); // \"Dec 23, 2020\"\n * simpleFormat(zdt, { date: 'full' }); // \"Dec 23, 2026\"\n *\n * // Time only\n * simpleFormat(zdt, { time: 'compact' }); // \"9am\"\n * simpleFormat(pastZdt, { time: 'compact' }); // \"2:30pm\"\n * simpleFormat(zdt, { time: '12h' }); // \"9:00 AM\"\n * simpleFormat(zdt, { time: '24h' }); // \"09:00\"\n *\n * // Date and time\n * simpleFormat(zdt, { date: 'auto', time: 'compact' }); // \"Dec 23, 9am\"\n * simpleFormat(zdt, { date: 'full', time: '12h' }); // \"Dec 23, 2026, 9:00 AM\"\n *\n * // With Instant (timeZone required)\n * const instant = Temporal.Instant.from(\"2026-12-23T14:00:00Z\");\n * simpleFormat(instant, { date: 'auto', timeZone: 'America/New_York' }); // \"Dec 23\"\n * ```\n */\nexport function simpleFormat(\n input: Temporal.PlainDate | Temporal.ZonedDateTime | Temporal.Instant,\n options: SimpleFormatOptions\n): string {\n const { locale = 'en-US', timeZone } = options;\n const dateFormat = 'date' in options ? options.date : undefined;\n const timeFormat = 'time' in options ? options.time : undefined;\n\n // Convert input to ZonedDateTime for consistent handling\n let zdt: Temporal.ZonedDateTime;\n\n if (isInstant(input)) {\n const tz = timeZone ?? 'UTC';\n zdt = input.toZonedDateTimeISO(tz);\n } else if (isZonedDateTime(input)) {\n if (timeZone) {\n zdt = input.toInstant().toZonedDateTimeISO(timeZone);\n } else {\n zdt = input;\n }\n } else {\n // PlainDate - convert to ZonedDateTime at midnight UTC for formatting\n zdt = input.toZonedDateTime({\n timeZone: timeZone ?? 'UTC',\n plainTime: new Temporal.PlainTime()\n });\n }\n\n const parts: string[] = [];\n\n // Format date part\n if (dateFormat) {\n const currentYear = Temporal.Now.plainDateISO().year;\n const showYear =\n dateFormat === 'full' ? true : dateFormat === 'compact' ? false : zdt.year !== currentYear;\n\n const dateOptions: Intl.DateTimeFormatOptions = {\n day: 'numeric',\n month: 'short',\n year: showYear ? 'numeric' : undefined\n };\n\n parts.push(zdt.toLocaleString(locale, dateOptions));\n }\n\n // Format time part\n if (timeFormat) {\n if (timeFormat === 'compact') {\n parts.push(formatCompactTime(zdt));\n } else {\n const timeOptions: Intl.DateTimeFormatOptions = {\n hour: 'numeric',\n minute: '2-digit',\n hour12: timeFormat === '12h'\n };\n parts.push(zdt.toLocaleString(locale, timeOptions));\n }\n }\n\n return parts.join(', ');\n}\n\n/**\n * Format time in compact style: \"9am\" or \"2:30pm\"\n * Omits minutes when they're zero for cleaner display.\n */\nfunction formatCompactTime(zdt: Temporal.ZonedDateTime): string {\n const hour12 = zdt.hour % 12 || 12;\n const ampm = zdt.hour < 12 ? 'am' : 'pm';\n\n if (zdt.minute === 0) {\n return `${hour12}${ampm}`;\n }\n return `${hour12}:${zdt.minute.toString().padStart(2, '0')}${ampm}`;\n}\n"],"mappings":";;;;;;;AAsEO,SAAS,aACd,OACA,SACQ;AACR,QAAM,EAAE,SAAS,SAAS,SAAS,IAAI;AACvC,QAAM,aAAa,UAAU,UAAU,QAAQ,OAAO;AACtD,QAAM,aAAa,UAAU,UAAU,QAAQ,OAAO;AAGtD,MAAI;AAEJ,MAAI,UAAU,KAAK,GAAG;AACpB,UAAM,KAAK,YAAY;AACvB,UAAM,MAAM,mBAAmB,EAAE;AAAA,EACnC,WAAW,gBAAgB,KAAK,GAAG;AACjC,QAAI,UAAU;AACZ,YAAM,MAAM,UAAU,EAAE,mBAAmB,QAAQ;AAAA,IACrD,OAAO;AACL,YAAM;AAAA,IACR;AAAA,EACF,OAAO;AAEL,UAAM,MAAM,gBAAgB;AAAA,MAC1B,UAAU,YAAY;AAAA,MACtB,WAAW,IAAI,SAAS,UAAU;AAAA,IACpC,CAAC;AAAA,EACH;AAEA,QAAM,QAAkB,CAAC;AAGzB,MAAI,YAAY;AACd,UAAM,cAAc,SAAS,IAAI,aAAa,EAAE;AAChD,UAAM,WACJ,eAAe,SAAS,OAAO,eAAe,YAAY,QAAQ,IAAI,SAAS;AAEjF,UAAM,cAA0C;AAAA,MAC9C,KAAK;AAAA,MACL,OAAO;AAAA,MACP,MAAM,WAAW,YAAY;AAAA,IAC/B;AAEA,UAAM,KAAK,IAAI,eAAe,QAAQ,WAAW,CAAC;AAAA,EACpD;AAGA,MAAI,YAAY;AACd,QAAI,eAAe,WAAW;AAC5B,YAAM,KAAK,kBAAkB,GAAG,CAAC;AAAA,IACnC,OAAO;AACL,YAAM,cAA0C;AAAA,QAC9C,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,QAAQ,eAAe;AAAA,MACzB;AACA,YAAM,KAAK,IAAI,eAAe,QAAQ,WAAW,CAAC;AAAA,IACpD;AAAA,EACF;AAEA,SAAO,MAAM,KAAK,IAAI;AACxB;AAMA,SAAS,kBAAkB,KAAqC;AAC9D,QAAM,SAAS,IAAI,OAAO,MAAM;AAChC,QAAM,OAAO,IAAI,OAAO,KAAK,OAAO;AAEpC,MAAI,IAAI,WAAW,GAAG;AACpB,WAAO,GAAG,MAAM,GAAG,IAAI;AAAA,EACzB;AACA,SAAO,GAAG,MAAM,IAAI,IAAI,OAAO,SAAS,EAAE,SAAS,GAAG,GAAG,CAAC,GAAG,IAAI;AACnE;","names":[]}
|