@gobrand/tiempo 2.2.3 → 2.3.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/README.md +297 -24
- package/dist/addDays.d.ts +37 -0
- package/dist/addDays.d.ts.map +1 -0
- package/dist/addDays.js +8 -0
- package/dist/addDays.js.map +1 -0
- package/dist/addDays.test.d.ts +2 -0
- package/dist/addDays.test.d.ts.map +1 -0
- package/dist/addHours.d.ts +37 -0
- package/dist/addHours.d.ts.map +1 -0
- package/dist/addHours.js +8 -0
- package/dist/addHours.js.map +1 -0
- package/dist/addHours.test.d.ts +2 -0
- package/dist/addHours.test.d.ts.map +1 -0
- package/dist/addMicroseconds.d.ts +36 -0
- package/dist/addMicroseconds.d.ts.map +1 -0
- package/dist/addMicroseconds.js +8 -0
- package/dist/addMicroseconds.js.map +1 -0
- package/dist/addMicroseconds.test.d.ts +2 -0
- package/dist/addMicroseconds.test.d.ts.map +1 -0
- package/dist/addMilliseconds.d.ts +36 -0
- package/dist/addMilliseconds.d.ts.map +1 -0
- package/dist/addMilliseconds.js +8 -0
- package/dist/addMilliseconds.js.map +1 -0
- package/dist/addMilliseconds.test.d.ts +2 -0
- package/dist/addMilliseconds.test.d.ts.map +1 -0
- package/dist/addMinutes.d.ts +36 -0
- package/dist/addMinutes.d.ts.map +1 -0
- package/dist/addMinutes.js +8 -0
- package/dist/addMinutes.js.map +1 -0
- package/dist/addMinutes.test.d.ts +2 -0
- package/dist/addMinutes.test.d.ts.map +1 -0
- package/dist/addMonths.d.ts +37 -0
- package/dist/addMonths.d.ts.map +1 -0
- package/dist/addMonths.js +8 -0
- package/dist/addMonths.js.map +1 -0
- package/dist/addMonths.test.d.ts +2 -0
- package/dist/addMonths.test.d.ts.map +1 -0
- package/dist/addNanoseconds.d.ts +36 -0
- package/dist/addNanoseconds.d.ts.map +1 -0
- package/dist/addNanoseconds.js +8 -0
- package/dist/addNanoseconds.js.map +1 -0
- package/dist/addNanoseconds.test.d.ts +2 -0
- package/dist/addNanoseconds.test.d.ts.map +1 -0
- package/dist/addSeconds.d.ts +36 -0
- package/dist/addSeconds.d.ts.map +1 -0
- package/dist/addSeconds.js +8 -0
- package/dist/addSeconds.js.map +1 -0
- package/dist/addSeconds.test.d.ts +2 -0
- package/dist/addSeconds.test.d.ts.map +1 -0
- package/dist/addWeeks.d.ts +37 -0
- package/dist/addWeeks.d.ts.map +1 -0
- package/dist/addWeeks.js +8 -0
- package/dist/addWeeks.js.map +1 -0
- package/dist/addWeeks.test.d.ts +2 -0
- package/dist/addWeeks.test.d.ts.map +1 -0
- package/dist/addYears.d.ts +37 -0
- package/dist/addYears.d.ts.map +1 -0
- package/dist/addYears.js +8 -0
- package/dist/addYears.js.map +1 -0
- package/dist/addYears.test.d.ts +2 -0
- package/dist/addYears.test.d.ts.map +1 -0
- package/dist/{chunk-KD5GEHUA.js → chunk-2MP3ESL7.js} +4 -1
- package/dist/chunk-2MP3ESL7.js.map +1 -0
- package/dist/chunk-2XHAHSB6.js +14 -0
- package/dist/chunk-2XHAHSB6.js.map +1 -0
- package/dist/chunk-4NJMCCUM.js +14 -0
- package/dist/chunk-4NJMCCUM.js.map +1 -0
- package/dist/chunk-52NEOY34.js +13 -0
- package/dist/chunk-52NEOY34.js.map +1 -0
- package/dist/chunk-7ATM7AXL.js +14 -0
- package/dist/chunk-7ATM7AXL.js.map +1 -0
- package/dist/chunk-A5VVBYNT.js +14 -0
- package/dist/chunk-A5VVBYNT.js.map +1 -0
- package/dist/chunk-ADQTZVMH.js +15 -0
- package/dist/chunk-ADQTZVMH.js.map +1 -0
- package/dist/chunk-AHMKY474.js +13 -0
- package/dist/chunk-AHMKY474.js.map +1 -0
- package/dist/chunk-BH2YB4MV.js +13 -0
- package/dist/chunk-BH2YB4MV.js.map +1 -0
- package/dist/chunk-BQBLSXK2.js +13 -0
- package/dist/chunk-BQBLSXK2.js.map +1 -0
- package/dist/{chunk-GPAFAHKJ.js → chunk-BW5SFCKS.js} +4 -1
- package/dist/chunk-BW5SFCKS.js.map +1 -0
- package/dist/chunk-CY746ZUQ.js +15 -0
- package/dist/chunk-CY746ZUQ.js.map +1 -0
- package/dist/chunk-DT2EWLHU.js +14 -0
- package/dist/chunk-DT2EWLHU.js.map +1 -0
- package/dist/chunk-EEQ3REET.js +15 -0
- package/dist/chunk-EEQ3REET.js.map +1 -0
- package/dist/chunk-EYO2ZJLH.js +14 -0
- package/dist/chunk-EYO2ZJLH.js.map +1 -0
- package/dist/chunk-HDBH7RTY.js +13 -0
- package/dist/chunk-HDBH7RTY.js.map +1 -0
- package/dist/chunk-ISHZRFVN.js +15 -0
- package/dist/chunk-ISHZRFVN.js.map +1 -0
- package/dist/chunk-J6G2I2TU.js +13 -0
- package/dist/chunk-J6G2I2TU.js.map +1 -0
- package/dist/chunk-JOD4ATPE.js +15 -0
- package/dist/chunk-JOD4ATPE.js.map +1 -0
- package/dist/chunk-L4SVABDH.js +14 -0
- package/dist/chunk-L4SVABDH.js.map +1 -0
- package/dist/chunk-LDO6PRNJ.js +15 -0
- package/dist/chunk-LDO6PRNJ.js.map +1 -0
- package/dist/chunk-NRD5HRZV.js +14 -0
- package/dist/chunk-NRD5HRZV.js.map +1 -0
- package/dist/chunk-PPB62JYV.js +15 -0
- package/dist/chunk-PPB62JYV.js.map +1 -0
- package/dist/chunk-Q2F3HEXB.js +14 -0
- package/dist/chunk-Q2F3HEXB.js.map +1 -0
- package/dist/chunk-S63QUP4W.js +15 -0
- package/dist/chunk-S63QUP4W.js.map +1 -0
- package/dist/chunk-TGKWBQ7L.js +13 -0
- package/dist/chunk-TGKWBQ7L.js.map +1 -0
- package/dist/chunk-U4RNUZXO.js +13 -0
- package/dist/chunk-U4RNUZXO.js.map +1 -0
- package/dist/chunk-V27NUBXQ.js +14 -0
- package/dist/chunk-V27NUBXQ.js.map +1 -0
- package/dist/chunk-VLZ3HQQA.js +15 -0
- package/dist/chunk-VLZ3HQQA.js.map +1 -0
- package/dist/chunk-WVHAYLBW.js +13 -0
- package/dist/chunk-WVHAYLBW.js.map +1 -0
- package/dist/{chunk-NL5LWPJI.js → chunk-XEDXPI5G.js} +4 -4
- package/dist/chunk-XW5MLXX5.js +13 -0
- package/dist/chunk-XW5MLXX5.js.map +1 -0
- package/dist/chunk-YKBP3G7L.js +13 -0
- package/dist/chunk-YKBP3G7L.js.map +1 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +139 -19
- package/dist/intlFormatDistance.js +2 -2
- package/dist/isSameHour.d.ts +58 -0
- package/dist/isSameHour.d.ts.map +1 -0
- package/dist/isSameHour.js +8 -0
- package/dist/isSameHour.js.map +1 -0
- package/dist/isSameHour.test.d.ts +2 -0
- package/dist/isSameHour.test.d.ts.map +1 -0
- package/dist/isSameMicrosecond.d.ts +59 -0
- package/dist/isSameMicrosecond.d.ts.map +1 -0
- package/dist/isSameMicrosecond.js +8 -0
- package/dist/isSameMicrosecond.js.map +1 -0
- package/dist/isSameMicrosecond.test.d.ts +2 -0
- package/dist/isSameMicrosecond.test.d.ts.map +1 -0
- package/dist/isSameMillisecond.d.ts +59 -0
- package/dist/isSameMillisecond.d.ts.map +1 -0
- package/dist/isSameMillisecond.js +8 -0
- package/dist/isSameMillisecond.js.map +1 -0
- package/dist/isSameMillisecond.test.d.ts +2 -0
- package/dist/isSameMillisecond.test.d.ts.map +1 -0
- package/dist/isSameMinute.d.ts +58 -0
- package/dist/isSameMinute.d.ts.map +1 -0
- package/dist/isSameMinute.js +8 -0
- package/dist/isSameMinute.js.map +1 -0
- package/dist/isSameMinute.test.d.ts +2 -0
- package/dist/isSameMinute.test.d.ts.map +1 -0
- package/dist/isSameMonth.d.ts +58 -0
- package/dist/isSameMonth.d.ts.map +1 -0
- package/dist/isSameMonth.js +8 -0
- package/dist/isSameMonth.js.map +1 -0
- package/dist/isSameMonth.test.d.ts +2 -0
- package/dist/isSameMonth.test.d.ts.map +1 -0
- package/dist/isSameNanosecond.d.ts +59 -0
- package/dist/isSameNanosecond.d.ts.map +1 -0
- package/dist/isSameNanosecond.js +8 -0
- package/dist/isSameNanosecond.js.map +1 -0
- package/dist/isSameNanosecond.test.d.ts +2 -0
- package/dist/isSameNanosecond.test.d.ts.map +1 -0
- package/dist/isSameSecond.d.ts +59 -0
- package/dist/isSameSecond.d.ts.map +1 -0
- package/dist/isSameSecond.js +8 -0
- package/dist/isSameSecond.js.map +1 -0
- package/dist/isSameSecond.test.d.ts +2 -0
- package/dist/isSameSecond.test.d.ts.map +1 -0
- package/dist/isSameWeek.d.ts +72 -0
- package/dist/isSameWeek.d.ts.map +1 -0
- package/dist/isSameWeek.js +8 -0
- package/dist/isSameWeek.js.map +1 -0
- package/dist/isSameWeek.test.d.ts +2 -0
- package/dist/isSameWeek.test.d.ts.map +1 -0
- package/dist/isSameYear.d.ts +58 -0
- package/dist/isSameYear.d.ts.map +1 -0
- package/dist/isSameYear.js +8 -0
- package/dist/isSameYear.js.map +1 -0
- package/dist/isSameYear.test.d.ts +2 -0
- package/dist/isSameYear.test.d.ts.map +1 -0
- package/dist/subDays.d.ts +20 -0
- package/dist/subDays.d.ts.map +1 -0
- package/dist/subDays.js +9 -0
- package/dist/subDays.js.map +1 -0
- package/dist/subDays.test.d.ts +2 -0
- package/dist/subDays.test.d.ts.map +1 -0
- package/dist/subHours.d.ts +20 -0
- package/dist/subHours.d.ts.map +1 -0
- package/dist/subHours.js +9 -0
- package/dist/subHours.js.map +1 -0
- package/dist/subHours.test.d.ts +2 -0
- package/dist/subHours.test.d.ts.map +1 -0
- package/dist/subMicroseconds.d.ts +19 -0
- package/dist/subMicroseconds.d.ts.map +1 -0
- package/dist/subMicroseconds.js +9 -0
- package/dist/subMicroseconds.js.map +1 -0
- package/dist/subMicroseconds.test.d.ts +2 -0
- package/dist/subMicroseconds.test.d.ts.map +1 -0
- package/dist/subMilliseconds.d.ts +19 -0
- package/dist/subMilliseconds.d.ts.map +1 -0
- package/dist/subMilliseconds.js +9 -0
- package/dist/subMilliseconds.js.map +1 -0
- package/dist/subMilliseconds.test.d.ts +2 -0
- package/dist/subMilliseconds.test.d.ts.map +1 -0
- package/dist/subMinutes.d.ts +19 -0
- package/dist/subMinutes.d.ts.map +1 -0
- package/dist/subMinutes.js +9 -0
- package/dist/subMinutes.js.map +1 -0
- package/dist/subMinutes.test.d.ts +2 -0
- package/dist/subMinutes.test.d.ts.map +1 -0
- package/dist/subMonths.d.ts +20 -0
- package/dist/subMonths.d.ts.map +1 -0
- package/dist/subMonths.js +9 -0
- package/dist/subMonths.js.map +1 -0
- package/dist/subMonths.test.d.ts +2 -0
- package/dist/subMonths.test.d.ts.map +1 -0
- package/dist/subNanoseconds.d.ts +19 -0
- package/dist/subNanoseconds.d.ts.map +1 -0
- package/dist/subNanoseconds.js +9 -0
- package/dist/subNanoseconds.js.map +1 -0
- package/dist/subNanoseconds.test.d.ts +2 -0
- package/dist/subNanoseconds.test.d.ts.map +1 -0
- package/dist/subSeconds.d.ts +19 -0
- package/dist/subSeconds.d.ts.map +1 -0
- package/dist/subSeconds.js +9 -0
- package/dist/subSeconds.js.map +1 -0
- package/dist/subSeconds.test.d.ts +2 -0
- package/dist/subSeconds.test.d.ts.map +1 -0
- package/dist/subWeeks.d.ts +20 -0
- package/dist/subWeeks.d.ts.map +1 -0
- package/dist/subWeeks.js +9 -0
- package/dist/subWeeks.js.map +1 -0
- package/dist/subWeeks.test.d.ts +2 -0
- package/dist/subWeeks.test.d.ts.map +1 -0
- package/dist/subYears.d.ts +20 -0
- package/dist/subYears.d.ts.map +1 -0
- package/dist/subYears.js +9 -0
- package/dist/subYears.js.map +1 -0
- package/dist/subYears.test.d.ts +2 -0
- package/dist/subYears.test.d.ts.map +1 -0
- package/dist/toDate.d.ts +27 -0
- package/dist/toDate.d.ts.map +1 -0
- package/dist/toDate.js +7 -0
- package/dist/toDate.js.map +1 -0
- package/dist/toDate.test.d.ts +2 -0
- package/dist/toDate.test.d.ts.map +1 -0
- package/dist/toUtc.d.ts +9 -5
- package/dist/toUtc.d.ts.map +1 -1
- package/dist/toUtc.js +1 -1
- package/dist/toZonedTime.d.ts +8 -4
- package/dist/toZonedTime.d.ts.map +1 -1
- package/dist/toZonedTime.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-GPAFAHKJ.js.map +0 -1
- package/dist/chunk-KD5GEHUA.js.map +0 -1
- /package/dist/{chunk-NL5LWPJI.js.map → chunk-XEDXPI5G.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,3 +1,51 @@
|
|
|
1
|
+
import {
|
|
2
|
+
toDate
|
|
3
|
+
} from "./chunk-TGKWBQ7L.js";
|
|
4
|
+
import {
|
|
5
|
+
toUtc
|
|
6
|
+
} from "./chunk-BW5SFCKS.js";
|
|
7
|
+
import {
|
|
8
|
+
toUtcString
|
|
9
|
+
} from "./chunk-DMKGJY4N.js";
|
|
10
|
+
import {
|
|
11
|
+
toZonedTime
|
|
12
|
+
} from "./chunk-2MP3ESL7.js";
|
|
13
|
+
import {
|
|
14
|
+
today
|
|
15
|
+
} from "./chunk-67QHALIG.js";
|
|
16
|
+
import {
|
|
17
|
+
subMicroseconds
|
|
18
|
+
} from "./chunk-BQBLSXK2.js";
|
|
19
|
+
import {
|
|
20
|
+
subMilliseconds
|
|
21
|
+
} from "./chunk-HDBH7RTY.js";
|
|
22
|
+
import {
|
|
23
|
+
subMinutes
|
|
24
|
+
} from "./chunk-J6G2I2TU.js";
|
|
25
|
+
import {
|
|
26
|
+
subMonths
|
|
27
|
+
} from "./chunk-52NEOY34.js";
|
|
28
|
+
import {
|
|
29
|
+
subNanoseconds
|
|
30
|
+
} from "./chunk-WVHAYLBW.js";
|
|
31
|
+
import {
|
|
32
|
+
subSeconds
|
|
33
|
+
} from "./chunk-BH2YB4MV.js";
|
|
34
|
+
import {
|
|
35
|
+
subWeeks
|
|
36
|
+
} from "./chunk-U4RNUZXO.js";
|
|
37
|
+
import {
|
|
38
|
+
subYears
|
|
39
|
+
} from "./chunk-AHMKY474.js";
|
|
40
|
+
import {
|
|
41
|
+
isSameYear
|
|
42
|
+
} from "./chunk-VLZ3HQQA.js";
|
|
43
|
+
import {
|
|
44
|
+
now
|
|
45
|
+
} from "./chunk-3YGPHHB6.js";
|
|
46
|
+
import {
|
|
47
|
+
startOfDay
|
|
48
|
+
} from "./chunk-TW5EV3DH.js";
|
|
1
49
|
import {
|
|
2
50
|
startOfMonth
|
|
3
51
|
} from "./chunk-TU2UNOOW.js";
|
|
@@ -8,20 +56,41 @@ import {
|
|
|
8
56
|
startOfYear
|
|
9
57
|
} from "./chunk-YR2UCUIT.js";
|
|
10
58
|
import {
|
|
11
|
-
|
|
12
|
-
} from "./chunk-
|
|
59
|
+
subDays
|
|
60
|
+
} from "./chunk-YKBP3G7L.js";
|
|
13
61
|
import {
|
|
14
|
-
|
|
15
|
-
} from "./chunk-
|
|
62
|
+
subHours
|
|
63
|
+
} from "./chunk-XW5MLXX5.js";
|
|
16
64
|
import {
|
|
17
|
-
|
|
18
|
-
} from "./chunk-
|
|
65
|
+
isSameHour
|
|
66
|
+
} from "./chunk-EEQ3REET.js";
|
|
19
67
|
import {
|
|
20
|
-
|
|
21
|
-
} from "./chunk-
|
|
68
|
+
isSameMicrosecond
|
|
69
|
+
} from "./chunk-PPB62JYV.js";
|
|
70
|
+
import {
|
|
71
|
+
isSameMillisecond
|
|
72
|
+
} from "./chunk-ISHZRFVN.js";
|
|
73
|
+
import {
|
|
74
|
+
isSameMinute
|
|
75
|
+
} from "./chunk-LDO6PRNJ.js";
|
|
76
|
+
import {
|
|
77
|
+
isSameMonth
|
|
78
|
+
} from "./chunk-ADQTZVMH.js";
|
|
79
|
+
import {
|
|
80
|
+
isSameNanosecond
|
|
81
|
+
} from "./chunk-S63QUP4W.js";
|
|
82
|
+
import {
|
|
83
|
+
isSameSecond
|
|
84
|
+
} from "./chunk-CY746ZUQ.js";
|
|
85
|
+
import {
|
|
86
|
+
isSameWeek
|
|
87
|
+
} from "./chunk-JOD4ATPE.js";
|
|
88
|
+
import {
|
|
89
|
+
format
|
|
90
|
+
} from "./chunk-2G5RJGPR.js";
|
|
22
91
|
import {
|
|
23
92
|
intlFormatDistance
|
|
24
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-XEDXPI5G.js";
|
|
25
94
|
import {
|
|
26
95
|
isAfter
|
|
27
96
|
} from "./chunk-BBNNR2QH.js";
|
|
@@ -38,11 +107,11 @@ import {
|
|
|
38
107
|
isSameDay
|
|
39
108
|
} from "./chunk-RW3C2677.js";
|
|
40
109
|
import {
|
|
41
|
-
|
|
42
|
-
} from "./chunk-
|
|
110
|
+
differenceInNanoseconds
|
|
111
|
+
} from "./chunk-OABS374T.js";
|
|
43
112
|
import {
|
|
44
|
-
|
|
45
|
-
} from "./chunk-
|
|
113
|
+
differenceInSeconds
|
|
114
|
+
} from "./chunk-ZHRMURYP.js";
|
|
46
115
|
import {
|
|
47
116
|
differenceInWeeks
|
|
48
117
|
} from "./chunk-PVAOUYXF.js";
|
|
@@ -63,8 +132,11 @@ import {
|
|
|
63
132
|
} from "./chunk-XDVUGTUV.js";
|
|
64
133
|
import "./chunk-AVGNRINZ.js";
|
|
65
134
|
import {
|
|
66
|
-
|
|
67
|
-
} from "./chunk-
|
|
135
|
+
addWeeks
|
|
136
|
+
} from "./chunk-DT2EWLHU.js";
|
|
137
|
+
import {
|
|
138
|
+
addYears
|
|
139
|
+
} from "./chunk-Q2F3HEXB.js";
|
|
68
140
|
import {
|
|
69
141
|
differenceInDays
|
|
70
142
|
} from "./chunk-6IP245MS.js";
|
|
@@ -84,13 +156,41 @@ import {
|
|
|
84
156
|
differenceInMonths
|
|
85
157
|
} from "./chunk-BIAPE4MR.js";
|
|
86
158
|
import {
|
|
87
|
-
|
|
88
|
-
} from "./chunk-
|
|
159
|
+
addDays
|
|
160
|
+
} from "./chunk-L4SVABDH.js";
|
|
89
161
|
import {
|
|
90
|
-
|
|
91
|
-
} from "./chunk-
|
|
162
|
+
addHours
|
|
163
|
+
} from "./chunk-4NJMCCUM.js";
|
|
164
|
+
import {
|
|
165
|
+
addMicroseconds
|
|
166
|
+
} from "./chunk-V27NUBXQ.js";
|
|
167
|
+
import {
|
|
168
|
+
addMilliseconds
|
|
169
|
+
} from "./chunk-A5VVBYNT.js";
|
|
170
|
+
import {
|
|
171
|
+
addMinutes
|
|
172
|
+
} from "./chunk-2XHAHSB6.js";
|
|
173
|
+
import {
|
|
174
|
+
addMonths
|
|
175
|
+
} from "./chunk-7ATM7AXL.js";
|
|
176
|
+
import {
|
|
177
|
+
addNanoseconds
|
|
178
|
+
} from "./chunk-EYO2ZJLH.js";
|
|
179
|
+
import {
|
|
180
|
+
addSeconds
|
|
181
|
+
} from "./chunk-NRD5HRZV.js";
|
|
92
182
|
import "./chunk-MJSZNWCV.js";
|
|
93
183
|
export {
|
|
184
|
+
addDays,
|
|
185
|
+
addHours,
|
|
186
|
+
addMicroseconds,
|
|
187
|
+
addMilliseconds,
|
|
188
|
+
addMinutes,
|
|
189
|
+
addMonths,
|
|
190
|
+
addNanoseconds,
|
|
191
|
+
addSeconds,
|
|
192
|
+
addWeeks,
|
|
193
|
+
addYears,
|
|
94
194
|
differenceInDays,
|
|
95
195
|
differenceInHours,
|
|
96
196
|
differenceInMicroseconds,
|
|
@@ -112,11 +212,31 @@ export {
|
|
|
112
212
|
isFuture,
|
|
113
213
|
isPast,
|
|
114
214
|
isSameDay,
|
|
215
|
+
isSameHour,
|
|
216
|
+
isSameMicrosecond,
|
|
217
|
+
isSameMillisecond,
|
|
218
|
+
isSameMinute,
|
|
219
|
+
isSameMonth,
|
|
220
|
+
isSameNanosecond,
|
|
221
|
+
isSameSecond,
|
|
222
|
+
isSameWeek,
|
|
223
|
+
isSameYear,
|
|
115
224
|
now,
|
|
116
225
|
startOfDay,
|
|
117
226
|
startOfMonth,
|
|
118
227
|
startOfWeek,
|
|
119
228
|
startOfYear,
|
|
229
|
+
subDays,
|
|
230
|
+
subHours,
|
|
231
|
+
subMicroseconds,
|
|
232
|
+
subMilliseconds,
|
|
233
|
+
subMinutes,
|
|
234
|
+
subMonths,
|
|
235
|
+
subNanoseconds,
|
|
236
|
+
subSeconds,
|
|
237
|
+
subWeeks,
|
|
238
|
+
subYears,
|
|
239
|
+
toDate,
|
|
120
240
|
toUtc,
|
|
121
241
|
toUtcString,
|
|
122
242
|
toZonedTime,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
intlFormatDistance
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XEDXPI5G.js";
|
|
4
|
+
import "./chunk-ZHRMURYP.js";
|
|
4
5
|
import "./chunk-PVAOUYXF.js";
|
|
5
6
|
import "./chunk-CHW2EN2O.js";
|
|
6
7
|
import "./chunk-6IP245MS.js";
|
|
7
8
|
import "./chunk-PIDXROVB.js";
|
|
8
9
|
import "./chunk-RJY62CDU.js";
|
|
9
10
|
import "./chunk-BIAPE4MR.js";
|
|
10
|
-
import "./chunk-ZHRMURYP.js";
|
|
11
11
|
import "./chunk-MJSZNWCV.js";
|
|
12
12
|
export {
|
|
13
13
|
intlFormatDistance
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { Temporal } from '@js-temporal/polyfill';
|
|
2
|
+
/**
|
|
3
|
+
* Returns true if both datetimes fall in the same hour.
|
|
4
|
+
* Compares the year, month, day, and hour fields directly.
|
|
5
|
+
*
|
|
6
|
+
* Instant inputs are converted to UTC. For ZonedDateTime inputs, their
|
|
7
|
+
* timezone is preserved. Convert to a common timezone before calling if
|
|
8
|
+
* you need to compare from a specific perspective.
|
|
9
|
+
*
|
|
10
|
+
* @param date1 - First datetime (Instant or ZonedDateTime)
|
|
11
|
+
* @param date2 - Second datetime (Instant or ZonedDateTime)
|
|
12
|
+
* @returns true if both dates are in the same hour, false otherwise
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* // Same timezone, same hour
|
|
17
|
+
* const start = Temporal.ZonedDateTime.from('2025-01-20T14:00:00Z[UTC]');
|
|
18
|
+
* const end = Temporal.ZonedDateTime.from('2025-01-20T14:59:59.999Z[UTC]');
|
|
19
|
+
*
|
|
20
|
+
* isSameHour(start, end); // true
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* // Same timezone, different hours
|
|
26
|
+
* const hour14 = Temporal.ZonedDateTime.from('2025-01-20T14:59:59Z[UTC]');
|
|
27
|
+
* const hour15 = Temporal.ZonedDateTime.from('2025-01-20T15:00:00Z[UTC]');
|
|
28
|
+
*
|
|
29
|
+
* isSameHour(hour14, hour15); // false
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* // Different timezones - compares their local hours
|
|
35
|
+
* const ny = Temporal.ZonedDateTime.from('2025-01-20T14:30:00-05:00[America/New_York]');
|
|
36
|
+
* const tokyo = Temporal.ZonedDateTime.from('2025-01-21T04:30:00+09:00[Asia/Tokyo]');
|
|
37
|
+
*
|
|
38
|
+
* // Same instant, different local hours from each person's perspective
|
|
39
|
+
* isSameHour(ny, tokyo); // false (14:xx in NY, 04:xx in Tokyo)
|
|
40
|
+
*
|
|
41
|
+
* // Convert to UTC to compare in UTC timezone
|
|
42
|
+
* isSameHour(ny.withTimeZone('UTC'), tokyo.withTimeZone('UTC')); // true (both 19:xx in UTC)
|
|
43
|
+
*
|
|
44
|
+
* // Convert to NY timezone to compare from NY perspective
|
|
45
|
+
* isSameHour(ny, tokyo.withTimeZone('America/New_York')); // true (both 14:xx in NY)
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* // Instant inputs are converted to UTC
|
|
51
|
+
* const instant1 = Temporal.Instant.from('2025-01-20T14:15:30Z');
|
|
52
|
+
* const instant2 = Temporal.Instant.from('2025-01-20T14:45:50Z');
|
|
53
|
+
*
|
|
54
|
+
* isSameHour(instant1, instant2); // true (both 14:xx in UTC)
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
export declare function isSameHour(date1: Temporal.Instant | Temporal.ZonedDateTime, date2: Temporal.Instant | Temporal.ZonedDateTime): boolean;
|
|
58
|
+
//# sourceMappingURL=isSameHour.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isSameHour.d.ts","sourceRoot":"","sources":["../src/isSameHour.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,EAChD,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,GAC/C,OAAO,CAUT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isSameHour.test.d.ts","sourceRoot":"","sources":["../src/isSameHour.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { Temporal } from '@js-temporal/polyfill';
|
|
2
|
+
/**
|
|
3
|
+
* Returns true if both datetimes fall in the same microsecond.
|
|
4
|
+
* Compares the year, month, day, hour, minute, second, millisecond, and microsecond fields directly.
|
|
5
|
+
* Ignores sub-microsecond precision (nanoseconds).
|
|
6
|
+
*
|
|
7
|
+
* Instant inputs are converted to UTC. For ZonedDateTime inputs, their
|
|
8
|
+
* timezone is preserved. Convert to a common timezone before calling if
|
|
9
|
+
* you need to compare from a specific perspective.
|
|
10
|
+
*
|
|
11
|
+
* @param date1 - First datetime (Instant or ZonedDateTime)
|
|
12
|
+
* @param date2 - Second datetime (Instant or ZonedDateTime)
|
|
13
|
+
* @returns true if both dates are in the same microsecond, false otherwise
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* // Same timezone, same microsecond
|
|
18
|
+
* const time1 = Temporal.ZonedDateTime.from('2025-01-20T14:30:45.123456Z[UTC]');
|
|
19
|
+
* const time2 = Temporal.ZonedDateTime.from('2025-01-20T14:30:45.123456999Z[UTC]');
|
|
20
|
+
*
|
|
21
|
+
* isSameMicrosecond(time1, time2); // true
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* // Same timezone, different microseconds
|
|
27
|
+
* const us456 = Temporal.ZonedDateTime.from('2025-01-20T14:30:45.123456Z[UTC]');
|
|
28
|
+
* const us457 = Temporal.ZonedDateTime.from('2025-01-20T14:30:45.123457Z[UTC]');
|
|
29
|
+
*
|
|
30
|
+
* isSameMicrosecond(us456, us457); // false
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* // Different timezones - compares their local microseconds
|
|
36
|
+
* const ny = Temporal.ZonedDateTime.from('2025-01-20T14:30:45.123456-05:00[America/New_York]');
|
|
37
|
+
* const tokyo = Temporal.ZonedDateTime.from('2025-01-21T04:30:45.987654+09:00[Asia/Tokyo]');
|
|
38
|
+
*
|
|
39
|
+
* // Same instant, different local microseconds from each person's perspective
|
|
40
|
+
* isSameMicrosecond(ny, tokyo); // false (14:30:45.123456 in NY, 04:30:45.987654 in Tokyo)
|
|
41
|
+
*
|
|
42
|
+
* // Convert to UTC to compare in UTC timezone
|
|
43
|
+
* isSameMicrosecond(ny.withTimeZone('UTC'), tokyo.withTimeZone('UTC')); // true (both 19:30:45.123456 in UTC)
|
|
44
|
+
*
|
|
45
|
+
* // Convert to NY timezone to compare from NY perspective
|
|
46
|
+
* isSameMicrosecond(ny, tokyo.withTimeZone('America/New_York')); // true (both 14:30:45.123456 in NY)
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* // Instant inputs are converted to UTC
|
|
52
|
+
* const instant1 = Temporal.Instant.from('2025-01-20T14:30:45.123456789Z');
|
|
53
|
+
* const instant2 = Temporal.Instant.from('2025-01-20T14:30:45.123456999Z');
|
|
54
|
+
*
|
|
55
|
+
* isSameMicrosecond(instant1, instant2); // true (both 14:30:45.123456 in UTC)
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
export declare function isSameMicrosecond(date1: Temporal.Instant | Temporal.ZonedDateTime, date2: Temporal.Instant | Temporal.ZonedDateTime): boolean;
|
|
59
|
+
//# sourceMappingURL=isSameMicrosecond.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isSameMicrosecond.d.ts","sourceRoot":"","sources":["../src/isSameMicrosecond.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,EAChD,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,GAC/C,OAAO,CAcT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isSameMicrosecond.test.d.ts","sourceRoot":"","sources":["../src/isSameMicrosecond.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { Temporal } from '@js-temporal/polyfill';
|
|
2
|
+
/**
|
|
3
|
+
* Returns true if both datetimes fall in the same millisecond.
|
|
4
|
+
* Compares the year, month, day, hour, minute, second, and millisecond fields directly.
|
|
5
|
+
* Ignores sub-millisecond precision (microseconds, nanoseconds).
|
|
6
|
+
*
|
|
7
|
+
* Instant inputs are converted to UTC. For ZonedDateTime inputs, their
|
|
8
|
+
* timezone is preserved. Convert to a common timezone before calling if
|
|
9
|
+
* you need to compare from a specific perspective.
|
|
10
|
+
*
|
|
11
|
+
* @param date1 - First datetime (Instant or ZonedDateTime)
|
|
12
|
+
* @param date2 - Second datetime (Instant or ZonedDateTime)
|
|
13
|
+
* @returns true if both dates are in the same millisecond, false otherwise
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* // Same timezone, same millisecond
|
|
18
|
+
* const time1 = Temporal.ZonedDateTime.from('2025-01-20T14:30:45.123Z[UTC]');
|
|
19
|
+
* const time2 = Temporal.ZonedDateTime.from('2025-01-20T14:30:45.123999Z[UTC]');
|
|
20
|
+
*
|
|
21
|
+
* isSameMillisecond(time1, time2); // true
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* // Same timezone, different milliseconds
|
|
27
|
+
* const ms123 = Temporal.ZonedDateTime.from('2025-01-20T14:30:45.123Z[UTC]');
|
|
28
|
+
* const ms124 = Temporal.ZonedDateTime.from('2025-01-20T14:30:45.124Z[UTC]');
|
|
29
|
+
*
|
|
30
|
+
* isSameMillisecond(ms123, ms124); // false
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* // Different timezones - compares their local milliseconds
|
|
36
|
+
* const ny = Temporal.ZonedDateTime.from('2025-01-20T14:30:45.123-05:00[America/New_York]');
|
|
37
|
+
* const tokyo = Temporal.ZonedDateTime.from('2025-01-21T04:30:45.987+09:00[Asia/Tokyo]');
|
|
38
|
+
*
|
|
39
|
+
* // Same instant, different local milliseconds from each person's perspective
|
|
40
|
+
* isSameMillisecond(ny, tokyo); // false (14:30:45.123 in NY, 04:30:45.987 in Tokyo)
|
|
41
|
+
*
|
|
42
|
+
* // Convert to UTC to compare in UTC timezone
|
|
43
|
+
* isSameMillisecond(ny.withTimeZone('UTC'), tokyo.withTimeZone('UTC')); // true (both 19:30:45.123 in UTC)
|
|
44
|
+
*
|
|
45
|
+
* // Convert to NY timezone to compare from NY perspective
|
|
46
|
+
* isSameMillisecond(ny, tokyo.withTimeZone('America/New_York')); // true (both 14:30:45.123 in NY)
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* // Instant inputs are converted to UTC
|
|
52
|
+
* const instant1 = Temporal.Instant.from('2025-01-20T14:30:45.123456Z');
|
|
53
|
+
* const instant2 = Temporal.Instant.from('2025-01-20T14:30:45.123999Z');
|
|
54
|
+
*
|
|
55
|
+
* isSameMillisecond(instant1, instant2); // true (both 14:30:45.123 in UTC)
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
export declare function isSameMillisecond(date1: Temporal.Instant | Temporal.ZonedDateTime, date2: Temporal.Instant | Temporal.ZonedDateTime): boolean;
|
|
59
|
+
//# sourceMappingURL=isSameMillisecond.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isSameMillisecond.d.ts","sourceRoot":"","sources":["../src/isSameMillisecond.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,EAChD,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,GAC/C,OAAO,CAaT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isSameMillisecond.test.d.ts","sourceRoot":"","sources":["../src/isSameMillisecond.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { Temporal } from '@js-temporal/polyfill';
|
|
2
|
+
/**
|
|
3
|
+
* Returns true if both datetimes fall in the same minute.
|
|
4
|
+
* Compares the year, month, day, hour, and minute fields directly.
|
|
5
|
+
*
|
|
6
|
+
* Instant inputs are converted to UTC. For ZonedDateTime inputs, their
|
|
7
|
+
* timezone is preserved. Convert to a common timezone before calling if
|
|
8
|
+
* you need to compare from a specific perspective.
|
|
9
|
+
*
|
|
10
|
+
* @param date1 - First datetime (Instant or ZonedDateTime)
|
|
11
|
+
* @param date2 - Second datetime (Instant or ZonedDateTime)
|
|
12
|
+
* @returns true if both dates are in the same minute, false otherwise
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* // Same timezone, same minute
|
|
17
|
+
* const start = Temporal.ZonedDateTime.from('2025-01-20T14:30:00Z[UTC]');
|
|
18
|
+
* const end = Temporal.ZonedDateTime.from('2025-01-20T14:30:59.999Z[UTC]');
|
|
19
|
+
*
|
|
20
|
+
* isSameMinute(start, end); // true
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* // Same timezone, different minutes
|
|
26
|
+
* const min30 = Temporal.ZonedDateTime.from('2025-01-20T14:30:59Z[UTC]');
|
|
27
|
+
* const min31 = Temporal.ZonedDateTime.from('2025-01-20T14:31:00Z[UTC]');
|
|
28
|
+
*
|
|
29
|
+
* isSameMinute(min30, min31); // false
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* // Different timezones - compares their local minutes
|
|
35
|
+
* const ny = Temporal.ZonedDateTime.from('2025-01-20T14:30:45-05:00[America/New_York]');
|
|
36
|
+
* const tokyo = Temporal.ZonedDateTime.from('2025-01-21T04:30:45+09:00[Asia/Tokyo]');
|
|
37
|
+
*
|
|
38
|
+
* // Same instant, different local minutes from each person's perspective
|
|
39
|
+
* isSameMinute(ny, tokyo); // false (14:30:xx in NY, 04:30:xx in Tokyo)
|
|
40
|
+
*
|
|
41
|
+
* // Convert to UTC to compare in UTC timezone
|
|
42
|
+
* isSameMinute(ny.withTimeZone('UTC'), tokyo.withTimeZone('UTC')); // true (both 19:30:xx in UTC)
|
|
43
|
+
*
|
|
44
|
+
* // Convert to NY timezone to compare from NY perspective
|
|
45
|
+
* isSameMinute(ny, tokyo.withTimeZone('America/New_York')); // true (both 14:30:xx in NY)
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* // Instant inputs are converted to UTC
|
|
51
|
+
* const instant1 = Temporal.Instant.from('2025-01-20T14:30:15Z');
|
|
52
|
+
* const instant2 = Temporal.Instant.from('2025-01-20T14:30:45Z');
|
|
53
|
+
*
|
|
54
|
+
* isSameMinute(instant1, instant2); // true (both 14:30:xx in UTC)
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
export declare function isSameMinute(date1: Temporal.Instant | Temporal.ZonedDateTime, date2: Temporal.Instant | Temporal.ZonedDateTime): boolean;
|
|
58
|
+
//# sourceMappingURL=isSameMinute.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isSameMinute.d.ts","sourceRoot":"","sources":["../src/isSameMinute.ts"],"names":[],"mappings":"AAAA,OAAO,KAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,EAChD,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,GAC/C,OAAO,CAWT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isSameMinute.test.d.ts","sourceRoot":"","sources":["../src/isSameMinute.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { Temporal } from '@js-temporal/polyfill';
|
|
2
|
+
/**
|
|
3
|
+
* Returns true if both datetimes fall in the same calendar month and year.
|
|
4
|
+
* Compares the year and month fields directly.
|
|
5
|
+
*
|
|
6
|
+
* Instant inputs are converted to UTC. For ZonedDateTime inputs, their
|
|
7
|
+
* timezone is preserved. Convert to a common timezone before calling if
|
|
8
|
+
* you need to compare from a specific perspective.
|
|
9
|
+
*
|
|
10
|
+
* @param date1 - First datetime (Instant or ZonedDateTime)
|
|
11
|
+
* @param date2 - Second datetime (Instant or ZonedDateTime)
|
|
12
|
+
* @returns true if both dates are in the same calendar month, false otherwise
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* // Same timezone, same month
|
|
17
|
+
* const start = Temporal.ZonedDateTime.from('2025-01-01T08:00:00Z[UTC]');
|
|
18
|
+
* const end = Temporal.ZonedDateTime.from('2025-01-31T23:59:59Z[UTC]');
|
|
19
|
+
*
|
|
20
|
+
* isSameMonth(start, end); // true
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* // Same timezone, different months
|
|
26
|
+
* const jan = Temporal.ZonedDateTime.from('2025-01-31T23:59:59Z[UTC]');
|
|
27
|
+
* const feb = Temporal.ZonedDateTime.from('2025-02-01T00:00:00Z[UTC]');
|
|
28
|
+
*
|
|
29
|
+
* isSameMonth(jan, feb); // false
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* // Different timezones - compares their local calendar months
|
|
35
|
+
* const ny = Temporal.ZonedDateTime.from('2025-01-31T23:00:00-05:00[America/New_York]');
|
|
36
|
+
* const tokyo = Temporal.ZonedDateTime.from('2025-02-01T13:00:00+09:00[Asia/Tokyo]');
|
|
37
|
+
*
|
|
38
|
+
* // Same instant, different calendar months from each person's perspective
|
|
39
|
+
* isSameMonth(ny, tokyo); // false (Jan in NY, Feb in Tokyo)
|
|
40
|
+
*
|
|
41
|
+
* // Convert to UTC to compare in UTC timezone
|
|
42
|
+
* isSameMonth(ny.withTimeZone('UTC'), tokyo.withTimeZone('UTC')); // true (both Feb in UTC)
|
|
43
|
+
*
|
|
44
|
+
* // Convert to NY timezone to compare from NY perspective
|
|
45
|
+
* isSameMonth(ny, tokyo.withTimeZone('America/New_York')); // true (both Jan in NY)
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* // Instant inputs are converted to UTC
|
|
51
|
+
* const instant1 = Temporal.Instant.from('2025-01-01T00:00:00Z');
|
|
52
|
+
* const instant2 = Temporal.Instant.from('2025-01-31T23:59:59Z');
|
|
53
|
+
*
|
|
54
|
+
* isSameMonth(instant1, instant2); // true (both Jan 2025 in UTC)
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
export declare function isSameMonth(date1: Temporal.Instant | Temporal.ZonedDateTime, date2: Temporal.Instant | Temporal.ZonedDateTime): boolean;
|
|
58
|
+
//# sourceMappingURL=isSameMonth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isSameMonth.d.ts","sourceRoot":"","sources":["../src/isSameMonth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,EAChD,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,GAC/C,OAAO,CAKT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isSameMonth.test.d.ts","sourceRoot":"","sources":["../src/isSameMonth.test.ts"],"names":[],"mappings":""}
|