ts-time-utils 3.0.0 → 4.0.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 +401 -1329
- package/dist/calculate.d.ts +25 -0
- package/dist/calculate.d.ts.map +1 -1
- package/dist/calculate.js +125 -0
- package/dist/calendar.d.ts +45 -0
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.js +68 -0
- package/dist/calendars.d.ts +156 -0
- package/dist/calendars.d.ts.map +1 -0
- package/dist/calendars.js +348 -0
- package/dist/compare.d.ts +27 -0
- package/dist/compare.d.ts.map +1 -1
- package/dist/compare.js +46 -0
- package/dist/esm/calculate.d.ts +25 -0
- package/dist/esm/calculate.d.ts.map +1 -1
- package/dist/esm/calculate.js +125 -0
- package/dist/esm/calendar.d.ts +45 -0
- package/dist/esm/calendar.d.ts.map +1 -1
- package/dist/esm/calendar.js +68 -0
- package/dist/esm/calendars.d.ts +156 -0
- package/dist/esm/calendars.d.ts.map +1 -0
- package/dist/esm/calendars.js +348 -0
- package/dist/esm/compare.d.ts +27 -0
- package/dist/esm/compare.d.ts.map +1 -1
- package/dist/esm/compare.js +46 -0
- package/dist/esm/holidays.d.ts +11 -1
- package/dist/esm/holidays.d.ts.map +1 -1
- package/dist/esm/holidays.js +220 -1
- package/dist/esm/index.d.ts +13 -7
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +17 -9
- package/dist/esm/iterate.d.ts +55 -0
- package/dist/esm/iterate.d.ts.map +1 -1
- package/dist/esm/iterate.js +86 -0
- package/dist/esm/locale.d.ts +53 -0
- package/dist/esm/locale.d.ts.map +1 -1
- package/dist/esm/locale.js +141 -0
- package/dist/esm/precision.d.ts +225 -0
- package/dist/esm/precision.d.ts.map +1 -0
- package/dist/esm/precision.js +491 -0
- package/dist/esm/temporal.d.ts +237 -0
- package/dist/esm/temporal.d.ts.map +1 -0
- package/dist/esm/temporal.js +660 -0
- package/dist/esm/validate.d.ts +30 -0
- package/dist/esm/validate.d.ts.map +1 -1
- package/dist/esm/validate.js +48 -0
- package/dist/holidays.d.ts +11 -1
- package/dist/holidays.d.ts.map +1 -1
- package/dist/holidays.js +220 -1
- package/dist/index.d.ts +13 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -9
- package/dist/iterate.d.ts +55 -0
- package/dist/iterate.d.ts.map +1 -1
- package/dist/iterate.js +86 -0
- package/dist/locale.d.ts +53 -0
- package/dist/locale.d.ts.map +1 -1
- package/dist/locale.js +141 -0
- package/dist/precision.d.ts +225 -0
- package/dist/precision.d.ts.map +1 -0
- package/dist/precision.js +491 -0
- package/dist/temporal.d.ts +237 -0
- package/dist/temporal.d.ts.map +1 -0
- package/dist/temporal.js +660 -0
- package/dist/validate.d.ts +30 -0
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +48 -0
- package/package.json +22 -2
|
@@ -0,0 +1,660 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Temporal API compatibility layer
|
|
3
|
+
* Provides Temporal-like objects that work with native Date
|
|
4
|
+
* When Temporal ships natively, these become thin wrappers
|
|
5
|
+
*/
|
|
6
|
+
// Helper functions
|
|
7
|
+
function getWeekNumber(date) {
|
|
8
|
+
const d = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));
|
|
9
|
+
const dayNum = d.getUTCDay() || 7;
|
|
10
|
+
d.setUTCDate(d.getUTCDate() + 4 - dayNum);
|
|
11
|
+
const yearStart = new Date(Date.UTC(d.getUTCFullYear(), 0, 1));
|
|
12
|
+
return Math.ceil((((d.getTime() - yearStart.getTime()) / 86400000) + 1) / 7);
|
|
13
|
+
}
|
|
14
|
+
function getDayOfYear(date) {
|
|
15
|
+
const start = new Date(date.getFullYear(), 0, 0);
|
|
16
|
+
const diff = date.getTime() - start.getTime();
|
|
17
|
+
return Math.floor(diff / 86400000);
|
|
18
|
+
}
|
|
19
|
+
function getDaysInMonth(year, month) {
|
|
20
|
+
return new Date(year, month, 0).getDate();
|
|
21
|
+
}
|
|
22
|
+
function getDaysInYear(year) {
|
|
23
|
+
return isLeapYear(year) ? 366 : 365;
|
|
24
|
+
}
|
|
25
|
+
function isLeapYear(year) {
|
|
26
|
+
return (year % 4 === 0 && year % 100 !== 0) || (year % 400 === 0);
|
|
27
|
+
}
|
|
28
|
+
function formatOffset(offsetMinutes) {
|
|
29
|
+
const sign = offsetMinutes >= 0 ? '+' : '-';
|
|
30
|
+
const absMinutes = Math.abs(offsetMinutes);
|
|
31
|
+
const hours = Math.floor(absMinutes / 60);
|
|
32
|
+
const mins = absMinutes % 60;
|
|
33
|
+
return `${sign}${hours.toString().padStart(2, '0')}:${mins.toString().padStart(2, '0')}`;
|
|
34
|
+
}
|
|
35
|
+
function compareDates(a, b) {
|
|
36
|
+
const diff = a.getTime() - b.getTime();
|
|
37
|
+
return diff < 0 ? -1 : diff > 0 ? 1 : 0;
|
|
38
|
+
}
|
|
39
|
+
// Duration implementation
|
|
40
|
+
class DurationImpl {
|
|
41
|
+
constructor(fields = {}) {
|
|
42
|
+
this.years = fields.years || 0;
|
|
43
|
+
this.months = fields.months || 0;
|
|
44
|
+
this.weeks = fields.weeks || 0;
|
|
45
|
+
this.days = fields.days || 0;
|
|
46
|
+
this.hours = fields.hours || 0;
|
|
47
|
+
this.minutes = fields.minutes || 0;
|
|
48
|
+
this.seconds = fields.seconds || 0;
|
|
49
|
+
this.milliseconds = fields.milliseconds || 0;
|
|
50
|
+
}
|
|
51
|
+
get sign() {
|
|
52
|
+
const total = this.years + this.months + this.weeks + this.days +
|
|
53
|
+
this.hours + this.minutes + this.seconds + this.milliseconds;
|
|
54
|
+
return total < 0 ? -1 : total > 0 ? 1 : 0;
|
|
55
|
+
}
|
|
56
|
+
get blank() {
|
|
57
|
+
return this.sign === 0;
|
|
58
|
+
}
|
|
59
|
+
toString() {
|
|
60
|
+
if (this.blank)
|
|
61
|
+
return 'PT0S';
|
|
62
|
+
let result = this.sign < 0 ? '-P' : 'P';
|
|
63
|
+
if (this.years)
|
|
64
|
+
result += `${Math.abs(this.years)}Y`;
|
|
65
|
+
if (this.months)
|
|
66
|
+
result += `${Math.abs(this.months)}M`;
|
|
67
|
+
if (this.weeks)
|
|
68
|
+
result += `${Math.abs(this.weeks)}W`;
|
|
69
|
+
if (this.days)
|
|
70
|
+
result += `${Math.abs(this.days)}D`;
|
|
71
|
+
const hasTime = this.hours || this.minutes || this.seconds || this.milliseconds;
|
|
72
|
+
if (hasTime) {
|
|
73
|
+
result += 'T';
|
|
74
|
+
if (this.hours)
|
|
75
|
+
result += `${Math.abs(this.hours)}H`;
|
|
76
|
+
if (this.minutes)
|
|
77
|
+
result += `${Math.abs(this.minutes)}M`;
|
|
78
|
+
if (this.seconds || this.milliseconds) {
|
|
79
|
+
const secs = Math.abs(this.seconds) + Math.abs(this.milliseconds) / 1000;
|
|
80
|
+
result += `${secs}S`;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return result;
|
|
84
|
+
}
|
|
85
|
+
toJSON() {
|
|
86
|
+
return this.toString();
|
|
87
|
+
}
|
|
88
|
+
negated() {
|
|
89
|
+
return new DurationImpl({
|
|
90
|
+
years: -this.years,
|
|
91
|
+
months: -this.months,
|
|
92
|
+
weeks: -this.weeks,
|
|
93
|
+
days: -this.days,
|
|
94
|
+
hours: -this.hours,
|
|
95
|
+
minutes: -this.minutes,
|
|
96
|
+
seconds: -this.seconds,
|
|
97
|
+
milliseconds: -this.milliseconds,
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
abs() {
|
|
101
|
+
return new DurationImpl({
|
|
102
|
+
years: Math.abs(this.years),
|
|
103
|
+
months: Math.abs(this.months),
|
|
104
|
+
weeks: Math.abs(this.weeks),
|
|
105
|
+
days: Math.abs(this.days),
|
|
106
|
+
hours: Math.abs(this.hours),
|
|
107
|
+
minutes: Math.abs(this.minutes),
|
|
108
|
+
seconds: Math.abs(this.seconds),
|
|
109
|
+
milliseconds: Math.abs(this.milliseconds),
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
add(other) {
|
|
113
|
+
return new DurationImpl({
|
|
114
|
+
years: this.years + (other.years || 0),
|
|
115
|
+
months: this.months + (other.months || 0),
|
|
116
|
+
weeks: this.weeks + (other.weeks || 0),
|
|
117
|
+
days: this.days + (other.days || 0),
|
|
118
|
+
hours: this.hours + (other.hours || 0),
|
|
119
|
+
minutes: this.minutes + (other.minutes || 0),
|
|
120
|
+
seconds: this.seconds + (other.seconds || 0),
|
|
121
|
+
milliseconds: this.milliseconds + (other.milliseconds || 0),
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
subtract(other) {
|
|
125
|
+
return new DurationImpl({
|
|
126
|
+
years: this.years - (other.years || 0),
|
|
127
|
+
months: this.months - (other.months || 0),
|
|
128
|
+
weeks: this.weeks - (other.weeks || 0),
|
|
129
|
+
days: this.days - (other.days || 0),
|
|
130
|
+
hours: this.hours - (other.hours || 0),
|
|
131
|
+
minutes: this.minutes - (other.minutes || 0),
|
|
132
|
+
seconds: this.seconds - (other.seconds || 0),
|
|
133
|
+
milliseconds: this.milliseconds - (other.milliseconds || 0),
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
total(unit) {
|
|
137
|
+
// Convert everything to milliseconds first
|
|
138
|
+
const MS_PER_SECOND = 1000;
|
|
139
|
+
const MS_PER_MINUTE = 60 * MS_PER_SECOND;
|
|
140
|
+
const MS_PER_HOUR = 60 * MS_PER_MINUTE;
|
|
141
|
+
const MS_PER_DAY = 24 * MS_PER_HOUR;
|
|
142
|
+
const MS_PER_WEEK = 7 * MS_PER_DAY;
|
|
143
|
+
// Approximate month/year (not calendar-accurate)
|
|
144
|
+
const MS_PER_MONTH = 30 * MS_PER_DAY;
|
|
145
|
+
const MS_PER_YEAR = 365 * MS_PER_DAY;
|
|
146
|
+
const totalMs = this.milliseconds +
|
|
147
|
+
this.seconds * MS_PER_SECOND +
|
|
148
|
+
this.minutes * MS_PER_MINUTE +
|
|
149
|
+
this.hours * MS_PER_HOUR +
|
|
150
|
+
this.days * MS_PER_DAY +
|
|
151
|
+
this.weeks * MS_PER_WEEK +
|
|
152
|
+
this.months * MS_PER_MONTH +
|
|
153
|
+
this.years * MS_PER_YEAR;
|
|
154
|
+
switch (unit) {
|
|
155
|
+
case 'milliseconds': return totalMs;
|
|
156
|
+
case 'seconds': return totalMs / MS_PER_SECOND;
|
|
157
|
+
case 'minutes': return totalMs / MS_PER_MINUTE;
|
|
158
|
+
case 'hours': return totalMs / MS_PER_HOUR;
|
|
159
|
+
case 'days': return totalMs / MS_PER_DAY;
|
|
160
|
+
case 'weeks': return totalMs / MS_PER_WEEK;
|
|
161
|
+
case 'months': return totalMs / MS_PER_MONTH;
|
|
162
|
+
case 'years': return totalMs / MS_PER_YEAR;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
// PlainDate implementation
|
|
167
|
+
class PlainDateImpl {
|
|
168
|
+
constructor(year, month, day) {
|
|
169
|
+
this.year = year;
|
|
170
|
+
this.month = month;
|
|
171
|
+
this.day = day;
|
|
172
|
+
}
|
|
173
|
+
get dayOfWeek() {
|
|
174
|
+
const d = new Date(this.year, this.month - 1, this.day);
|
|
175
|
+
return d.getDay() === 0 ? 7 : d.getDay(); // ISO: 1=Monday, 7=Sunday
|
|
176
|
+
}
|
|
177
|
+
get dayOfYear() {
|
|
178
|
+
return getDayOfYear(new Date(this.year, this.month - 1, this.day));
|
|
179
|
+
}
|
|
180
|
+
get weekOfYear() {
|
|
181
|
+
return getWeekNumber(new Date(this.year, this.month - 1, this.day));
|
|
182
|
+
}
|
|
183
|
+
get daysInMonth() {
|
|
184
|
+
return getDaysInMonth(this.year, this.month);
|
|
185
|
+
}
|
|
186
|
+
get daysInYear() {
|
|
187
|
+
return getDaysInYear(this.year);
|
|
188
|
+
}
|
|
189
|
+
get monthsInYear() {
|
|
190
|
+
return 12;
|
|
191
|
+
}
|
|
192
|
+
get inLeapYear() {
|
|
193
|
+
return isLeapYear(this.year);
|
|
194
|
+
}
|
|
195
|
+
toString() {
|
|
196
|
+
const y = this.year.toString().padStart(4, '0');
|
|
197
|
+
const m = this.month.toString().padStart(2, '0');
|
|
198
|
+
const d = this.day.toString().padStart(2, '0');
|
|
199
|
+
return `${y}-${m}-${d}`;
|
|
200
|
+
}
|
|
201
|
+
toJSON() {
|
|
202
|
+
return this.toString();
|
|
203
|
+
}
|
|
204
|
+
equals(other) {
|
|
205
|
+
return this.year === other.year && this.month === other.month && this.day === other.day;
|
|
206
|
+
}
|
|
207
|
+
compare(other) {
|
|
208
|
+
const otherDate = new Date(other.year, other.month - 1, other.day);
|
|
209
|
+
return compareDates(this.toDate(), otherDate);
|
|
210
|
+
}
|
|
211
|
+
add(duration) {
|
|
212
|
+
const date = this.toDate();
|
|
213
|
+
if (duration.years)
|
|
214
|
+
date.setFullYear(date.getFullYear() + duration.years);
|
|
215
|
+
if (duration.months)
|
|
216
|
+
date.setMonth(date.getMonth() + duration.months);
|
|
217
|
+
if (duration.weeks)
|
|
218
|
+
date.setDate(date.getDate() + duration.weeks * 7);
|
|
219
|
+
if (duration.days)
|
|
220
|
+
date.setDate(date.getDate() + duration.days);
|
|
221
|
+
return toPlainDate(date);
|
|
222
|
+
}
|
|
223
|
+
subtract(duration) {
|
|
224
|
+
return this.add({
|
|
225
|
+
years: -(duration.years || 0),
|
|
226
|
+
months: -(duration.months || 0),
|
|
227
|
+
weeks: -(duration.weeks || 0),
|
|
228
|
+
days: -(duration.days || 0),
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
until(other) {
|
|
232
|
+
const otherDate = new Date(other.year, other.month - 1, other.day);
|
|
233
|
+
const diffMs = otherDate.getTime() - this.toDate().getTime();
|
|
234
|
+
const days = Math.floor(diffMs / 86400000);
|
|
235
|
+
return createDuration({ days });
|
|
236
|
+
}
|
|
237
|
+
since(other) {
|
|
238
|
+
const otherImpl = new PlainDateImpl(other.year, other.month, other.day);
|
|
239
|
+
return otherImpl.until(this);
|
|
240
|
+
}
|
|
241
|
+
with(fields) {
|
|
242
|
+
return new PlainDateImpl(fields.year ?? this.year, fields.month ?? this.month, fields.day ?? this.day);
|
|
243
|
+
}
|
|
244
|
+
toDate() {
|
|
245
|
+
return new Date(this.year, this.month - 1, this.day);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
// PlainTime implementation
|
|
249
|
+
class PlainTimeImpl {
|
|
250
|
+
constructor(hour = 0, minute = 0, second = 0, millisecond = 0) {
|
|
251
|
+
this.hour = hour;
|
|
252
|
+
this.minute = minute;
|
|
253
|
+
this.second = second;
|
|
254
|
+
this.millisecond = millisecond;
|
|
255
|
+
}
|
|
256
|
+
toString() {
|
|
257
|
+
const h = this.hour.toString().padStart(2, '0');
|
|
258
|
+
const m = this.minute.toString().padStart(2, '0');
|
|
259
|
+
const s = this.second.toString().padStart(2, '0');
|
|
260
|
+
if (this.millisecond) {
|
|
261
|
+
const ms = this.millisecond.toString().padStart(3, '0');
|
|
262
|
+
return `${h}:${m}:${s}.${ms}`;
|
|
263
|
+
}
|
|
264
|
+
return `${h}:${m}:${s}`;
|
|
265
|
+
}
|
|
266
|
+
toJSON() {
|
|
267
|
+
return this.toString();
|
|
268
|
+
}
|
|
269
|
+
equals(other) {
|
|
270
|
+
return this.hour === other.hour && this.minute === other.minute &&
|
|
271
|
+
this.second === other.second && this.millisecond === other.millisecond;
|
|
272
|
+
}
|
|
273
|
+
compare(other) {
|
|
274
|
+
const a = this.hour * 3600000 + this.minute * 60000 + this.second * 1000 + this.millisecond;
|
|
275
|
+
const b = other.hour * 3600000 + other.minute * 60000 + other.second * 1000 + other.millisecond;
|
|
276
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
|
277
|
+
}
|
|
278
|
+
add(duration) {
|
|
279
|
+
let totalMs = this.hour * 3600000 + this.minute * 60000 + this.second * 1000 + this.millisecond;
|
|
280
|
+
if (duration.hours)
|
|
281
|
+
totalMs += duration.hours * 3600000;
|
|
282
|
+
if (duration.minutes)
|
|
283
|
+
totalMs += duration.minutes * 60000;
|
|
284
|
+
if (duration.seconds)
|
|
285
|
+
totalMs += duration.seconds * 1000;
|
|
286
|
+
if (duration.milliseconds)
|
|
287
|
+
totalMs += duration.milliseconds;
|
|
288
|
+
// Wrap around 24 hours
|
|
289
|
+
totalMs = ((totalMs % 86400000) + 86400000) % 86400000;
|
|
290
|
+
const hour = Math.floor(totalMs / 3600000);
|
|
291
|
+
const minute = Math.floor((totalMs % 3600000) / 60000);
|
|
292
|
+
const second = Math.floor((totalMs % 60000) / 1000);
|
|
293
|
+
const millisecond = totalMs % 1000;
|
|
294
|
+
return new PlainTimeImpl(hour, minute, second, millisecond);
|
|
295
|
+
}
|
|
296
|
+
subtract(duration) {
|
|
297
|
+
return this.add({
|
|
298
|
+
hours: -(duration.hours || 0),
|
|
299
|
+
minutes: -(duration.minutes || 0),
|
|
300
|
+
seconds: -(duration.seconds || 0),
|
|
301
|
+
milliseconds: -(duration.milliseconds || 0),
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
with(fields) {
|
|
305
|
+
return new PlainTimeImpl(fields.hour ?? this.hour, fields.minute ?? this.minute, fields.second ?? this.second, fields.millisecond ?? this.millisecond);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
// PlainDateTime implementation
|
|
309
|
+
class PlainDateTimeImpl {
|
|
310
|
+
constructor(year, month, day, hour = 0, minute = 0, second = 0, millisecond = 0) {
|
|
311
|
+
this.year = year;
|
|
312
|
+
this.month = month;
|
|
313
|
+
this.day = day;
|
|
314
|
+
this.hour = hour;
|
|
315
|
+
this.minute = minute;
|
|
316
|
+
this.second = second;
|
|
317
|
+
this.millisecond = millisecond;
|
|
318
|
+
}
|
|
319
|
+
get dayOfWeek() {
|
|
320
|
+
const d = new Date(this.year, this.month - 1, this.day);
|
|
321
|
+
return d.getDay() === 0 ? 7 : d.getDay();
|
|
322
|
+
}
|
|
323
|
+
get dayOfYear() {
|
|
324
|
+
return getDayOfYear(new Date(this.year, this.month - 1, this.day));
|
|
325
|
+
}
|
|
326
|
+
get weekOfYear() {
|
|
327
|
+
return getWeekNumber(new Date(this.year, this.month - 1, this.day));
|
|
328
|
+
}
|
|
329
|
+
toString() {
|
|
330
|
+
const date = this.toPlainDate().toString();
|
|
331
|
+
const time = this.toPlainTime().toString();
|
|
332
|
+
return `${date}T${time}`;
|
|
333
|
+
}
|
|
334
|
+
toJSON() {
|
|
335
|
+
return this.toString();
|
|
336
|
+
}
|
|
337
|
+
equals(other) {
|
|
338
|
+
return this.toPlainDate().equals(other.toPlainDate()) &&
|
|
339
|
+
this.toPlainTime().equals(other.toPlainTime());
|
|
340
|
+
}
|
|
341
|
+
compare(other) {
|
|
342
|
+
const otherDate = new Date(other.year, other.month - 1, other.day, other.hour, other.minute, other.second, other.millisecond);
|
|
343
|
+
return compareDates(this.toDate(), otherDate);
|
|
344
|
+
}
|
|
345
|
+
add(duration) {
|
|
346
|
+
const date = this.toDate();
|
|
347
|
+
if (duration.years)
|
|
348
|
+
date.setFullYear(date.getFullYear() + duration.years);
|
|
349
|
+
if (duration.months)
|
|
350
|
+
date.setMonth(date.getMonth() + duration.months);
|
|
351
|
+
if (duration.weeks)
|
|
352
|
+
date.setDate(date.getDate() + duration.weeks * 7);
|
|
353
|
+
if (duration.days)
|
|
354
|
+
date.setDate(date.getDate() + duration.days);
|
|
355
|
+
if (duration.hours)
|
|
356
|
+
date.setHours(date.getHours() + duration.hours);
|
|
357
|
+
if (duration.minutes)
|
|
358
|
+
date.setMinutes(date.getMinutes() + duration.minutes);
|
|
359
|
+
if (duration.seconds)
|
|
360
|
+
date.setSeconds(date.getSeconds() + duration.seconds);
|
|
361
|
+
if (duration.milliseconds)
|
|
362
|
+
date.setMilliseconds(date.getMilliseconds() + duration.milliseconds);
|
|
363
|
+
return toPlainDateTime(date);
|
|
364
|
+
}
|
|
365
|
+
subtract(duration) {
|
|
366
|
+
return this.add({
|
|
367
|
+
years: -(duration.years || 0),
|
|
368
|
+
months: -(duration.months || 0),
|
|
369
|
+
weeks: -(duration.weeks || 0),
|
|
370
|
+
days: -(duration.days || 0),
|
|
371
|
+
hours: -(duration.hours || 0),
|
|
372
|
+
minutes: -(duration.minutes || 0),
|
|
373
|
+
seconds: -(duration.seconds || 0),
|
|
374
|
+
milliseconds: -(duration.milliseconds || 0),
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
until(other) {
|
|
378
|
+
const otherDate = new Date(other.year, other.month - 1, other.day, other.hour, other.minute, other.second, other.millisecond);
|
|
379
|
+
const diffMs = otherDate.getTime() - this.toDate().getTime();
|
|
380
|
+
const days = Math.floor(diffMs / 86400000);
|
|
381
|
+
const remainingMs = diffMs % 86400000;
|
|
382
|
+
const hours = Math.floor(remainingMs / 3600000);
|
|
383
|
+
const minutes = Math.floor((remainingMs % 3600000) / 60000);
|
|
384
|
+
const seconds = Math.floor((remainingMs % 60000) / 1000);
|
|
385
|
+
const milliseconds = remainingMs % 1000;
|
|
386
|
+
return createDuration({ days, hours, minutes, seconds, milliseconds });
|
|
387
|
+
}
|
|
388
|
+
since(other) {
|
|
389
|
+
const otherImpl = new PlainDateTimeImpl(other.year, other.month, other.day, other.hour, other.minute, other.second, other.millisecond);
|
|
390
|
+
return otherImpl.until(this);
|
|
391
|
+
}
|
|
392
|
+
with(fields) {
|
|
393
|
+
return new PlainDateTimeImpl(fields.year ?? this.year, fields.month ?? this.month, fields.day ?? this.day, fields.hour ?? this.hour, fields.minute ?? this.minute, fields.second ?? this.second, fields.millisecond ?? this.millisecond);
|
|
394
|
+
}
|
|
395
|
+
toPlainDate() {
|
|
396
|
+
return new PlainDateImpl(this.year, this.month, this.day);
|
|
397
|
+
}
|
|
398
|
+
toPlainTime() {
|
|
399
|
+
return new PlainTimeImpl(this.hour, this.minute, this.second, this.millisecond);
|
|
400
|
+
}
|
|
401
|
+
toDate() {
|
|
402
|
+
return new Date(this.year, this.month - 1, this.day, this.hour, this.minute, this.second, this.millisecond);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
// ZonedDateTime implementation
|
|
406
|
+
class ZonedDateTimeImpl {
|
|
407
|
+
constructor(epochMs, timeZone) {
|
|
408
|
+
this._date = new Date(epochMs);
|
|
409
|
+
this.timeZone = timeZone;
|
|
410
|
+
}
|
|
411
|
+
get _parts() {
|
|
412
|
+
const formatter = new Intl.DateTimeFormat('en-US', {
|
|
413
|
+
timeZone: this.timeZone,
|
|
414
|
+
year: 'numeric',
|
|
415
|
+
month: 'numeric',
|
|
416
|
+
day: 'numeric',
|
|
417
|
+
hour: 'numeric',
|
|
418
|
+
minute: 'numeric',
|
|
419
|
+
second: 'numeric',
|
|
420
|
+
hour12: false,
|
|
421
|
+
});
|
|
422
|
+
const parts = formatter.formatToParts(this._date);
|
|
423
|
+
const result = {};
|
|
424
|
+
for (const part of parts) {
|
|
425
|
+
if (part.type !== 'literal') {
|
|
426
|
+
result[part.type] = parseInt(part.value, 10);
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
return {
|
|
430
|
+
year: result.year,
|
|
431
|
+
month: result.month,
|
|
432
|
+
day: result.day,
|
|
433
|
+
hour: result.hour === 24 ? 0 : result.hour, // Handle midnight
|
|
434
|
+
minute: result.minute,
|
|
435
|
+
second: result.second,
|
|
436
|
+
};
|
|
437
|
+
}
|
|
438
|
+
get year() { return this._parts.year; }
|
|
439
|
+
get month() { return this._parts.month; }
|
|
440
|
+
get day() { return this._parts.day; }
|
|
441
|
+
get hour() { return this._parts.hour; }
|
|
442
|
+
get minute() { return this._parts.minute; }
|
|
443
|
+
get second() { return this._parts.second; }
|
|
444
|
+
get millisecond() { return this._date.getMilliseconds(); }
|
|
445
|
+
get epochMilliseconds() { return this._date.getTime(); }
|
|
446
|
+
get offset() {
|
|
447
|
+
const formatter = new Intl.DateTimeFormat('en-US', {
|
|
448
|
+
timeZone: this.timeZone,
|
|
449
|
+
timeZoneName: 'shortOffset',
|
|
450
|
+
});
|
|
451
|
+
const parts = formatter.formatToParts(this._date);
|
|
452
|
+
const offsetPart = parts.find(p => p.type === 'timeZoneName');
|
|
453
|
+
return offsetPart?.value.replace('GMT', '') || '+00:00';
|
|
454
|
+
}
|
|
455
|
+
toString() {
|
|
456
|
+
const dt = `${this.toPlainDateTime().toString()}`;
|
|
457
|
+
return `${dt}${this.offset}[${this.timeZone}]`;
|
|
458
|
+
}
|
|
459
|
+
toJSON() {
|
|
460
|
+
return this.toString();
|
|
461
|
+
}
|
|
462
|
+
equals(other) {
|
|
463
|
+
return this.epochMilliseconds === other.epochMilliseconds && this.timeZone === other.timeZone;
|
|
464
|
+
}
|
|
465
|
+
add(duration) {
|
|
466
|
+
const dt = this.toPlainDateTime().add(duration);
|
|
467
|
+
return toZonedDateTime(dt.toDate(), this.timeZone);
|
|
468
|
+
}
|
|
469
|
+
subtract(duration) {
|
|
470
|
+
const dt = this.toPlainDateTime().subtract(duration);
|
|
471
|
+
return toZonedDateTime(dt.toDate(), this.timeZone);
|
|
472
|
+
}
|
|
473
|
+
with(fields) {
|
|
474
|
+
const dt = this.toPlainDateTime().with(fields);
|
|
475
|
+
return toZonedDateTime(dt.toDate(), this.timeZone);
|
|
476
|
+
}
|
|
477
|
+
toPlainDate() {
|
|
478
|
+
const p = this._parts;
|
|
479
|
+
return new PlainDateImpl(p.year, p.month, p.day);
|
|
480
|
+
}
|
|
481
|
+
toPlainTime() {
|
|
482
|
+
const p = this._parts;
|
|
483
|
+
return new PlainTimeImpl(p.hour, p.minute, p.second, this.millisecond);
|
|
484
|
+
}
|
|
485
|
+
toPlainDateTime() {
|
|
486
|
+
const p = this._parts;
|
|
487
|
+
return new PlainDateTimeImpl(p.year, p.month, p.day, p.hour, p.minute, p.second, this.millisecond);
|
|
488
|
+
}
|
|
489
|
+
toInstant() {
|
|
490
|
+
return new InstantImpl(this.epochMilliseconds);
|
|
491
|
+
}
|
|
492
|
+
toDate() {
|
|
493
|
+
return new Date(this._date.getTime());
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
// Instant implementation
|
|
497
|
+
class InstantImpl {
|
|
498
|
+
constructor(epochMs) {
|
|
499
|
+
this.epochMilliseconds = epochMs;
|
|
500
|
+
}
|
|
501
|
+
get epochSeconds() {
|
|
502
|
+
return Math.floor(this.epochMilliseconds / 1000);
|
|
503
|
+
}
|
|
504
|
+
toString() {
|
|
505
|
+
return new Date(this.epochMilliseconds).toISOString();
|
|
506
|
+
}
|
|
507
|
+
toJSON() {
|
|
508
|
+
return this.toString();
|
|
509
|
+
}
|
|
510
|
+
equals(other) {
|
|
511
|
+
return this.epochMilliseconds === other.epochMilliseconds;
|
|
512
|
+
}
|
|
513
|
+
compare(other) {
|
|
514
|
+
const diff = this.epochMilliseconds - other.epochMilliseconds;
|
|
515
|
+
return diff < 0 ? -1 : diff > 0 ? 1 : 0;
|
|
516
|
+
}
|
|
517
|
+
add(duration) {
|
|
518
|
+
let ms = this.epochMilliseconds;
|
|
519
|
+
if (duration.days)
|
|
520
|
+
ms += duration.days * 86400000;
|
|
521
|
+
if (duration.hours)
|
|
522
|
+
ms += duration.hours * 3600000;
|
|
523
|
+
if (duration.minutes)
|
|
524
|
+
ms += duration.minutes * 60000;
|
|
525
|
+
if (duration.seconds)
|
|
526
|
+
ms += duration.seconds * 1000;
|
|
527
|
+
if (duration.milliseconds)
|
|
528
|
+
ms += duration.milliseconds;
|
|
529
|
+
return new InstantImpl(ms);
|
|
530
|
+
}
|
|
531
|
+
subtract(duration) {
|
|
532
|
+
return this.add({
|
|
533
|
+
days: -(duration.days || 0),
|
|
534
|
+
hours: -(duration.hours || 0),
|
|
535
|
+
minutes: -(duration.minutes || 0),
|
|
536
|
+
seconds: -(duration.seconds || 0),
|
|
537
|
+
milliseconds: -(duration.milliseconds || 0),
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
until(other) {
|
|
541
|
+
const diffMs = other.epochMilliseconds - this.epochMilliseconds;
|
|
542
|
+
return createDuration({ milliseconds: diffMs });
|
|
543
|
+
}
|
|
544
|
+
since(other) {
|
|
545
|
+
const otherImpl = new InstantImpl(other.epochMilliseconds);
|
|
546
|
+
return otherImpl.until(this);
|
|
547
|
+
}
|
|
548
|
+
toZonedDateTime(timeZone) {
|
|
549
|
+
return new ZonedDateTimeImpl(this.epochMilliseconds, timeZone);
|
|
550
|
+
}
|
|
551
|
+
toDate() {
|
|
552
|
+
return new Date(this.epochMilliseconds);
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
export function toPlainDate(dateOrYear, month, day) {
|
|
556
|
+
if (dateOrYear instanceof Date) {
|
|
557
|
+
return new PlainDateImpl(dateOrYear.getFullYear(), dateOrYear.getMonth() + 1, dateOrYear.getDate());
|
|
558
|
+
}
|
|
559
|
+
if (typeof dateOrYear === 'object' && 'year' in dateOrYear) {
|
|
560
|
+
return new PlainDateImpl(dateOrYear.year, dateOrYear.month, dateOrYear.day);
|
|
561
|
+
}
|
|
562
|
+
return new PlainDateImpl(dateOrYear, month, day);
|
|
563
|
+
}
|
|
564
|
+
export function toPlainTime(dateOrHour, minute, second, millisecond) {
|
|
565
|
+
if (dateOrHour instanceof Date) {
|
|
566
|
+
return new PlainTimeImpl(dateOrHour.getHours(), dateOrHour.getMinutes(), dateOrHour.getSeconds(), dateOrHour.getMilliseconds());
|
|
567
|
+
}
|
|
568
|
+
if (typeof dateOrHour === 'object' && 'hour' in dateOrHour) {
|
|
569
|
+
return new PlainTimeImpl(dateOrHour.hour, dateOrHour.minute, dateOrHour.second, dateOrHour.millisecond);
|
|
570
|
+
}
|
|
571
|
+
return new PlainTimeImpl(dateOrHour, minute, second, millisecond);
|
|
572
|
+
}
|
|
573
|
+
export function toPlainDateTime(dateOrYear, month, day, hour, minute, second, millisecond) {
|
|
574
|
+
if (dateOrYear instanceof Date) {
|
|
575
|
+
return new PlainDateTimeImpl(dateOrYear.getFullYear(), dateOrYear.getMonth() + 1, dateOrYear.getDate(), dateOrYear.getHours(), dateOrYear.getMinutes(), dateOrYear.getSeconds(), dateOrYear.getMilliseconds());
|
|
576
|
+
}
|
|
577
|
+
if (typeof dateOrYear === 'object' && 'year' in dateOrYear) {
|
|
578
|
+
return new PlainDateTimeImpl(dateOrYear.year, dateOrYear.month, dateOrYear.day, dateOrYear.hour, dateOrYear.minute, dateOrYear.second, dateOrYear.millisecond);
|
|
579
|
+
}
|
|
580
|
+
return new PlainDateTimeImpl(dateOrYear, month, day, hour, minute, second, millisecond);
|
|
581
|
+
}
|
|
582
|
+
/**
|
|
583
|
+
* Create a ZonedDateTime from a Date object and timezone
|
|
584
|
+
*/
|
|
585
|
+
export function toZonedDateTime(date, timeZone) {
|
|
586
|
+
return new ZonedDateTimeImpl(date.getTime(), timeZone);
|
|
587
|
+
}
|
|
588
|
+
export function toInstant(dateOrEpoch) {
|
|
589
|
+
if (dateOrEpoch instanceof Date) {
|
|
590
|
+
return new InstantImpl(dateOrEpoch.getTime());
|
|
591
|
+
}
|
|
592
|
+
if (typeof dateOrEpoch === 'object' && 'epochMilliseconds' in dateOrEpoch) {
|
|
593
|
+
return new InstantImpl(dateOrEpoch.epochMilliseconds);
|
|
594
|
+
}
|
|
595
|
+
return new InstantImpl(dateOrEpoch);
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
* Create a Duration from components
|
|
599
|
+
*/
|
|
600
|
+
export function createDuration(fields = {}) {
|
|
601
|
+
return new DurationImpl(fields);
|
|
602
|
+
}
|
|
603
|
+
/**
|
|
604
|
+
* Parse an ISO 8601 duration string
|
|
605
|
+
*/
|
|
606
|
+
export function parseDuration(str) {
|
|
607
|
+
const match = str.match(/^(-)?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+(?:\.\d+)?)S)?)?$/);
|
|
608
|
+
if (!match)
|
|
609
|
+
throw new Error(`Invalid duration: ${str}`);
|
|
610
|
+
const sign = match[1] === '-' ? -1 : 1;
|
|
611
|
+
const seconds = match[8] ? parseFloat(match[8]) : 0;
|
|
612
|
+
const wholeSeconds = Math.floor(seconds);
|
|
613
|
+
const milliseconds = Math.round((seconds - wholeSeconds) * 1000);
|
|
614
|
+
return new DurationImpl({
|
|
615
|
+
years: sign * (parseInt(match[2], 10) || 0),
|
|
616
|
+
months: sign * (parseInt(match[3], 10) || 0),
|
|
617
|
+
weeks: sign * (parseInt(match[4], 10) || 0),
|
|
618
|
+
days: sign * (parseInt(match[5], 10) || 0),
|
|
619
|
+
hours: sign * (parseInt(match[6], 10) || 0),
|
|
620
|
+
minutes: sign * (parseInt(match[7], 10) || 0),
|
|
621
|
+
seconds: sign * wholeSeconds,
|
|
622
|
+
milliseconds: sign * milliseconds,
|
|
623
|
+
});
|
|
624
|
+
}
|
|
625
|
+
/**
|
|
626
|
+
* Get current instant
|
|
627
|
+
*/
|
|
628
|
+
export function nowInstant() {
|
|
629
|
+
return new InstantImpl(Date.now());
|
|
630
|
+
}
|
|
631
|
+
/**
|
|
632
|
+
* Get current PlainDateTime in local timezone
|
|
633
|
+
*/
|
|
634
|
+
export function nowPlainDateTime() {
|
|
635
|
+
return toPlainDateTime(new Date());
|
|
636
|
+
}
|
|
637
|
+
/**
|
|
638
|
+
* Get current PlainDate in local timezone
|
|
639
|
+
*/
|
|
640
|
+
export function nowPlainDate() {
|
|
641
|
+
return toPlainDate(new Date());
|
|
642
|
+
}
|
|
643
|
+
/**
|
|
644
|
+
* Get current PlainTime in local timezone
|
|
645
|
+
*/
|
|
646
|
+
export function nowPlainTime() {
|
|
647
|
+
return toPlainTime(new Date());
|
|
648
|
+
}
|
|
649
|
+
/**
|
|
650
|
+
* Get current ZonedDateTime in specified timezone
|
|
651
|
+
*/
|
|
652
|
+
export function nowZonedDateTime(timeZone) {
|
|
653
|
+
return toZonedDateTime(new Date(), timeZone);
|
|
654
|
+
}
|
|
655
|
+
/**
|
|
656
|
+
* Convert Temporal-like object back to Date
|
|
657
|
+
*/
|
|
658
|
+
export function fromTemporal(temporal) {
|
|
659
|
+
return temporal.toDate();
|
|
660
|
+
}
|
package/dist/esm/validate.d.ts
CHANGED
|
@@ -110,4 +110,34 @@ export declare function isInLastNDays(date: Date, n: number): boolean;
|
|
|
110
110
|
* @param n - number of days
|
|
111
111
|
*/
|
|
112
112
|
export declare function isInNextNDays(date: Date, n: number): boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Check if two dates are in the same hour
|
|
115
|
+
* @param date1 - first date
|
|
116
|
+
* @param date2 - second date
|
|
117
|
+
*/
|
|
118
|
+
export declare function isSameHour(date1: Date, date2: Date): boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Check if two dates are in the same minute
|
|
121
|
+
* @param date1 - first date
|
|
122
|
+
* @param date2 - second date
|
|
123
|
+
*/
|
|
124
|
+
export declare function isSameMinute(date1: Date, date2: Date): boolean;
|
|
125
|
+
/**
|
|
126
|
+
* Check if two dates are in the same second
|
|
127
|
+
* @param date1 - first date
|
|
128
|
+
* @param date2 - second date
|
|
129
|
+
*/
|
|
130
|
+
export declare function isSameSecond(date1: Date, date2: Date): boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Check if a date is in a specific quarter
|
|
133
|
+
* @param date - date to check
|
|
134
|
+
* @param quarter - quarter (1-4)
|
|
135
|
+
*/
|
|
136
|
+
export declare function isInQuarter(date: Date, quarter: 1 | 2 | 3 | 4): boolean;
|
|
137
|
+
/**
|
|
138
|
+
* Check if two dates are in the same quarter
|
|
139
|
+
* @param date1 - first date
|
|
140
|
+
* @param date2 - second date
|
|
141
|
+
*/
|
|
142
|
+
export declare function isSameQuarter(date1: Date, date2: Date): boolean;
|
|
113
143
|
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/validate.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAWjE;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,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