@gobrand/tiempo 2.6.1 → 2.6.3

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.
Files changed (143) hide show
  1. package/dist/chunk-3TSFIPUR.js +16 -0
  2. package/dist/chunk-3TSFIPUR.js.map +1 -0
  3. package/dist/chunk-776JOVV6.js +20 -0
  4. package/dist/chunk-776JOVV6.js.map +1 -0
  5. package/dist/chunk-AJ4JBKJK.js +10 -0
  6. package/dist/chunk-AJ4JBKJK.js.map +1 -0
  7. package/dist/{chunk-RJY62CDU.js → chunk-B2R2G5YK.js} +5 -2
  8. package/dist/chunk-B2R2G5YK.js.map +1 -0
  9. package/dist/chunk-BUX26GTD.js +30 -0
  10. package/dist/chunk-BUX26GTD.js.map +1 -0
  11. package/dist/{chunk-D7DPB2JR.js → chunk-BV6CLVSI.js} +7 -4
  12. package/dist/chunk-BV6CLVSI.js.map +1 -0
  13. package/dist/chunk-DKYVFYWM.js +25 -0
  14. package/dist/chunk-DKYVFYWM.js.map +1 -0
  15. package/dist/chunk-G2JUEBC5.js +26 -0
  16. package/dist/chunk-G2JUEBC5.js.map +1 -0
  17. package/dist/chunk-HLGMUTFK.js +16 -0
  18. package/dist/chunk-HLGMUTFK.js.map +1 -0
  19. package/dist/chunk-HOCNCQTC.js +18 -0
  20. package/dist/chunk-HOCNCQTC.js.map +1 -0
  21. package/dist/chunk-JA7SVLAF.js +20 -0
  22. package/dist/chunk-JA7SVLAF.js.map +1 -0
  23. package/dist/chunk-KGVUENQO.js +17 -0
  24. package/dist/chunk-KGVUENQO.js.map +1 -0
  25. package/dist/chunk-OLEOU3XE.js +28 -0
  26. package/dist/chunk-OLEOU3XE.js.map +1 -0
  27. package/dist/chunk-OQ4CWKJT.js +19 -0
  28. package/dist/chunk-OQ4CWKJT.js.map +1 -0
  29. package/dist/{chunk-PIDXROVB.js → chunk-PMJD5N5J.js} +5 -2
  30. package/dist/chunk-PMJD5N5J.js.map +1 -0
  31. package/dist/chunk-QFNGYTTH.js +14 -0
  32. package/dist/chunk-QFNGYTTH.js.map +1 -0
  33. package/dist/{chunk-ZHRMURYP.js → chunk-QVOEXF46.js} +5 -2
  34. package/dist/chunk-QVOEXF46.js.map +1 -0
  35. package/dist/chunk-TNCLJK4Y.js +38 -0
  36. package/dist/chunk-TNCLJK4Y.js.map +1 -0
  37. package/dist/chunk-UBY22QWM.js +20 -0
  38. package/dist/chunk-UBY22QWM.js.map +1 -0
  39. package/dist/chunk-Y7CIJQ67.js +26 -0
  40. package/dist/chunk-Y7CIJQ67.js.map +1 -0
  41. package/dist/chunk-YIT6EMBC.js +15 -0
  42. package/dist/chunk-YIT6EMBC.js.map +1 -0
  43. package/dist/{chunk-TDQXOSO3.js → chunk-ZJQS7ZY7.js} +4 -4
  44. package/dist/differenceInHours.d.ts.map +1 -1
  45. package/dist/differenceInHours.js +2 -1
  46. package/dist/differenceInMilliseconds.d.ts.map +1 -1
  47. package/dist/differenceInMilliseconds.js +2 -1
  48. package/dist/differenceInMinutes.d.ts.map +1 -1
  49. package/dist/differenceInMinutes.js +2 -1
  50. package/dist/differenceInSeconds.d.ts.map +1 -1
  51. package/dist/differenceInSeconds.js +2 -1
  52. package/dist/eachDayOfInterval.d.ts +69 -0
  53. package/dist/eachDayOfInterval.d.ts.map +1 -0
  54. package/dist/eachDayOfInterval.js +8 -0
  55. package/dist/eachDayOfInterval.js.map +1 -0
  56. package/dist/eachDayOfInterval.test.d.ts +2 -0
  57. package/dist/eachDayOfInterval.test.d.ts.map +1 -0
  58. package/dist/eachHourOfInterval.d.ts +51 -0
  59. package/dist/eachHourOfInterval.d.ts.map +1 -0
  60. package/dist/eachHourOfInterval.js +8 -0
  61. package/dist/eachHourOfInterval.js.map +1 -0
  62. package/dist/eachHourOfInterval.test.d.ts +2 -0
  63. package/dist/eachHourOfInterval.test.d.ts.map +1 -0
  64. package/dist/eachMinuteOfInterval.d.ts +50 -0
  65. package/dist/eachMinuteOfInterval.d.ts.map +1 -0
  66. package/dist/eachMinuteOfInterval.js +8 -0
  67. package/dist/eachMinuteOfInterval.js.map +1 -0
  68. package/dist/eachMinuteOfInterval.test.d.ts +2 -0
  69. package/dist/eachMinuteOfInterval.test.d.ts.map +1 -0
  70. package/dist/eachMonthOfInterval.d.ts +46 -0
  71. package/dist/eachMonthOfInterval.d.ts.map +1 -0
  72. package/dist/eachMonthOfInterval.js +8 -0
  73. package/dist/eachMonthOfInterval.js.map +1 -0
  74. package/dist/eachMonthOfInterval.test.d.ts +2 -0
  75. package/dist/eachMonthOfInterval.test.d.ts.map +1 -0
  76. package/dist/eachWeekOfInterval.d.ts +58 -0
  77. package/dist/eachWeekOfInterval.d.ts.map +1 -0
  78. package/dist/eachWeekOfInterval.js +8 -0
  79. package/dist/eachWeekOfInterval.js.map +1 -0
  80. package/dist/eachWeekOfInterval.test.d.ts +2 -0
  81. package/dist/eachWeekOfInterval.test.d.ts.map +1 -0
  82. package/dist/eachYearOfInterval.d.ts +55 -0
  83. package/dist/eachYearOfInterval.d.ts.map +1 -0
  84. package/dist/eachYearOfInterval.js +8 -0
  85. package/dist/eachYearOfInterval.js.map +1 -0
  86. package/dist/eachYearOfInterval.test.d.ts +2 -0
  87. package/dist/eachYearOfInterval.test.d.ts.map +1 -0
  88. package/dist/endOfDay.d.ts.map +1 -1
  89. package/dist/endOfDay.js +2 -1
  90. package/dist/endOfMonth.d.ts.map +1 -1
  91. package/dist/endOfMonth.js +2 -1
  92. package/dist/endOfYear.d.ts.map +1 -1
  93. package/dist/endOfYear.js +2 -1
  94. package/dist/index.d.ts +6 -0
  95. package/dist/index.d.ts.map +1 -1
  96. package/dist/index.js +77 -50
  97. package/dist/intlFormatDistance.js +5 -4
  98. package/dist/isFuture.d.ts +1 -1
  99. package/dist/isFuture.d.ts.map +1 -1
  100. package/dist/isFuture.js +3 -1
  101. package/dist/isPast.d.ts +1 -1
  102. package/dist/isPast.d.ts.map +1 -1
  103. package/dist/isPast.js +3 -1
  104. package/dist/shared/differenceInMilliseconds.d.ts +3 -0
  105. package/dist/shared/differenceInMilliseconds.d.ts.map +1 -0
  106. package/dist/shared/differenceInMilliseconds.js +7 -0
  107. package/dist/shared/differenceInMilliseconds.js.map +1 -0
  108. package/dist/shared/normalizeWithPlainDate.d.ts +15 -0
  109. package/dist/shared/normalizeWithPlainDate.d.ts.map +1 -0
  110. package/dist/shared/normalizeWithPlainDate.js +9 -0
  111. package/dist/shared/normalizeWithPlainDate.js.map +1 -0
  112. package/dist/shared/nowZoned.d.ts +3 -0
  113. package/dist/shared/nowZoned.d.ts.map +1 -0
  114. package/dist/shared/nowZoned.js +8 -0
  115. package/dist/shared/nowZoned.js.map +1 -0
  116. package/dist/startOfDay.d.ts.map +1 -1
  117. package/dist/startOfDay.js +2 -1
  118. package/dist/startOfMonth.d.ts.map +1 -1
  119. package/dist/startOfMonth.js +2 -1
  120. package/dist/startOfYear.d.ts.map +1 -1
  121. package/dist/startOfYear.js +2 -1
  122. package/package.json +1 -1
  123. package/dist/chunk-2H4KLXGL.js +0 -16
  124. package/dist/chunk-2H4KLXGL.js.map +0 -1
  125. package/dist/chunk-7GEIOKVQ.js +0 -19
  126. package/dist/chunk-7GEIOKVQ.js.map +0 -1
  127. package/dist/chunk-D7DPB2JR.js.map +0 -1
  128. package/dist/chunk-GFWC7CHD.js +0 -21
  129. package/dist/chunk-GFWC7CHD.js.map +0 -1
  130. package/dist/chunk-GLGAVKGV.js +0 -24
  131. package/dist/chunk-GLGAVKGV.js.map +0 -1
  132. package/dist/chunk-ID52RFFD.js +0 -19
  133. package/dist/chunk-ID52RFFD.js.map +0 -1
  134. package/dist/chunk-PIDXROVB.js.map +0 -1
  135. package/dist/chunk-PWISCOZV.js +0 -23
  136. package/dist/chunk-PWISCOZV.js.map +0 -1
  137. package/dist/chunk-R5XN76EV.js +0 -16
  138. package/dist/chunk-R5XN76EV.js.map +0 -1
  139. package/dist/chunk-RJY62CDU.js.map +0 -1
  140. package/dist/chunk-XPJFOBPW.js +0 -24
  141. package/dist/chunk-XPJFOBPW.js.map +0 -1
  142. package/dist/chunk-ZHRMURYP.js.map +0 -1
  143. /package/dist/{chunk-TDQXOSO3.js.map → chunk-ZJQS7ZY7.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -43,6 +43,12 @@ export { endOfYear } from './endOfYear';
43
43
  export { isBefore } from './isBefore';
44
44
  export { isAfter } from './isAfter';
45
45
  export { isWithinInterval } from './isWithinInterval';
46
+ export { eachDayOfInterval } from './eachDayOfInterval';
47
+ export { eachHourOfInterval } from './eachHourOfInterval';
48
+ export { eachMinuteOfInterval } from './eachMinuteOfInterval';
49
+ export { eachMonthOfInterval } from './eachMonthOfInterval';
50
+ export { eachWeekOfInterval } from './eachWeekOfInterval';
51
+ export { eachYearOfInterval } from './eachYearOfInterval';
46
52
  export { isFuture } from './isFuture';
47
53
  export { isPast } from './isPast';
48
54
  export { isSameDay } from './isSameDay';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,KAAK,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,EACL,SAAS,EACT,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,WAAW,GACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,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AiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACL,kBAAkB,EAClB,KAAK,yBAAyB,GAC/B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,oBAAoB,EACpB,KAAK,2BAA2B,GACjC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,oBAAoB,EACpB,KAAK,2BAA2B,GACjC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,kBAAkB,EAClB,KAAK,yBAAyB,GAC/B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
package/dist/index.js CHANGED
@@ -1,9 +1,3 @@
1
- import {
2
- toIso9075
3
- } from "./chunk-DFLGGK4F.js";
4
- import {
5
- toPlainDate
6
- } from "./chunk-HFQUXON5.js";
7
1
  import {
8
2
  toPlainTime
9
3
  } from "./chunk-UJWM2BV2.js";
@@ -16,12 +10,6 @@ import {
16
10
  import {
17
11
  today
18
12
  } from "./chunk-KZB6NERH.js";
19
- import {
20
- subMonths
21
- } from "./chunk-52NEOY34.js";
22
- import {
23
- subNanoseconds
24
- } from "./chunk-WVHAYLBW.js";
25
13
  import {
26
14
  subSeconds
27
15
  } from "./chunk-BH2YB4MV.js";
@@ -38,14 +26,14 @@ import {
38
26
  toIso
39
27
  } from "./chunk-BSV32PSO.js";
40
28
  import {
41
- startOfMonth
42
- } from "./chunk-7GEIOKVQ.js";
29
+ toIso9075
30
+ } from "./chunk-DFLGGK4F.js";
43
31
  import {
44
- startOfWeek
45
- } from "./chunk-EZ7NVTZI.js";
32
+ toPlainDate
33
+ } from "./chunk-HFQUXON5.js";
46
34
  import {
47
35
  startOfYear
48
- } from "./chunk-ID52RFFD.js";
36
+ } from "./chunk-3TSFIPUR.js";
49
37
  import {
50
38
  subDays
51
39
  } from "./chunk-YKBP3G7L.js";
@@ -62,11 +50,11 @@ import {
62
50
  subMinutes
63
51
  } from "./chunk-J6G2I2TU.js";
64
52
  import {
65
- isSameYear
66
- } from "./chunk-VLZ3HQQA.js";
53
+ subMonths
54
+ } from "./chunk-52NEOY34.js";
67
55
  import {
68
- isWithinInterval
69
- } from "./chunk-5C3TQSWA.js";
56
+ subNanoseconds
57
+ } from "./chunk-WVHAYLBW.js";
70
58
  import {
71
59
  now
72
60
  } from "./chunk-FSD3DDFC.js";
@@ -84,13 +72,13 @@ import {
84
72
  } from "./chunk-TFSZ55L7.js";
85
73
  import {
86
74
  startOfDay
87
- } from "./chunk-GFWC7CHD.js";
75
+ } from "./chunk-YIT6EMBC.js";
88
76
  import {
89
- isSameHour
90
- } from "./chunk-EEQ3REET.js";
77
+ startOfMonth
78
+ } from "./chunk-HLGMUTFK.js";
91
79
  import {
92
- isSameMicrosecond
93
- } from "./chunk-PPB62JYV.js";
80
+ startOfWeek
81
+ } from "./chunk-EZ7NVTZI.js";
94
82
  import {
95
83
  isSameMillisecond
96
84
  } from "./chunk-ISHZRFVN.js";
@@ -110,11 +98,11 @@ import {
110
98
  isSameWeek
111
99
  } from "./chunk-JOD4ATPE.js";
112
100
  import {
113
- isPast
114
- } from "./chunk-2H4KLXGL.js";
101
+ isSameYear
102
+ } from "./chunk-VLZ3HQQA.js";
115
103
  import {
116
- isPlainDateAfter
117
- } from "./chunk-BPZ7BRJW.js";
104
+ isWithinInterval
105
+ } from "./chunk-5C3TQSWA.js";
118
106
  import {
119
107
  isPlainDateBefore
120
108
  } from "./chunk-4E7OGJ3F.js";
@@ -134,28 +122,62 @@ import {
134
122
  isSameDay
135
123
  } from "./chunk-RW3C2677.js";
136
124
  import {
137
- endOfYear
138
- } from "./chunk-GLGAVKGV.js";
125
+ isSameHour
126
+ } from "./chunk-EEQ3REET.js";
139
127
  import {
140
- format
141
- } from "./chunk-ZC6KWXCW.js";
128
+ isSameMicrosecond
129
+ } from "./chunk-PPB62JYV.js";
142
130
  import {
143
131
  formatPlainDate
144
132
  } from "./chunk-3A6X6WV5.js";
145
133
  import {
146
134
  intlFormatDistance
147
- } from "./chunk-TDQXOSO3.js";
135
+ } from "./chunk-ZJQS7ZY7.js";
148
136
  import {
149
137
  isAfter
150
138
  } from "./chunk-7VLSSOVC.js";
151
- import "./chunk-WY63VEXE.js";
152
139
  import {
153
140
  isBefore
154
141
  } from "./chunk-ZDA7GSWU.js";
155
- import "./chunk-WUAIUEH7.js";
156
142
  import {
157
143
  isFuture
158
- } from "./chunk-R5XN76EV.js";
144
+ } from "./chunk-JA7SVLAF.js";
145
+ import "./chunk-WY63VEXE.js";
146
+ import {
147
+ isPast
148
+ } from "./chunk-UBY22QWM.js";
149
+ import "./chunk-WUAIUEH7.js";
150
+ import "./chunk-QFNGYTTH.js";
151
+ import {
152
+ isPlainDateAfter
153
+ } from "./chunk-BPZ7BRJW.js";
154
+ import {
155
+ eachMonthOfInterval
156
+ } from "./chunk-TNCLJK4Y.js";
157
+ import {
158
+ eachWeekOfInterval
159
+ } from "./chunk-OLEOU3XE.js";
160
+ import {
161
+ eachYearOfInterval
162
+ } from "./chunk-BUX26GTD.js";
163
+ import {
164
+ endOfDay
165
+ } from "./chunk-HOCNCQTC.js";
166
+ import {
167
+ endOfMonth
168
+ } from "./chunk-OQ4CWKJT.js";
169
+ import {
170
+ endOfWeek
171
+ } from "./chunk-X26WIJ6L.js";
172
+ import {
173
+ endOfYear
174
+ } from "./chunk-776JOVV6.js";
175
+ import "./chunk-KGVUENQO.js";
176
+ import "./chunk-AVGNRINZ.js";
177
+ import "./chunk-JNA3AFOC.js";
178
+ import {
179
+ format
180
+ } from "./chunk-ZC6KWXCW.js";
159
181
  import {
160
182
  differenceInMonths
161
183
  } from "./chunk-BIAPE4MR.js";
@@ -164,7 +186,7 @@ import {
164
186
  } from "./chunk-OABS374T.js";
165
187
  import {
166
188
  differenceInSeconds
167
- } from "./chunk-ZHRMURYP.js";
189
+ } from "./chunk-QVOEXF46.js";
168
190
  import {
169
191
  differenceInWeeks
170
192
  } from "./chunk-PVAOUYXF.js";
@@ -172,16 +194,14 @@ import {
172
194
  differenceInYears
173
195
  } from "./chunk-CHW2EN2O.js";
174
196
  import {
175
- endOfDay
176
- } from "./chunk-XPJFOBPW.js";
197
+ eachDayOfInterval
198
+ } from "./chunk-DKYVFYWM.js";
177
199
  import {
178
- endOfMonth
179
- } from "./chunk-PWISCOZV.js";
200
+ eachHourOfInterval
201
+ } from "./chunk-Y7CIJQ67.js";
180
202
  import {
181
- endOfWeek
182
- } from "./chunk-X26WIJ6L.js";
183
- import "./chunk-AVGNRINZ.js";
184
- import "./chunk-JNA3AFOC.js";
203
+ eachMinuteOfInterval
204
+ } from "./chunk-G2JUEBC5.js";
185
205
  import {
186
206
  addWeeks
187
207
  } from "./chunk-DT2EWLHU.js";
@@ -196,16 +216,17 @@ import {
196
216
  } from "./chunk-6IP245MS.js";
197
217
  import {
198
218
  differenceInHours
199
- } from "./chunk-PIDXROVB.js";
219
+ } from "./chunk-PMJD5N5J.js";
200
220
  import {
201
221
  differenceInMicroseconds
202
222
  } from "./chunk-ZGR4NZTS.js";
203
223
  import {
204
224
  differenceInMilliseconds
205
- } from "./chunk-D7DPB2JR.js";
225
+ } from "./chunk-BV6CLVSI.js";
206
226
  import {
207
227
  differenceInMinutes
208
- } from "./chunk-RJY62CDU.js";
228
+ } from "./chunk-B2R2G5YK.js";
229
+ import "./chunk-AJ4JBKJK.js";
209
230
  import {
210
231
  addDays
211
232
  } from "./chunk-L4SVABDH.js";
@@ -253,6 +274,12 @@ export {
253
274
  differenceInSeconds,
254
275
  differenceInWeeks,
255
276
  differenceInYears,
277
+ eachDayOfInterval,
278
+ eachHourOfInterval,
279
+ eachMinuteOfInterval,
280
+ eachMonthOfInterval,
281
+ eachWeekOfInterval,
282
+ eachYearOfInterval,
256
283
  endOfDay,
257
284
  endOfMonth,
258
285
  endOfWeek,
@@ -1,13 +1,14 @@
1
1
  import {
2
2
  intlFormatDistance
3
- } from "./chunk-TDQXOSO3.js";
3
+ } from "./chunk-ZJQS7ZY7.js";
4
4
  import "./chunk-BIAPE4MR.js";
5
- import "./chunk-ZHRMURYP.js";
5
+ import "./chunk-QVOEXF46.js";
6
6
  import "./chunk-PVAOUYXF.js";
7
7
  import "./chunk-CHW2EN2O.js";
8
8
  import "./chunk-6IP245MS.js";
9
- import "./chunk-PIDXROVB.js";
10
- import "./chunk-RJY62CDU.js";
9
+ import "./chunk-PMJD5N5J.js";
10
+ import "./chunk-B2R2G5YK.js";
11
+ import "./chunk-AJ4JBKJK.js";
11
12
  import "./chunk-MJSZNWCV.js";
12
13
  export {
13
14
  intlFormatDistance
@@ -1,4 +1,4 @@
1
- import { Temporal } from '@js-temporal/polyfill';
1
+ import type { Temporal } from '@js-temporal/polyfill';
2
2
  /**
3
3
  * Returns true if the given datetime is in the future.
4
4
  * Compares by the underlying instant (epoch time) against the current time.
@@ -1 +1 @@
1
- {"version":3,"file":"isFuture.d.ts","sourceRoot":"","sources":["../src/isFuture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,QAAQ,CACtB,IAAI,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,GAC9C,OAAO,CAKT"}
1
+ {"version":3,"file":"isFuture.d.ts","sourceRoot":"","sources":["../src/isFuture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAKtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,QAAQ,CACtB,IAAI,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,GAC9C,OAAO,CAIT"}
package/dist/isFuture.js CHANGED
@@ -1,6 +1,8 @@
1
1
  import {
2
2
  isFuture
3
- } from "./chunk-R5XN76EV.js";
3
+ } from "./chunk-JA7SVLAF.js";
4
+ import "./chunk-WY63VEXE.js";
5
+ import "./chunk-QFNGYTTH.js";
4
6
  import "./chunk-MJSZNWCV.js";
5
7
  export {
6
8
  isFuture
package/dist/isPast.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Temporal } from '@js-temporal/polyfill';
1
+ import type { Temporal } from '@js-temporal/polyfill';
2
2
  /**
3
3
  * Returns true if the given datetime is in the past.
4
4
  * Compares by the underlying instant (epoch time) against the current time.
@@ -1 +1 @@
1
- {"version":3,"file":"isPast.d.ts","sourceRoot":"","sources":["../src/isPast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,MAAM,CACpB,IAAI,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,GAC9C,OAAO,CAKT"}
1
+ {"version":3,"file":"isPast.d.ts","sourceRoot":"","sources":["../src/isPast.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAKtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,MAAM,CACpB,IAAI,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,GAC9C,OAAO,CAIT"}
package/dist/isPast.js CHANGED
@@ -1,6 +1,8 @@
1
1
  import {
2
2
  isPast
3
- } from "./chunk-2H4KLXGL.js";
3
+ } from "./chunk-UBY22QWM.js";
4
+ import "./chunk-WUAIUEH7.js";
5
+ import "./chunk-QFNGYTTH.js";
4
6
  import "./chunk-MJSZNWCV.js";
5
7
  export {
6
8
  isPast
@@ -0,0 +1,3 @@
1
+ import { Temporal } from '@js-temporal/polyfill';
2
+ export declare function differenceInMilliseconds(laterDate: Temporal.ZonedDateTime, earlierDate: Temporal.ZonedDateTime): number;
3
+ //# sourceMappingURL=differenceInMilliseconds.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"differenceInMilliseconds.d.ts","sourceRoot":"","sources":["../../src/shared/differenceInMilliseconds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,QAAQ,CAAC,aAAa,EACjC,WAAW,EAAE,QAAQ,CAAC,aAAa,GAClC,MAAM,CAER"}
@@ -0,0 +1,7 @@
1
+ import {
2
+ differenceInMilliseconds
3
+ } from "../chunk-AJ4JBKJK.js";
4
+ export {
5
+ differenceInMilliseconds
6
+ };
7
+ //# sourceMappingURL=differenceInMilliseconds.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,15 @@
1
+ import { Temporal } from '@js-temporal/polyfill';
2
+ import type { Timezone } from '../types';
3
+ /**
4
+ * @internal
5
+ * Normalizes any temporal input (Instant, ZonedDateTime, or PlainDate) to ZonedDateTime.
6
+ * - Instant → UTC ZonedDateTime
7
+ * - ZonedDateTime → returned as-is
8
+ * - PlainDate → ZonedDateTime at midnight in the specified timezone
9
+ *
10
+ * This is an internal helper - do not use directly.
11
+ */
12
+ export declare function normalizeWithPlainDate(input: Temporal.Instant | Temporal.ZonedDateTime): Temporal.ZonedDateTime;
13
+ export declare function normalizeWithPlainDate(input: Temporal.PlainDate, timezone: Timezone): Temporal.ZonedDateTime;
14
+ export declare function normalizeWithPlainDate(input: Temporal.Instant | Temporal.ZonedDateTime | Temporal.PlainDate, timezone?: Timezone): Temporal.ZonedDateTime;
15
+ //# sourceMappingURL=normalizeWithPlainDate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeWithPlainDate.d.ts","sourceRoot":"","sources":["../../src/shared/normalizeWithPlainDate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAIzC;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,GAC/C,QAAQ,CAAC,aAAa,CAAC;AAC1B,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,QAAQ,CAAC,SAAS,EACzB,QAAQ,EAAE,QAAQ,GACjB,QAAQ,CAAC,aAAa,CAAC;AAC1B,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,GAAG,QAAQ,CAAC,SAAS,EACrE,QAAQ,CAAC,EAAE,QAAQ,GAClB,QAAQ,CAAC,aAAa,CAAC"}
@@ -0,0 +1,9 @@
1
+ import {
2
+ normalizeWithPlainDate
3
+ } from "../chunk-KGVUENQO.js";
4
+ import "../chunk-JNA3AFOC.js";
5
+ import "../chunk-MJSZNWCV.js";
6
+ export {
7
+ normalizeWithPlainDate
8
+ };
9
+ //# sourceMappingURL=normalizeWithPlainDate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,3 @@
1
+ import { Temporal } from '@js-temporal/polyfill';
2
+ export declare function nowZoned(): Temporal.ZonedDateTime;
3
+ //# sourceMappingURL=nowZoned.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nowZoned.d.ts","sourceRoot":"","sources":["../../src/shared/nowZoned.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjD,wBAAgB,QAAQ,IAAI,QAAQ,CAAC,aAAa,CAEjD"}
@@ -0,0 +1,8 @@
1
+ import {
2
+ nowZoned
3
+ } from "../chunk-QFNGYTTH.js";
4
+ import "../chunk-MJSZNWCV.js";
5
+ export {
6
+ nowZoned
7
+ };
8
+ //# sourceMappingURL=nowZoned.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"startOfDay.d.ts","sourceRoot":"","sources":["../src/startOfDay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAIxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,GAC/C,QAAQ,CAAC,aAAa,CAAC;AAC1B,wBAAgB,UAAU,CACxB,KAAK,EAAE,QAAQ,CAAC,SAAS,EACzB,QAAQ,EAAE,QAAQ,GACjB,QAAQ,CAAC,aAAa,CAAC"}
1
+ {"version":3,"file":"startOfDay.d.ts","sourceRoot":"","sources":["../src/startOfDay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,GAC/C,QAAQ,CAAC,aAAa,CAAC;AAC1B,wBAAgB,UAAU,CACxB,KAAK,EAAE,QAAQ,CAAC,SAAS,EACzB,QAAQ,EAAE,QAAQ,GACjB,QAAQ,CAAC,aAAa,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  startOfDay
3
- } from "./chunk-GFWC7CHD.js";
3
+ } from "./chunk-YIT6EMBC.js";
4
+ import "./chunk-KGVUENQO.js";
4
5
  import "./chunk-JNA3AFOC.js";
5
6
  import "./chunk-MJSZNWCV.js";
6
7
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"startOfMonth.d.ts","sourceRoot":"","sources":["../src/startOfMonth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAIxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,GAC/C,QAAQ,CAAC,aAAa,CAAC;AAC1B,wBAAgB,YAAY,CAC1B,KAAK,EAAE,QAAQ,CAAC,SAAS,EACzB,QAAQ,EAAE,QAAQ,GACjB,QAAQ,CAAC,aAAa,CAAC"}
1
+ {"version":3,"file":"startOfMonth.d.ts","sourceRoot":"","sources":["../src/startOfMonth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,GAC/C,QAAQ,CAAC,aAAa,CAAC;AAC1B,wBAAgB,YAAY,CAC1B,KAAK,EAAE,QAAQ,CAAC,SAAS,EACzB,QAAQ,EAAE,QAAQ,GACjB,QAAQ,CAAC,aAAa,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  startOfMonth
3
- } from "./chunk-7GEIOKVQ.js";
3
+ } from "./chunk-HLGMUTFK.js";
4
+ import "./chunk-KGVUENQO.js";
4
5
  import "./chunk-JNA3AFOC.js";
5
6
  import "./chunk-MJSZNWCV.js";
6
7
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"startOfYear.d.ts","sourceRoot":"","sources":["../src/startOfYear.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAIxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,GAC/C,QAAQ,CAAC,aAAa,CAAC;AAC1B,wBAAgB,WAAW,CACzB,KAAK,EAAE,QAAQ,CAAC,SAAS,EACzB,QAAQ,EAAE,QAAQ,GACjB,QAAQ,CAAC,aAAa,CAAC"}
1
+ {"version":3,"file":"startOfYear.d.ts","sourceRoot":"","sources":["../src/startOfYear.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,GAC/C,QAAQ,CAAC,aAAa,CAAC;AAC1B,wBAAgB,WAAW,CACzB,KAAK,EAAE,QAAQ,CAAC,SAAS,EACzB,QAAQ,EAAE,QAAQ,GACjB,QAAQ,CAAC,aAAa,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  startOfYear
3
- } from "./chunk-ID52RFFD.js";
3
+ } from "./chunk-3TSFIPUR.js";
4
+ import "./chunk-KGVUENQO.js";
4
5
  import "./chunk-JNA3AFOC.js";
5
6
  import "./chunk-MJSZNWCV.js";
6
7
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gobrand/tiempo",
3
- "version": "2.6.1",
3
+ "version": "2.6.3",
4
4
  "description": "Lightweight utility functions for converting between UTC and timezone-aware datetimes using the Temporal API",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -1,16 +0,0 @@
1
- import {
2
- normalizeTemporalInput
3
- } from "./chunk-MJSZNWCV.js";
4
-
5
- // src/isPast.ts
6
- import { Temporal } from "@js-temporal/polyfill";
7
- function isPast(date) {
8
- const zoned = normalizeTemporalInput(date);
9
- const nowInstant = Temporal.Now.instant();
10
- return Temporal.Instant.compare(zoned.toInstant(), nowInstant) < 0;
11
- }
12
-
13
- export {
14
- isPast
15
- };
16
- //# sourceMappingURL=chunk-2H4KLXGL.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/isPast.ts"],"sourcesContent":["import { Temporal } from '@js-temporal/polyfill';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\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(\n date: Temporal.Instant | Temporal.ZonedDateTime\n): boolean {\n const zoned = normalizeTemporalInput(date);\n const nowInstant = Temporal.Now.instant();\n\n return Temporal.Instant.compare(zoned.toInstant(), nowInstant) < 0;\n}\n"],"mappings":";;;;;AAAA,SAAS,gBAAgB;AAmClB,SAAS,OACd,MACS;AACT,QAAM,QAAQ,uBAAuB,IAAI;AACzC,QAAM,aAAa,SAAS,IAAI,QAAQ;AAExC,SAAO,SAAS,QAAQ,QAAQ,MAAM,UAAU,GAAG,UAAU,IAAI;AACnE;","names":[]}
@@ -1,19 +0,0 @@
1
- import {
2
- plainDateToZonedDateTime
3
- } from "./chunk-JNA3AFOC.js";
4
- import {
5
- normalizeTemporalInput
6
- } from "./chunk-MJSZNWCV.js";
7
-
8
- // src/startOfMonth.ts
9
- import { Temporal } from "@js-temporal/polyfill";
10
- function startOfMonth(input, timezone) {
11
- const zonedDateTime = input instanceof Temporal.PlainDate ? plainDateToZonedDateTime(input, timezone) : normalizeTemporalInput(input);
12
- const firstDay = zonedDateTime.with({ day: 1 });
13
- return firstDay.startOfDay();
14
- }
15
-
16
- export {
17
- startOfMonth
18
- };
19
- //# sourceMappingURL=chunk-7GEIOKVQ.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/startOfMonth.ts"],"sourcesContent":["import { Temporal } from '@js-temporal/polyfill';\nimport type { Timezone } from './types';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\nimport { plainDateToZonedDateTime } from './shared/plainDateToZonedDateTime';\n\n/**\n * Returns a ZonedDateTime representing the first moment of the month (day 1 at midnight).\n *\n * @param input - A Temporal.Instant (UTC) or Temporal.ZonedDateTime\n * @returns ZonedDateTime at the 1st day of the month at 00:00:00.000000000\n *\n * @example\n * ```ts\n * // From Instant (always UTC)\n * const instant = Temporal.Instant.from('2025-01-15T12:00:00Z');\n * const start = startOfMonth(instant);\n * // 2025-01-01T00:00:00Z[UTC]\n * ```\n *\n * @example\n * ```ts\n * // From ZonedDateTime (uses its timezone)\n * const zoned = Temporal.ZonedDateTime.from('2025-01-15T15:30:00-05:00[America/New_York]');\n * const start = startOfMonth(zoned);\n * // 2025-01-01T00:00:00-05:00[America/New_York]\n * ```\n *\n * @example\n * ```ts\n * // From PlainDate (requires timezone)\n * const date = Temporal.PlainDate.from('2025-01-15');\n * const start = startOfMonth(date, 'America/New_York');\n * // 2025-01-01T00:00:00-05:00[America/New_York]\n * ```\n */\nexport function startOfMonth(\n input: Temporal.Instant | Temporal.ZonedDateTime\n): Temporal.ZonedDateTime;\nexport function startOfMonth(\n input: Temporal.PlainDate,\n timezone: Timezone\n): Temporal.ZonedDateTime;\nexport function startOfMonth(\n input: Temporal.Instant | Temporal.ZonedDateTime | Temporal.PlainDate,\n timezone?: Timezone\n): Temporal.ZonedDateTime {\n const zonedDateTime =\n input instanceof Temporal.PlainDate\n ? plainDateToZonedDateTime(input, timezone!)\n : normalizeTemporalInput(input);\n\n // Set day to 1, then get start of that day\n const firstDay = zonedDateTime.with({ day: 1 });\n\n return firstDay.startOfDay();\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,gBAAgB;AA0ClB,SAAS,aACd,OACA,UACwB;AACxB,QAAM,gBACJ,iBAAiB,SAAS,YACtB,yBAAyB,OAAO,QAAS,IACzC,uBAAuB,KAAK;AAGlC,QAAM,WAAW,cAAc,KAAK,EAAE,KAAK,EAAE,CAAC;AAE9C,SAAO,SAAS,WAAW;AAC7B;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/differenceInMilliseconds.ts"],"sourcesContent":["import { Temporal } from '@js-temporal/polyfill';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\n\n/**\n * Returns the number of milliseconds between two datetimes.\n * The result is positive if laterDate is after earlierDate, negative if before.\n *\n * @param laterDate - The later datetime (Instant or ZonedDateTime)\n * @param earlierDate - The earlier datetime (Instant or ZonedDateTime)\n * @returns The number of milliseconds between the dates\n *\n * @example\n * ```ts\n * const later = Temporal.Instant.from('2025-01-20T12:30:21.700Z');\n * const earlier = Temporal.Instant.from('2025-01-20T12:30:20.600Z');\n *\n * differenceInMilliseconds(later, earlier); // 1100\n * ```\n *\n * @example\n * ```ts\n * // Works with ZonedDateTime\n * const later = Temporal.ZonedDateTime.from('2025-01-20T15:00:00-05:00[America/New_York]');\n * const earlier = Temporal.ZonedDateTime.from('2025-01-20T14:00:00-05:00[America/New_York]');\n *\n * differenceInMilliseconds(later, earlier); // 3600000\n * ```\n *\n * @example\n * ```ts\n * // Handles different timezones - compares by instant\n * const tokyo = Temporal.ZonedDateTime.from('2025-01-21T00:00:00+09:00[Asia/Tokyo]');\n * const ny = Temporal.ZonedDateTime.from('2025-01-20T10:00:00-05:00[America/New_York]');\n *\n * differenceInMilliseconds(tokyo, ny); // 0 (same instant)\n * ```\n */\nexport function differenceInMilliseconds(\n laterDate: Temporal.Instant | Temporal.ZonedDateTime,\n earlierDate: Temporal.Instant | Temporal.ZonedDateTime\n): number {\n const zoned1 = normalizeTemporalInput(laterDate);\n const zoned2 = normalizeTemporalInput(earlierDate);\n\n return zoned1.epochMilliseconds - zoned2.epochMilliseconds;\n}\n"],"mappings":";;;;;AAAA,OAAyB;AAqClB,SAAS,yBACd,WACA,aACQ;AACR,QAAM,SAAS,uBAAuB,SAAS;AAC/C,QAAM,SAAS,uBAAuB,WAAW;AAEjD,SAAO,OAAO,oBAAoB,OAAO;AAC3C;","names":[]}
@@ -1,21 +0,0 @@
1
- import {
2
- plainDateToZonedDateTime
3
- } from "./chunk-JNA3AFOC.js";
4
- import {
5
- normalizeTemporalInput
6
- } from "./chunk-MJSZNWCV.js";
7
-
8
- // src/startOfDay.ts
9
- import { Temporal } from "@js-temporal/polyfill";
10
- function startOfDay(input, timezone) {
11
- if (input instanceof Temporal.PlainDate) {
12
- return plainDateToZonedDateTime(input, timezone).startOfDay();
13
- }
14
- const zonedDateTime = normalizeTemporalInput(input);
15
- return zonedDateTime.startOfDay();
16
- }
17
-
18
- export {
19
- startOfDay
20
- };
21
- //# sourceMappingURL=chunk-GFWC7CHD.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/startOfDay.ts"],"sourcesContent":["import { Temporal } from '@js-temporal/polyfill';\nimport type { Timezone } from './types';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\nimport { plainDateToZonedDateTime } from './shared/plainDateToZonedDateTime';\n\n/**\n * Returns a ZonedDateTime representing the first moment of the day (midnight).\n *\n * @param input - A Temporal.Instant (UTC) or Temporal.ZonedDateTime\n * @returns ZonedDateTime at 00:00:00.000000000\n *\n * @example\n * ```ts\n * // From Instant (always UTC)\n * const instant = Temporal.Instant.from('2025-01-20T12:00:00Z');\n * const start = startOfDay(instant);\n * // 2025-01-20T00:00:00Z[UTC]\n * ```\n *\n * @example\n * ```ts\n * // From ZonedDateTime (uses its timezone)\n * const zoned = Temporal.ZonedDateTime.from('2025-01-20T15:30:00-05:00[America/New_York]');\n * const start = startOfDay(zoned);\n * // 2025-01-20T00:00:00-05:00[America/New_York]\n * ```\n *\n * @example\n * ```ts\n * // From PlainDate (requires timezone)\n * const date = Temporal.PlainDate.from('2025-01-20');\n * const start = startOfDay(date, 'America/New_York');\n * // 2025-01-20T00:00:00-05:00[America/New_York]\n * ```\n */\nexport function startOfDay(\n input: Temporal.Instant | Temporal.ZonedDateTime\n): Temporal.ZonedDateTime;\nexport function startOfDay(\n input: Temporal.PlainDate,\n timezone: Timezone\n): Temporal.ZonedDateTime;\nexport function startOfDay(\n input: Temporal.Instant | Temporal.ZonedDateTime | Temporal.PlainDate,\n timezone?: Timezone\n): Temporal.ZonedDateTime {\n if (input instanceof Temporal.PlainDate) {\n return plainDateToZonedDateTime(input, timezone!).startOfDay();\n }\n\n const zonedDateTime = normalizeTemporalInput(input);\n return zonedDateTime.startOfDay();\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,gBAAgB;AA0ClB,SAAS,WACd,OACA,UACwB;AACxB,MAAI,iBAAiB,SAAS,WAAW;AACvC,WAAO,yBAAyB,OAAO,QAAS,EAAE,WAAW;AAAA,EAC/D;AAEA,QAAM,gBAAgB,uBAAuB,KAAK;AAClD,SAAO,cAAc,WAAW;AAClC;","names":[]}
@@ -1,24 +0,0 @@
1
- import {
2
- getEndOfDay
3
- } from "./chunk-AVGNRINZ.js";
4
- import {
5
- plainDateToZonedDateTime
6
- } from "./chunk-JNA3AFOC.js";
7
- import {
8
- normalizeTemporalInput
9
- } from "./chunk-MJSZNWCV.js";
10
-
11
- // src/endOfYear.ts
12
- import { Temporal } from "@js-temporal/polyfill";
13
- function endOfYear(input, timezone) {
14
- const zonedDateTime = input instanceof Temporal.PlainDate ? plainDateToZonedDateTime(input, timezone) : normalizeTemporalInput(input);
15
- const monthsInYear = zonedDateTime.monthsInYear;
16
- const lastMonth = zonedDateTime.with({ month: monthsInYear });
17
- const lastDay = lastMonth.with({ day: lastMonth.daysInMonth });
18
- return getEndOfDay(lastDay);
19
- }
20
-
21
- export {
22
- endOfYear
23
- };
24
- //# sourceMappingURL=chunk-GLGAVKGV.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/endOfYear.ts"],"sourcesContent":["import { Temporal } from '@js-temporal/polyfill';\nimport type { Timezone } from './types';\nimport { getEndOfDay } from './shared/endOfDay';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\nimport { plainDateToZonedDateTime } from './shared/plainDateToZonedDateTime';\n\n/**\n * Returns a ZonedDateTime representing the last moment of the year (last day at 23:59:59.999999999).\n *\n * @param input - A Temporal.Instant (UTC) or Temporal.ZonedDateTime\n * @returns ZonedDateTime at the last day of the year at 23:59:59.999999999\n *\n * @example\n * ```ts\n * // From Instant (always UTC)\n * const instant = Temporal.Instant.from('2025-06-15T12:00:00Z');\n * const end = endOfYear(instant);\n * // 2025-12-31T23:59:59.999999999Z[UTC]\n * ```\n *\n * @example\n * ```ts\n * // From ZonedDateTime (uses its timezone)\n * const zoned = Temporal.ZonedDateTime.from('2025-06-15T15:30:00-05:00[America/New_York]');\n * const end = endOfYear(zoned);\n * // 2025-12-31T23:59:59.999999999-05:00[America/New_York]\n * ```\n *\n * @example\n * ```ts\n * // From PlainDate (requires timezone)\n * const date = Temporal.PlainDate.from('2025-06-15');\n * const end = endOfYear(date, 'America/New_York');\n * // 2025-12-31T23:59:59.999999999-05:00[America/New_York]\n * ```\n */\nexport function endOfYear(\n input: Temporal.Instant | Temporal.ZonedDateTime\n): Temporal.ZonedDateTime;\nexport function endOfYear(\n input: Temporal.PlainDate,\n timezone: Timezone\n): Temporal.ZonedDateTime;\nexport function endOfYear(\n input: Temporal.Instant | Temporal.ZonedDateTime | Temporal.PlainDate,\n timezone?: Timezone\n): Temporal.ZonedDateTime {\n const zonedDateTime =\n input instanceof Temporal.PlainDate\n ? plainDateToZonedDateTime(input, timezone!)\n : normalizeTemporalInput(input);\n\n // Get the number of months in this year\n const monthsInYear = zonedDateTime.monthsInYear;\n\n // Set to last month, then get last day of that month\n const lastMonth = zonedDateTime.with({ month: monthsInYear });\n const lastDay = lastMonth.with({ day: lastMonth.daysInMonth });\n\n return getEndOfDay(lastDay);\n}\n"],"mappings":";;;;;;;;;;;AAAA,SAAS,gBAAgB;AA2ClB,SAAS,UACd,OACA,UACwB;AACxB,QAAM,gBACJ,iBAAiB,SAAS,YACtB,yBAAyB,OAAO,QAAS,IACzC,uBAAuB,KAAK;AAGlC,QAAM,eAAe,cAAc;AAGnC,QAAM,YAAY,cAAc,KAAK,EAAE,OAAO,aAAa,CAAC;AAC5D,QAAM,UAAU,UAAU,KAAK,EAAE,KAAK,UAAU,YAAY,CAAC;AAE7D,SAAO,YAAY,OAAO;AAC5B;","names":[]}
@@ -1,19 +0,0 @@
1
- import {
2
- plainDateToZonedDateTime
3
- } from "./chunk-JNA3AFOC.js";
4
- import {
5
- normalizeTemporalInput
6
- } from "./chunk-MJSZNWCV.js";
7
-
8
- // src/startOfYear.ts
9
- import { Temporal } from "@js-temporal/polyfill";
10
- function startOfYear(input, timezone) {
11
- const zonedDateTime = input instanceof Temporal.PlainDate ? plainDateToZonedDateTime(input, timezone) : normalizeTemporalInput(input);
12
- const firstDay = zonedDateTime.with({ month: 1, day: 1 });
13
- return firstDay.startOfDay();
14
- }
15
-
16
- export {
17
- startOfYear
18
- };
19
- //# sourceMappingURL=chunk-ID52RFFD.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/startOfYear.ts"],"sourcesContent":["import { Temporal } from '@js-temporal/polyfill';\nimport type { Timezone } from './types';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\nimport { plainDateToZonedDateTime } from './shared/plainDateToZonedDateTime';\n\n/**\n * Returns a ZonedDateTime representing the first moment of the year (January 1 at midnight).\n *\n * @param input - A Temporal.Instant (UTC) or Temporal.ZonedDateTime\n * @returns ZonedDateTime at January 1st at 00:00:00.000000000\n *\n * @example\n * ```ts\n * // From Instant (always UTC)\n * const instant = Temporal.Instant.from('2025-06-15T12:00:00Z');\n * const start = startOfYear(instant);\n * // 2025-01-01T00:00:00Z[UTC]\n * ```\n *\n * @example\n * ```ts\n * // From ZonedDateTime (uses its timezone)\n * const zoned = Temporal.ZonedDateTime.from('2025-06-15T15:30:00-05:00[America/New_York]');\n * const start = startOfYear(zoned);\n * // 2025-01-01T00:00:00-05:00[America/New_York]\n * ```\n *\n * @example\n * ```ts\n * // From PlainDate (requires timezone)\n * const date = Temporal.PlainDate.from('2025-06-15');\n * const start = startOfYear(date, 'America/New_York');\n * // 2025-01-01T00:00:00-05:00[America/New_York]\n * ```\n */\nexport function startOfYear(\n input: Temporal.Instant | Temporal.ZonedDateTime\n): Temporal.ZonedDateTime;\nexport function startOfYear(\n input: Temporal.PlainDate,\n timezone: Timezone\n): Temporal.ZonedDateTime;\nexport function startOfYear(\n input: Temporal.Instant | Temporal.ZonedDateTime | Temporal.PlainDate,\n timezone?: Timezone\n): Temporal.ZonedDateTime {\n const zonedDateTime =\n input instanceof Temporal.PlainDate\n ? plainDateToZonedDateTime(input, timezone!)\n : normalizeTemporalInput(input);\n\n // Set to January 1st, then get start of that day\n const firstDay = zonedDateTime.with({ month: 1, day: 1 });\n\n return firstDay.startOfDay();\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,gBAAgB;AA0ClB,SAAS,YACd,OACA,UACwB;AACxB,QAAM,gBACJ,iBAAiB,SAAS,YACtB,yBAAyB,OAAO,QAAS,IACzC,uBAAuB,KAAK;AAGlC,QAAM,WAAW,cAAc,KAAK,EAAE,OAAO,GAAG,KAAK,EAAE,CAAC;AAExD,SAAO,SAAS,WAAW;AAC7B;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/differenceInHours.ts"],"sourcesContent":["import { Temporal } from '@js-temporal/polyfill';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\n\n/**\n * Returns the number of hours between two datetimes.\n * The result is positive if laterDate is after earlierDate, negative if before.\n *\n * @param laterDate - The later datetime (Instant or ZonedDateTime)\n * @param earlierDate - The earlier datetime (Instant or ZonedDateTime)\n * @returns The number of hours between the dates\n *\n * @example\n * ```ts\n * const later = Temporal.Instant.from('2025-01-20T18:00:00Z');\n * const earlier = Temporal.Instant.from('2025-01-20T15:00:00Z');\n *\n * differenceInHours(later, earlier); // 3\n * ```\n *\n * @example\n * ```ts\n * // Works with ZonedDateTime\n * const later = Temporal.ZonedDateTime.from('2025-01-21T00:00:00-05:00[America/New_York]');\n * const earlier = Temporal.ZonedDateTime.from('2025-01-20T15:00:00-05:00[America/New_York]');\n *\n * differenceInHours(later, earlier); // 9\n * ```\n *\n * @example\n * ```ts\n * // Handles different timezones - compares by instant\n * const tokyo = Temporal.ZonedDateTime.from('2025-01-21T00:00:00+09:00[Asia/Tokyo]');\n * const ny = Temporal.ZonedDateTime.from('2025-01-20T10:00:00-05:00[America/New_York]');\n *\n * differenceInHours(tokyo, ny); // 0 (same instant)\n * ```\n */\nexport function differenceInHours(\n laterDate: Temporal.Instant | Temporal.ZonedDateTime,\n earlierDate: Temporal.Instant | Temporal.ZonedDateTime\n): number {\n const zoned1 = normalizeTemporalInput(laterDate);\n const zoned2 = normalizeTemporalInput(earlierDate);\n\n return Math.trunc((zoned1.epochMilliseconds - zoned2.epochMilliseconds) / 3600000);\n}\n"],"mappings":";;;;;AAAA,OAAyB;AAqClB,SAAS,kBACd,WACA,aACQ;AACR,QAAM,SAAS,uBAAuB,SAAS;AAC/C,QAAM,SAAS,uBAAuB,WAAW;AAEjD,SAAO,KAAK,OAAO,OAAO,oBAAoB,OAAO,qBAAqB,IAAO;AACnF;","names":[]}