temporal-polyfill-lite 0.4.2 → 1.0.0
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/CHANGELOG.md +41 -24
- package/README.md +1 -1
- package/dist/calendars/global.js +1 -1
- package/dist/calendars/index.js +1 -2
- package/dist/calendars/shim.js +1 -1
- package/dist/calendars/{src-Bu0ZLzZY.js → src-CLej0F_-.js} +358 -377
- package/dist/global.js +1 -1
- package/dist/index.js +1 -2
- package/dist/shim.js +1 -1
- package/dist/{src-C0TzYU7p.js → src-DYpWRzuf.js} +356 -374
- package/package.json +1 -1
|
@@ -213,19 +213,19 @@ function toTemporalZonedDateTime(e, t) {
|
|
|
213
213
|
}
|
|
214
214
|
i = getTemporalCalendarIdentifierWithIsoDefault(e);
|
|
215
215
|
const l = prepareCalendarFields(i, e, [
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
], [
|
|
216
|
+
wt.t,
|
|
217
|
+
wt.u,
|
|
218
|
+
wt.v,
|
|
219
|
+
wt.T,
|
|
220
|
+
wt.D,
|
|
221
|
+
wt.I,
|
|
222
|
+
wt.O,
|
|
223
|
+
wt.F,
|
|
224
|
+
wt.S,
|
|
225
|
+
wt.$,
|
|
226
|
+
wt.M,
|
|
227
|
+
wt.P
|
|
228
|
+
], [wt.P]);
|
|
229
229
|
o = l.timeZone, n = l.offset;
|
|
230
230
|
const d = getOptionsObject(t);
|
|
231
231
|
r = getTemporalDisambiguationOption(d), a = getTemporalOffsetOption(d, X);
|
|
@@ -233,7 +233,7 @@ function toTemporalZonedDateTime(e, t) {
|
|
|
233
233
|
c = m.o, s = m.p;
|
|
234
234
|
} else {
|
|
235
235
|
validateString(e);
|
|
236
|
-
const m = parseIsoDateTime(e, [
|
|
236
|
+
const m = parseIsoDateTime(e, [et]);
|
|
237
237
|
o = toTemporalTimeZoneIdentifier(m.P.R), n = m.P.N, l = m.P.Z, i = canonicalizeCalendar(m.Y || "iso8601"), d = !1, n && (d = hasUtcOffsetSubMinuteParts(n));
|
|
238
238
|
const u = getOptionsObject(t);
|
|
239
239
|
r = getTemporalDisambiguationOption(u), a = getTemporalOffsetOption(u, X), getTemporalOverflowOption(u), c = createIsoDateRecord(m.t, m.u, m.T), s = m.p;
|
|
@@ -242,7 +242,7 @@ function toTemporalZonedDateTime(e, t) {
|
|
|
242
242
|
return createZonedDateTimeSlot(interpretISODateTimeOffset(c, s, m, m === te ? parseDateTimeUtcOffset(n) : 0, o, r, a, d), o, i);
|
|
243
243
|
}
|
|
244
244
|
function createTemporalZonedDateTime(e, t, o, n) {
|
|
245
|
-
return createTemporalZonedDateTimeFromSlot(createZonedDateTimeSlot(e, t, o, ((e, t) =>
|
|
245
|
+
return createTemporalZonedDateTimeFromSlot(createZonedDateTimeSlot(e, t, o, ((e, t) => Ne[e] && Ne[e].C(clampEpochSecond(t)))(t, epochSeconds(e))), n);
|
|
246
246
|
}
|
|
247
247
|
function createZonedDateTimeSlot(e, t, o, n) {
|
|
248
248
|
return {
|
|
@@ -267,7 +267,7 @@ function differenceZonedDateTime(e, t, o) {
|
|
|
267
267
|
const r = getIsoDateTimeForZonedDateTimeSlot(e), a = getIsoDateTimeForZonedDateTimeSlot(t);
|
|
268
268
|
if (!compareIsoDate(r.o, a.o)) return combineDateAndTimeDuration(zeroDateDuration(), timeDurationFromEpochNanosecondsDifference(t.U, e.U));
|
|
269
269
|
let i, c = differenceTime(r.p, a.p);
|
|
270
|
-
for (let o =
|
|
270
|
+
for (let o = bt(c) === n ? 1 : 0; o <= (3 - n) / 2 && (i = combineIsoDateAndTimeRecord(addDaysToIsoDate(a.o, o * n), r.p), c = timeDurationFromEpochNanosecondsDifference(t.U, getEpochNanosecondsFor(e.P, i, G)), bt(c) === n); o++);
|
|
271
271
|
return combineDateAndTimeDuration(calendarDateUntil(e.Y, r.o, i.o, largerOfTwoTemporalUnits(o, d)), c);
|
|
272
272
|
}
|
|
273
273
|
function differenceZonedDateTimeWithRounding(e, t, o, n, r, a) {
|
|
@@ -333,11 +333,11 @@ function utcEpochMilliseconds(e, t, o, n = 0, a = 0, i = 0, c = 0) {
|
|
|
333
333
|
return isoDateToEpochDays(e, t - 1, o) * r + Date.UTC(1970, 0, 1, n, a, i, c);
|
|
334
334
|
}
|
|
335
335
|
function clampEpochSecond(e) {
|
|
336
|
-
return clamp(e, -1e10,
|
|
336
|
+
return clamp(e, -1e10, 1 / 0);
|
|
337
337
|
}
|
|
338
338
|
function getNamedTimeZoneOffsetNanosecondsForEpochSecond(t, o, n) {
|
|
339
339
|
if ("UTC" === t) return 0;
|
|
340
|
-
const r = clampEpochSecond(o), a =
|
|
340
|
+
const r = clampEpochSecond(o), a = Ne[t] ||= createLruCache(5e3), i = a.C(r);
|
|
341
341
|
if (void 0 !== i) return i;
|
|
342
342
|
const c = getFormatterForTimeZone(t).formatToParts(1e3 * r), s = (utcEpochMilliseconds(...[
|
|
343
343
|
"year",
|
|
@@ -350,7 +350,7 @@ function getNamedTimeZoneOffsetNanosecondsForEpochSecond(t, o, n) {
|
|
|
350
350
|
return n || a.B(r, s), s;
|
|
351
351
|
}
|
|
352
352
|
function getFormatterForTimeZone(e) {
|
|
353
|
-
return
|
|
353
|
+
return Re[e] ||= new Zt("en-u-hc-h23", {
|
|
354
354
|
timeZone: e,
|
|
355
355
|
year: "numeric",
|
|
356
356
|
month: "numeric",
|
|
@@ -401,12 +401,12 @@ function toTemporalTimeZoneIdentifier(e) {
|
|
|
401
401
|
const t = ((e) => {
|
|
402
402
|
if (isTimeZoneIdentifier(e)) return parseTimeZoneIdentifier(e);
|
|
403
403
|
const t = parseIsoDateTime(e, [
|
|
404
|
-
Qe,
|
|
405
404
|
et,
|
|
406
405
|
tt,
|
|
407
406
|
ot,
|
|
408
407
|
nt,
|
|
409
|
-
rt
|
|
408
|
+
rt,
|
|
409
|
+
at
|
|
410
410
|
]).P, o = t.R || t.Z && "UTC" || t.N;
|
|
411
411
|
return o || throwRangeError(invalidTimeZone(e)), parseTimeZoneIdentifier(o);
|
|
412
412
|
})(e);
|
|
@@ -429,7 +429,7 @@ function getStartOfDay(e, t) {
|
|
|
429
429
|
return getPossibleEpochNanoseconds(e, o)[0] || createEpochNanosecondsFromEpochSeconds(bisectOffsetTransition(e, ...getNamedTimeZoneEpochCandidates(e, o).map(epochSeconds)));
|
|
430
430
|
}
|
|
431
431
|
function timeZoneEquals(e, t) {
|
|
432
|
-
return e === t || !isOffsetTimeZoneIdentifier(e) && !isOffsetTimeZoneIdentifier(t) && getFormatterForTimeZone(e).resolvedOptions().timeZone === getFormatterForTimeZone(t).resolvedOptions().timeZone;
|
|
432
|
+
return e === t || !isOffsetTimeZoneIdentifier(e) && !isOffsetTimeZoneIdentifier(t) && (Pe ? new Pe.ZonedDateTime(BigInt(0), e).equals(new Pe.ZonedDateTime(BigInt(0), t)) : getFormatterForTimeZone(e).resolvedOptions().timeZone === getFormatterForTimeZone(t).resolvedOptions().timeZone);
|
|
433
433
|
}
|
|
434
434
|
function parseTimeZoneIdentifier(e) {
|
|
435
435
|
return isTimeZoneIdentifier(e) || throwRangeError(invalidTimeZone(e)), createNullPrototypeObject(isOffsetTimeZoneIdentifier(e) ? { G: parseDateTimeUtcOffset(e) / t } : { _: e });
|
|
@@ -444,10 +444,8 @@ function getNamedTimeZoneEpochCandidates(e, t) {
|
|
|
444
444
|
return n === r ? [a] : [a, i].sort(compareEpochNanoseconds);
|
|
445
445
|
}
|
|
446
446
|
function getIsoDateTimeFromOffsetNanoseconds(e, t) {
|
|
447
|
-
return ((e)
|
|
448
|
-
|
|
449
|
-
return combineIsoDateAndTimeRecord(epochDaysToIsoDate(t[0]), balanceTime(0, 0, 0, 0, 0, t[1]));
|
|
450
|
-
})(addNanosecondsToEpochSeconds(e, t));
|
|
447
|
+
return combineIsoDateAndTimeRecord(epochDaysToIsoDate((o = addNanosecondsToEpochSeconds(e, t))[0]), balanceTime(0, 0, 0, 0, 0, o[1]));
|
|
448
|
+
var o;
|
|
451
449
|
}
|
|
452
450
|
function combineIsoDateAndTimeRecord(e, t) {
|
|
453
451
|
return {
|
|
@@ -456,7 +454,7 @@ function combineIsoDateAndTimeRecord(e, t) {
|
|
|
456
454
|
};
|
|
457
455
|
}
|
|
458
456
|
function interpretTemporalDateTimeFields(e, t, o) {
|
|
459
|
-
return combineIsoDateAndTimeRecord(calendarDateFromFields(e, t, o), regulateTime(t[
|
|
457
|
+
return combineIsoDateAndTimeRecord(calendarDateFromFields(e, t, o), regulateTime(t[wt.D], t[wt.I], t[wt.O], t[wt.F], t[wt.S], t[wt.$], o));
|
|
460
458
|
}
|
|
461
459
|
function toTemporalDateTime(e, t) {
|
|
462
460
|
if (isObject(e)) {
|
|
@@ -476,28 +474,28 @@ function toTemporalDateTime(e, t) {
|
|
|
476
474
|
}
|
|
477
475
|
const o = getTemporalCalendarIdentifierWithIsoDefault(e);
|
|
478
476
|
return createTemporalDateTime(interpretTemporalDateTimeFields(o, prepareCalendarFields(o, e, [
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
477
|
+
wt.t,
|
|
478
|
+
wt.u,
|
|
479
|
+
wt.v,
|
|
480
|
+
wt.T,
|
|
481
|
+
wt.D,
|
|
482
|
+
wt.I,
|
|
483
|
+
wt.O,
|
|
484
|
+
wt.F,
|
|
485
|
+
wt.S,
|
|
486
|
+
wt.$
|
|
489
487
|
], []), getTemporalOverflowOption(getOptionsObject(t))), o);
|
|
490
488
|
}
|
|
491
489
|
validateString(e);
|
|
492
|
-
const o = parseIsoDateTime(e, [
|
|
490
|
+
const o = parseIsoDateTime(e, [tt]), n = canonicalizeCalendar(o.Y || "iso8601");
|
|
493
491
|
return getTemporalOverflowOption(getOptionsObject(t)), createTemporalDateTime(combineIsoDateAndTimeRecord(createIsoDateRecord(o.t, o.u, o.T), o.p || midnightTimeRecord()), n);
|
|
494
492
|
}
|
|
495
493
|
function balanceIsoDateTime(e, t, o, n, r, a, i, c, s) {
|
|
496
494
|
const l = balanceTime(n, r, a, i, c, s);
|
|
497
495
|
return combineIsoDateAndTimeRecord(addDaysToIsoDate(createIsoDateRecord(e, t, o), l.X), l);
|
|
498
496
|
}
|
|
499
|
-
function createTemporalDateTime(e, t, o = Object.create(
|
|
500
|
-
return
|
|
497
|
+
function createTemporalDateTime(e, t, o = Object.create($e.prototype)) {
|
|
498
|
+
return Ze.set(o, {
|
|
501
499
|
K: validateIsoDateTime(e),
|
|
502
500
|
Y: t
|
|
503
501
|
}), o;
|
|
@@ -514,7 +512,7 @@ function roundIsoDateTime(e, t, o, n) {
|
|
|
514
512
|
}
|
|
515
513
|
function differenceISODateTime(e, t, o, n) {
|
|
516
514
|
let r = differenceTime(e.p, t.p);
|
|
517
|
-
const a =
|
|
515
|
+
const a = bt(r);
|
|
518
516
|
let i = t.o;
|
|
519
517
|
a === compareIsoDate(e.o, t.o) && (i = addDaysToIsoDate(i, a), r = add24HourDaysToTimeDuration(r, -a));
|
|
520
518
|
const c = largerOfTwoTemporalUnits(d, n), s = calendarDateUntil(o, e.o, i, c);
|
|
@@ -554,10 +552,10 @@ function validateIsoDateTime(e) {
|
|
|
554
552
|
})(e) || throwRangeError(P), e;
|
|
555
553
|
}
|
|
556
554
|
function getInternalSlotForPlainDateTime(e) {
|
|
557
|
-
return
|
|
555
|
+
return Ze.get(e);
|
|
558
556
|
}
|
|
559
557
|
function getInternalSlotOrThrowForPlainDateTime(e) {
|
|
560
|
-
return getInternalSlotOrThrow(
|
|
558
|
+
return getInternalSlotOrThrow(Ze, e);
|
|
561
559
|
}
|
|
562
560
|
function isPlainDateTime(e) {
|
|
563
561
|
return !!getInternalSlotForPlainDateTime(e);
|
|
@@ -567,7 +565,7 @@ function calendarDateForPlainDateTime(e) {
|
|
|
567
565
|
return calendarIsoToDate(t.Y, t.K.o);
|
|
568
566
|
}
|
|
569
567
|
function createTimeRecord(e, t, o, n, r, a, i = 0) {
|
|
570
|
-
return {
|
|
568
|
+
return ((e, t, o, n, r, a) => isWithin(e, 0, 23) && isWithin(t, 0, 59) && isWithin(o, 0, 59) && isWithin(n, 0, 999) && isWithin(r, 0, 999) && isWithin(a, 0, 999))(e, t, o, n, r, a) || throwRangeError(b), {
|
|
571
569
|
D: e,
|
|
572
570
|
I: t,
|
|
573
571
|
O: o,
|
|
@@ -586,17 +584,14 @@ function differenceTime(e, t) {
|
|
|
586
584
|
function toTemporalTime(e, t) {
|
|
587
585
|
if (isObject(e)) return isPlainTime(e) ? (getTemporalOverflowOption(getOptionsObject(t)), getInternalSlotOrThrowForPlainTime(e)) : isPlainDateTime(e) ? (getTemporalOverflowOption(getOptionsObject(t)), getInternalSlotOrThrowForPlainDateTime(e).K.p) : isZonedDateTime(e) ? (getTemporalOverflowOption(getOptionsObject(t)), getIsoDateTimeForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(e)).p) : regulateTime(...toTemporalTimeRecord(e), getTemporalOverflowOption(getOptionsObject(t)));
|
|
588
586
|
validateString(e);
|
|
589
|
-
const o = parseIsoDateTime(e, [
|
|
587
|
+
const o = parseIsoDateTime(e, [nt]);
|
|
590
588
|
return getTemporalOverflowOption(getOptionsObject(t)), o.p;
|
|
591
589
|
}
|
|
592
590
|
function toTimeRecordOrMidnight(e) {
|
|
593
591
|
return void 0 === e ? midnightTimeRecord() : toTemporalTime(e);
|
|
594
592
|
}
|
|
595
593
|
function regulateTime(e, t, o, n, r, a, i) {
|
|
596
|
-
return "constrain" === i ? createTimeRecord(clamp(e, 0, 23), clamp(t, 0, 59), clamp(o, 0, 59), clamp(n, 0, 999), clamp(r, 0, 999), clamp(a, 0, 999)) :
|
|
597
|
-
}
|
|
598
|
-
function isValidTime(e, t, o, n, r, a) {
|
|
599
|
-
return isWithin(e, 0, 23) && isWithin(t, 0, 59) && isWithin(o, 0, 59) && isWithin(n, 0, 999) && isWithin(r, 0, 999) && isWithin(a, 0, 999);
|
|
594
|
+
return "constrain" === i ? createTimeRecord(clamp(e, 0, 23), clamp(t, 0, 59), clamp(o, 0, 59), clamp(n, 0, 999), clamp(r, 0, 999), clamp(a, 0, 999)) : createTimeRecord(e, t, o, n, r, a);
|
|
600
595
|
}
|
|
601
596
|
function balanceTime(e, t, o, n, r, a) {
|
|
602
597
|
return r += divFloor(a, 1e3), n += divFloor(r, 1e3), o += divFloor(n, 1e3), t += divFloor(o, 60), {
|
|
@@ -609,30 +604,26 @@ function balanceTime(e, t, o, n, r, a) {
|
|
|
609
604
|
X: divFloor(e, 24)
|
|
610
605
|
};
|
|
611
606
|
}
|
|
612
|
-
function createTemporalTime(e, t = Object.create(
|
|
613
|
-
return
|
|
607
|
+
function createTemporalTime(e, t = Object.create(Ye.prototype)) {
|
|
608
|
+
return Ce.set(t, e), t;
|
|
614
609
|
}
|
|
615
610
|
function toTemporalTimeRecord(e, t = !1) {
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
const r = e[n];
|
|
626
|
-
return void 0 !== r ? (o = !0, toIntegerWithTruncation(r)) : t ? void 0 : 0;
|
|
627
|
-
});
|
|
628
|
-
return o || throwTypeError(U), [
|
|
611
|
+
const o = [
|
|
612
|
+
wt.D,
|
|
613
|
+
wt.S,
|
|
614
|
+
wt.F,
|
|
615
|
+
wt.I,
|
|
616
|
+
wt.$,
|
|
617
|
+
wt.O
|
|
618
|
+
].map((t) => mapUnlessUndefined(e[t], toIntegerWithTruncation));
|
|
619
|
+
return o.some((e) => void 0 !== e) || throwTypeError(U), [
|
|
629
620
|
0,
|
|
630
621
|
3,
|
|
631
622
|
5,
|
|
632
623
|
2,
|
|
633
624
|
1,
|
|
634
625
|
4
|
|
635
|
-
].map((e) =>
|
|
626
|
+
].map((e) => t ? o[e] : o[e] || 0);
|
|
636
627
|
}
|
|
637
628
|
function timeRecordToString(e, t) {
|
|
638
629
|
return formatTimeString(e.D, e.I, e.O, 1e6 * e.F + 1e3 * e.S + e.$, t);
|
|
@@ -641,8 +632,8 @@ function compareTimeRecord(e, t) {
|
|
|
641
632
|
return compare(e.D, t.D) || compare(e.I, t.I) || compare(e.O, t.O) || compare(e.F, t.F) || compare(e.S, t.S) || compare(e.$, t.$);
|
|
642
633
|
}
|
|
643
634
|
function addTime(e, t) {
|
|
644
|
-
const o =
|
|
645
|
-
return
|
|
635
|
+
const o = balanceTime(e.D, e.I, e.O, e.F, e.S, e.$ + t[1]);
|
|
636
|
+
return o.X += t[0], o;
|
|
646
637
|
}
|
|
647
638
|
function roundTime(e, n, r, a) {
|
|
648
639
|
const i = nanosecondsForTimeUnit(clamp(r - 1, 3, 8)), c = e.D * o + e.I * t + 1e9 * e.O + 1e6 * e.F + 1e3 * e.S + e.$;
|
|
@@ -656,10 +647,10 @@ function addDurationToTime(e, t, o) {
|
|
|
656
647
|
return createTemporalTime(addTime(t, toInternalDurationRecord(applySignToDurationSlot(toTemporalDuration(o), e)).p));
|
|
657
648
|
}
|
|
658
649
|
function getInternalSlotOrThrowForPlainTime(e) {
|
|
659
|
-
return getInternalSlotOrThrow(
|
|
650
|
+
return getInternalSlotOrThrow(Ce, e);
|
|
660
651
|
}
|
|
661
652
|
function isPlainTime(e) {
|
|
662
|
-
return
|
|
653
|
+
return Ce.has(e);
|
|
663
654
|
}
|
|
664
655
|
function optionalChain(e) {
|
|
665
656
|
return e.reduceRight((e, t) => `${t}(?:${e})?`);
|
|
@@ -671,10 +662,10 @@ function createRegExp(e) {
|
|
|
671
662
|
return RegExp(`^(?:${e})$`);
|
|
672
663
|
}
|
|
673
664
|
function isAmbiguousTemporalTimeString(e) {
|
|
674
|
-
return
|
|
665
|
+
return it.some((t) => isSemanticallyValid(e.match(t)?.groups));
|
|
675
666
|
}
|
|
676
667
|
function isTimeZoneIdentifier(e) {
|
|
677
|
-
return
|
|
668
|
+
return ct.test(e);
|
|
678
669
|
}
|
|
679
670
|
function isSemanticallyValid(e) {
|
|
680
671
|
return !!e && "-000000" !== (e.a || e.l) && (!e.a || isValidIsoDate(Se(e.a), Se(e.b), Se(e.c))) && (!e.n || isValidIsoDate(1972, Se(e.m), Se(e.n)));
|
|
@@ -682,12 +673,12 @@ function isSemanticallyValid(e) {
|
|
|
682
673
|
function parseIsoDateTime(e, t) {
|
|
683
674
|
for (const o of t) {
|
|
684
675
|
const t = e.match(o);
|
|
685
|
-
if (!t || !isSemanticallyValid(t.groups) || o ===
|
|
676
|
+
if (!t || !isSemanticallyValid(t.groups) || o === nt && isAmbiguousTemporalTimeString(e)) continue;
|
|
686
677
|
const n = t.groups;
|
|
687
678
|
let r;
|
|
688
679
|
if (n.k) {
|
|
689
680
|
let t = !1;
|
|
690
|
-
for (const [, o, a, i] of n.k.matchAll(
|
|
681
|
+
for (const [, o, a, i] of n.k.matchAll(Qe)) "u-ca" === a ? r ? (o || t) && throwRangeError(parseError(e)) : (r = i, t = !!o) : o && throwRangeError(parseError(e));
|
|
691
682
|
}
|
|
692
683
|
n.m && r && "iso8601" !== asciiLowerCase(r) && throwRangeError(parseError(e));
|
|
693
684
|
const a = (n.g || "").padEnd(9, "0");
|
|
@@ -707,11 +698,11 @@ function parseIsoDateTime(e, t) {
|
|
|
707
698
|
throwRangeError(parseError(e));
|
|
708
699
|
}
|
|
709
700
|
function parseDateTimeUtcOffset(e) {
|
|
710
|
-
const o = e.match(
|
|
701
|
+
const o = e.match(lt);
|
|
711
702
|
return o || throwRangeError(parseError(e)), Se(`${o[1]}1`) * (36e11 * Se(o[2]) + Se(o[4] || "") * t + 1e9 * Se(o[5] || "") + Se((o[6] || "").padEnd(9, "0")) + 0);
|
|
712
703
|
}
|
|
713
704
|
function hasUtcOffsetSubMinuteParts(e) {
|
|
714
|
-
return !!e.match(
|
|
705
|
+
return !!e.match(lt)[5];
|
|
715
706
|
}
|
|
716
707
|
function toTemporalMonthDay(e, t) {
|
|
717
708
|
if (isObject(e)) {
|
|
@@ -719,18 +710,18 @@ function toTemporalMonthDay(e, t) {
|
|
|
719
710
|
if (o) return getTemporalOverflowOption(getOptionsObject(t)), createTemporalMonthDay(o.o, o.Y);
|
|
720
711
|
const n = getTemporalCalendarIdentifierWithIsoDefault(e);
|
|
721
712
|
return createTemporalMonthDay(calendarMonthDayFromFields(n, prepareCalendarFields(n, e, [
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
713
|
+
wt.t,
|
|
714
|
+
wt.u,
|
|
715
|
+
wt.v,
|
|
716
|
+
wt.T
|
|
726
717
|
], []), getTemporalOverflowOption(getOptionsObject(t))), n);
|
|
727
718
|
}
|
|
728
719
|
validateString(e);
|
|
729
|
-
const o = parseIsoDateTime(e, [
|
|
720
|
+
const o = parseIsoDateTime(e, [rt]), n = canonicalizeCalendar(o.Y || "iso8601");
|
|
730
721
|
return getTemporalOverflowOption(getOptionsObject(t)), createTemporalMonthDay("iso8601" === n ? createIsoDateRecord(1972, o.u, o.T) : calendarMonthDayFromFields(n, isoDateToFields(n, validateIsoDate(createIsoDateRecord(o.t, o.u, o.T)), q), _), n);
|
|
731
722
|
}
|
|
732
|
-
function createTemporalMonthDay(e, t, o = Object.create(
|
|
733
|
-
return
|
|
723
|
+
function createTemporalMonthDay(e, t, o = Object.create(mt.prototype)) {
|
|
724
|
+
return dt.set(o, {
|
|
734
725
|
o: validateIsoDate(e),
|
|
735
726
|
Y: t
|
|
736
727
|
}), o;
|
|
@@ -739,10 +730,10 @@ function temporalMonthDayToString(e, t) {
|
|
|
739
730
|
return `${t === De || t === pe || "iso8601" !== e.Y ? `${padIsoYear(e.o.t)}-` : ""}${toZeroPaddedDecimalString(e.o.u, 2)}-${toZeroPaddedDecimalString(e.o.T, 2)}${formatCalendarAnnotation(e.Y, t)}`;
|
|
740
731
|
}
|
|
741
732
|
function getInternalSlotForPlainMonthDay(e) {
|
|
742
|
-
return
|
|
733
|
+
return dt.get(e);
|
|
743
734
|
}
|
|
744
735
|
function getInternalSlotOrThrowForPlainMonthDay(e) {
|
|
745
|
-
return getInternalSlotOrThrow(
|
|
736
|
+
return getInternalSlotOrThrow(dt, e);
|
|
746
737
|
}
|
|
747
738
|
function isPlainMonthDay(e) {
|
|
748
739
|
return !!getInternalSlotForPlainMonthDay(e);
|
|
@@ -753,13 +744,13 @@ function toTemporalYearMonth(e, t) {
|
|
|
753
744
|
if (o) return getTemporalOverflowOption(getOptionsObject(t)), createTemporalYearMonth(o.o, o.Y);
|
|
754
745
|
const n = getTemporalCalendarIdentifierWithIsoDefault(e);
|
|
755
746
|
return createTemporalYearMonth(calendarYearMonthFromFields(n, prepareCalendarFields(n, e, [
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
747
|
+
wt.t,
|
|
748
|
+
wt.u,
|
|
749
|
+
wt.v
|
|
759
750
|
], []), getTemporalOverflowOption(getOptionsObject(t))), n);
|
|
760
751
|
}
|
|
761
752
|
validateString(e);
|
|
762
|
-
const o = parseIsoDateTime(e, [
|
|
753
|
+
const o = parseIsoDateTime(e, [at]), n = canonicalizeCalendar(o.Y || "iso8601");
|
|
763
754
|
return getTemporalOverflowOption(getOptionsObject(t)), createTemporalYearMonth(calendarYearMonthFromFields(n, isoDateToFields(n, validateIsoYearMonth(createIsoDateRecord(o.t, o.u, o.T)), H), _), n);
|
|
764
755
|
}
|
|
765
756
|
function balanceIsoYearMonth(e, t) {
|
|
@@ -768,8 +759,8 @@ function balanceIsoYearMonth(e, t) {
|
|
|
768
759
|
u: modFloor(t - 1, 12) + 1
|
|
769
760
|
};
|
|
770
761
|
}
|
|
771
|
-
function createTemporalYearMonth(e, t, o = Object.create(
|
|
772
|
-
return
|
|
762
|
+
function createTemporalYearMonth(e, t, o = Object.create(Tt.prototype)) {
|
|
763
|
+
return ut.set(o, {
|
|
773
764
|
o: validateIsoYearMonth(e),
|
|
774
765
|
Y: t
|
|
775
766
|
}), o;
|
|
@@ -795,10 +786,10 @@ function differenceTemporalPlainYearMonth(e, t, o, n) {
|
|
|
795
786
|
]));
|
|
796
787
|
const i = calendarDateFromFields(t.Y, createNullPrototypeObject({
|
|
797
788
|
...isoDateToFields(t.Y, t.o, H),
|
|
798
|
-
[
|
|
789
|
+
[wt.T]: 1
|
|
799
790
|
}), _), m = calendarDateFromFields(t.Y, createNullPrototypeObject({
|
|
800
791
|
...isoDateToFields(t.Y, r.o, H),
|
|
801
|
-
[
|
|
792
|
+
[wt.T]: 1
|
|
802
793
|
}), _);
|
|
803
794
|
let u = combineDateAndTimeDuration(adjustDateDurationRecord(calendarDateUntil(t.Y, i, m, a.L), 0, 0), ve);
|
|
804
795
|
if (a.H !== s || 1 !== a.V) {
|
|
@@ -811,17 +802,17 @@ function addDurationToYearMonth(e, t, o, n) {
|
|
|
811
802
|
const r = toInternalDurationRecord(applySignToDurationSlot(toTemporalDuration(o), e)), a = getTemporalOverflowOption(getOptionsObject(n));
|
|
812
803
|
return (r.A.ee || r.A.X || signTimeDuration(r.p)) && throwRangeError("duration can contain only years and months"), createTemporalYearMonth(calendarYearMonthFromFields(t.Y, isoDateToFields(t.Y, calendarDateAdd(t.Y, calendarDateFromFields(t.Y, createNullPrototypeObject({
|
|
813
804
|
...isoDateToFields(t.Y, t.o, H),
|
|
814
|
-
[
|
|
805
|
+
[wt.T]: 1
|
|
815
806
|
}), _), r.A, a), H), a), t.Y);
|
|
816
807
|
}
|
|
817
808
|
function validateIsoYearMonth(e) {
|
|
818
809
|
return ((e) => isWithin(12 * e.t + e.u, -3261848, 3309129))(e) || throwRangeError(P), e;
|
|
819
810
|
}
|
|
820
811
|
function getInternalSlotForPlainYearMonth(e) {
|
|
821
|
-
return
|
|
812
|
+
return ut.get(e);
|
|
822
813
|
}
|
|
823
814
|
function getInternalSlotOrThrowForPlainYearMonth(e) {
|
|
824
|
-
return getInternalSlotOrThrow(
|
|
815
|
+
return getInternalSlotOrThrow(ut, e);
|
|
825
816
|
}
|
|
826
817
|
function isPlainYearMonth(e) {
|
|
827
818
|
return !!getInternalSlotForPlainYearMonth(e);
|
|
@@ -831,14 +822,14 @@ function calendarDateForPlainYearMonth(e) {
|
|
|
831
822
|
return calendarIsoToDate(t.Y, t.o);
|
|
832
823
|
}
|
|
833
824
|
function createIsoDateRecord(e, t, o) {
|
|
834
|
-
return {
|
|
825
|
+
return isValidIsoDate(e, t, o) || throwRangeError(b), {
|
|
835
826
|
t: e,
|
|
836
827
|
u: t,
|
|
837
828
|
T: o
|
|
838
829
|
};
|
|
839
830
|
}
|
|
840
|
-
function createTemporalDate(e, t, o = Object.create(
|
|
841
|
-
return
|
|
831
|
+
function createTemporalDate(e, t, o = Object.create(ht.prototype)) {
|
|
832
|
+
return Dt.set(o, {
|
|
842
833
|
o: validateIsoDate(e),
|
|
843
834
|
Y: t
|
|
844
835
|
}), o;
|
|
@@ -862,18 +853,18 @@ function toTemporalDate(e, t) {
|
|
|
862
853
|
}
|
|
863
854
|
const o = getTemporalCalendarIdentifierWithIsoDefault(e);
|
|
864
855
|
return createTemporalDate(calendarDateFromFields(o, prepareCalendarFields(o, e, [
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
856
|
+
wt.t,
|
|
857
|
+
wt.u,
|
|
858
|
+
wt.v,
|
|
859
|
+
wt.T
|
|
869
860
|
], []), getTemporalOverflowOption(getOptionsObject(t))), o);
|
|
870
861
|
}
|
|
871
862
|
validateString(e);
|
|
872
|
-
const o = parseIsoDateTime(e, [
|
|
863
|
+
const o = parseIsoDateTime(e, [tt]), n = canonicalizeCalendar(o.Y || "iso8601");
|
|
873
864
|
return getTemporalOverflowOption(getOptionsObject(t)), createTemporalDate(createIsoDateRecord(o.t, o.u, o.T), n);
|
|
874
865
|
}
|
|
875
866
|
function regulateIsoDate(e, t, o, n) {
|
|
876
|
-
return "constrain" === n ? createIsoDateRecord(e, t = clamp(t, 1, 12), clamp(o, 1, isoDaysInMonth(e, t))) :
|
|
867
|
+
return "constrain" === n ? createIsoDateRecord(e, t = clamp(t, 1, 12), clamp(o, 1, isoDaysInMonth(e, t))) : createIsoDateRecord(e, t, o);
|
|
877
868
|
}
|
|
878
869
|
function isValidIsoDate(e, t, o) {
|
|
879
870
|
return isWithin(t, 1, 12) && isWithin(o, 1, isoDaysInMonth(e, t));
|
|
@@ -920,10 +911,10 @@ function addDurationToDate(e, t, o, n) {
|
|
|
920
911
|
})(applySignToDurationSlot(toTemporalDuration(o), e)), getTemporalOverflowOption(getOptionsObject(n))), t.Y);
|
|
921
912
|
}
|
|
922
913
|
function getInternalSlotForPlainDate(e) {
|
|
923
|
-
return
|
|
914
|
+
return Dt.get(e);
|
|
924
915
|
}
|
|
925
916
|
function getInternalSlotOrThrowForPlainDate(e) {
|
|
926
|
-
return getInternalSlotOrThrow(
|
|
917
|
+
return getInternalSlotOrThrow(Dt, e);
|
|
927
918
|
}
|
|
928
919
|
function isPlainDate(e) {
|
|
929
920
|
return !!getInternalSlotForPlainDate(e);
|
|
@@ -936,7 +927,7 @@ function calendarDateForPlainDate(e) {
|
|
|
936
927
|
return calendarIsoToDate(t.Y, t.o);
|
|
937
928
|
}
|
|
938
929
|
function formatToParts(e, t) {
|
|
939
|
-
return (
|
|
930
|
+
return (pt[e] ||= new Zt("en", {
|
|
940
931
|
year: "numeric",
|
|
941
932
|
month: "numeric",
|
|
942
933
|
day: "numeric",
|
|
@@ -957,7 +948,7 @@ function extractYearMonthDay(e, t) {
|
|
|
957
948
|
};
|
|
958
949
|
}
|
|
959
950
|
function yearMonthDay(e, t) {
|
|
960
|
-
return
|
|
951
|
+
return ft[e].J(t, () => ((e, t) => {
|
|
961
952
|
const o = formatToParts(e, t), n = [
|
|
962
953
|
"relatedYear",
|
|
963
954
|
"month",
|
|
@@ -971,7 +962,7 @@ function yearMonthDay(e, t) {
|
|
|
971
962
|
})(e, t));
|
|
972
963
|
}
|
|
973
964
|
function getNewYear(e, t) {
|
|
974
|
-
return
|
|
965
|
+
return gt[e].J(t, () => {
|
|
975
966
|
let o = isoDateToEpochDays(t, 0, 1985 === t ? 53 : Math.floor(modFloor(-10.8822 * t + 16, 29.53)) + 23), n = yearMonthDay(e, o);
|
|
976
967
|
for (let r = 0; "M01" !== n.v; r++) {
|
|
977
968
|
if (r > 20) throw new Error("unexpected calendar error");
|
|
@@ -1115,7 +1106,7 @@ function epochDaysToDate$2(e, t) {
|
|
|
1115
1106
|
};
|
|
1116
1107
|
}
|
|
1117
1108
|
function getYearMonthDay(e) {
|
|
1118
|
-
return
|
|
1109
|
+
return It.J(e, () => extractYearMonthDay("islamic-umalqura", e));
|
|
1119
1110
|
}
|
|
1120
1111
|
function getFirstDayOfMonth(e, t) {
|
|
1121
1112
|
const o = balanceIsoYearMonth(e, t), n = calendarIntegersToEpochDays$2("islamic-civil", o.t, o.u, 1);
|
|
@@ -1128,7 +1119,7 @@ function constrainDay$2(e, t, o) {
|
|
|
1128
1119
|
return o < 30 ? o : clamp(o, 1, ((e, t) => getFirstDayOfMonth(e, t + 1) - getFirstDayOfMonth(e, t))(e, t));
|
|
1129
1120
|
}
|
|
1130
1121
|
function startOfYear(e) {
|
|
1131
|
-
return
|
|
1122
|
+
return Ot.J(e, () => {
|
|
1132
1123
|
const t = isoDateToEpochDays(e + 621, 4, 1), o = extractYearMonthDay("persian", t);
|
|
1133
1124
|
return t - dayOfYearFromMonthDay(o.u, o.T) + 1;
|
|
1134
1125
|
});
|
|
@@ -1161,7 +1152,7 @@ function daysInMonth(e, t) {
|
|
|
1161
1152
|
return t <= 6 ? 31 : 12 !== t || isLeapYear(e) ? 30 : 29;
|
|
1162
1153
|
}
|
|
1163
1154
|
function canonicalizeCalendar(e) {
|
|
1164
|
-
return "islamicc" === (e = asciiLowerCase(e)) ? "islamic-civil" : "ethiopic-amete-alem" === e ? "ethioaa" :
|
|
1155
|
+
return "islamicc" === (e = asciiLowerCase(e)) ? "islamic-civil" : "ethiopic-amete-alem" === e ? "ethioaa" : yt[e] ? e : throwRangeError(((e) => `unsupported calendar: ${e}`)(e));
|
|
1165
1156
|
}
|
|
1166
1157
|
function calendarDateAdd(e, t, o, n) {
|
|
1167
1158
|
if (isIsoLikeCalendar(e) || !o.te && !o.oe) return ((e, t, o) => {
|
|
@@ -1213,8 +1204,8 @@ function calendarDateUntil(e, t, o, n) {
|
|
|
1213
1204
|
return createDateDurationRecord(m, u, 0, isoDateRecordToEpochDays(o) - isoDateRecordToEpochDays(calendarIntegersToIso(e, h.t, h.u, constrainDay(e, h.t, h.u, a.T, _))));
|
|
1214
1205
|
}
|
|
1215
1206
|
function calendarDateToIso(e, t, o) {
|
|
1216
|
-
const n = t[
|
|
1217
|
-
if (isIsoLikeCalendar(e)) return ((e, t) => regulateIsoDate(e[
|
|
1207
|
+
const n = t[wt.t], r = t[wt.u], a = mapUnlessUndefined(t[wt.v], parseMonthCode), i = t[wt.T];
|
|
1208
|
+
if (isIsoLikeCalendar(e)) return ((e, t) => regulateIsoDate(e[wt.t], e[wt.u], e[wt.T], t))({
|
|
1218
1209
|
...t,
|
|
1219
1210
|
year: n + ("buddhist" === e ? -543 : "roc" === e ? 1911 : 0)
|
|
1220
1211
|
}, o);
|
|
@@ -1231,7 +1222,7 @@ function nonIsoCalendarIsoToDate(e, t) {
|
|
|
1231
1222
|
}
|
|
1232
1223
|
};
|
|
1233
1224
|
if ("japanese" === e) {
|
|
1234
|
-
const r = o >= 18017 ? "reiwa" : o >= 6947 ? "heisei" : o >= -15713 ? "showa" : o >= -20974 ? "taisho" : o >= -35428 ? "meiji" : t.t > 0 ? "ce" : "bce", a =
|
|
1225
|
+
const r = o >= 18017 ? "reiwa" : o >= 6947 ? "heisei" : o >= -15713 ? "showa" : o >= -20974 ? "taisho" : o >= -35428 ? "meiji" : t.t > 0 ? "ce" : "bce", a = yt[e].get(r);
|
|
1235
1226
|
return {
|
|
1236
1227
|
ne: r,
|
|
1237
1228
|
re: "bce" === r ? 1 - t.t : t.t - a + 1,
|
|
@@ -1403,19 +1394,18 @@ function nonIsoCalendarIsoToDate(e, t) {
|
|
|
1403
1394
|
})(o) : epochDaysToDate$2(e, o);
|
|
1404
1395
|
}
|
|
1405
1396
|
function calendarSupportsEra(e) {
|
|
1406
|
-
return !!
|
|
1397
|
+
return !!yt[e].size;
|
|
1407
1398
|
}
|
|
1408
1399
|
function canonicalizeEraInCalendar(e, t) {
|
|
1409
1400
|
const o = "ad" === t ? "ce" : "bc" === t ? "bce" : t;
|
|
1410
|
-
return
|
|
1401
|
+
return yt[e].has(o) ? o : throwRangeError(((e) => `invalid era: ${e}`)(t));
|
|
1411
1402
|
}
|
|
1412
1403
|
function constrainMonthCode(e, t, o, n) {
|
|
1413
|
-
if ("hebrew" === e) return o[1] && !isLeapYear$2(t) ? "reject" === n ? throwRangeError(b) : [6, !1] : o;
|
|
1414
1404
|
if (isChineseDangi(e)) {
|
|
1415
1405
|
const r = ((e, t, o) => o[1] && ordinalMonthToMonthCode(e, t, o[0] + 1) !== createMonthCode(...o) ? [o[0], !1] : o)(e, t, o);
|
|
1416
1406
|
return o !== r && "reject" === n ? throwRangeError(b) : r;
|
|
1417
1407
|
}
|
|
1418
|
-
return o;
|
|
1408
|
+
return "hebrew" === e && o[1] && !isLeapYear$2(t) ? "reject" === n ? throwRangeError(b) : [6, !1] : o;
|
|
1419
1409
|
}
|
|
1420
1410
|
function monthCodeToOrdinal(e, t, o) {
|
|
1421
1411
|
return "hebrew" === e ? ((e, t) => t[0] + +(isLeapYear$2(e) && t[0] + +t[1] >= 6))(t, o) : isChineseDangi(e) ? ((e, t, o) => o[1] || ordinalMonthToMonthCode(e, t, o[0]) !== createMonthCode(...o) ? o[0] + 1 : o[0])(e, t, o) : o[0];
|
|
@@ -1489,16 +1479,16 @@ function prepareCalendarFields(e, t, o, n) {
|
|
|
1489
1479
|
let a = !1;
|
|
1490
1480
|
for (const e of o) {
|
|
1491
1481
|
const o = t[e];
|
|
1492
|
-
void 0 !== o ? (a = !0, r[e] =
|
|
1482
|
+
void 0 !== o ? (a = !0, r[e] = Et[e][0](o)) : n && (n.includes(e) && throwTypeError(missingField(e)), r[e] = Et[e][1]);
|
|
1493
1483
|
}
|
|
1494
1484
|
return n || a || throwTypeError(U), r;
|
|
1495
1485
|
}
|
|
1496
1486
|
function calendarMergeFields(e, t, o) {
|
|
1497
1487
|
const n = ((e, t) => {
|
|
1498
1488
|
const o = [];
|
|
1499
|
-
return void 0 !== t[
|
|
1489
|
+
return void 0 !== t[wt.u] && o.push(wt.v), void 0 !== t[wt.v] && o.push(wt.u), !calendarSupportsEra(e) || void 0 === t[wt.ne] && void 0 === t[wt.re] && void 0 === t[wt.t] || o.push(wt.ne, wt.re, wt.t), !((e) => "japanese" === e)(e) || void 0 === t[wt.T] && void 0 === t[wt.u] && void 0 === t[wt.v] || o.push(wt.ne, wt.re), o;
|
|
1500
1490
|
})(e, o), r = createEmptyCalendarFieldsRecord();
|
|
1501
|
-
for (const e of
|
|
1491
|
+
for (const e of vt) void 0 === t[e] || n.includes(e) || (r[e] = t[e]), void 0 !== o[e] && (r[e] = o[e]);
|
|
1502
1492
|
return r;
|
|
1503
1493
|
}
|
|
1504
1494
|
function toTemporalCalendarIdentifier(e) {
|
|
@@ -1506,15 +1496,15 @@ function toTemporalCalendarIdentifier(e) {
|
|
|
1506
1496
|
return t ? t.Y : (validateString(e), canonicalizeCalendar(((e) => {
|
|
1507
1497
|
try {
|
|
1508
1498
|
return parseIsoDateTime(e, [
|
|
1509
|
-
Qe,
|
|
1510
1499
|
et,
|
|
1511
1500
|
tt,
|
|
1512
1501
|
ot,
|
|
1513
1502
|
nt,
|
|
1514
|
-
rt
|
|
1503
|
+
rt,
|
|
1504
|
+
at
|
|
1515
1505
|
]).Y || "iso8601";
|
|
1516
1506
|
} catch {
|
|
1517
|
-
return
|
|
1507
|
+
return st.test(e) || throwRangeError(parseError(e)), e;
|
|
1518
1508
|
}
|
|
1519
1509
|
})(e)));
|
|
1520
1510
|
}
|
|
@@ -1531,14 +1521,14 @@ function calendarYearMonthFromFields(e, t, o) {
|
|
|
1531
1521
|
function calendarMonthDayFromFields(e, t, o) {
|
|
1532
1522
|
return calendarResolveFields(e, t, q), (function(e, t, o) {
|
|
1533
1523
|
if (isIsoLikeCalendar(e)) return ((e, t, o) => {
|
|
1534
|
-
const n = regulateIsoDate(e[
|
|
1524
|
+
const n = regulateIsoDate(e[wt.t] ?? 1972, e[wt.u], e[wt.T], t);
|
|
1535
1525
|
return o || validateIsoDate(n), createIsoDateRecord(1972, n.u, n.T);
|
|
1536
1526
|
})({
|
|
1537
1527
|
...t,
|
|
1538
1528
|
year: mapUnlessUndefined(t.year, (t) => t + ("buddhist" === e ? -543 : "roc" === e ? 1911 : 0))
|
|
1539
1529
|
}, o, "iso8601" === e);
|
|
1540
|
-
const n = t[
|
|
1541
|
-
let r = t[
|
|
1530
|
+
const n = t[wt.t];
|
|
1531
|
+
let r = t[wt.u], a = mapUnlessUndefined(t[wt.v], parseMonthCode), i = t[wt.T];
|
|
1542
1532
|
return void 0 !== n ? (a || (r = constrainMonth(e, n, r, o)), a = a ? constrainMonthCode(e, n, a, o) : parseMonthCode(nonIsoCalendarIsoToDate(e, calendarIntegersToIso(e, n, r, 1)).v), i = constrainDay(e, n, r, i, o), validateIsoDate(calendarIntegersToIso(e, n, r, i))) : i = ((e, t, o, n) => {
|
|
1543
1533
|
if (isChineseDangi(e) || "islamic-umalqura" === e || "persian" === e) {
|
|
1544
1534
|
const r = clamp(o, 1, "persian" === e && t[0] <= 6 ? 31 : 30);
|
|
@@ -1637,30 +1627,30 @@ function calendarExtraFields(e, t) {
|
|
|
1637
1627
|
return calendarSupportsEra(e) && t.includes("year") ? ["era", "eraYear"] : [];
|
|
1638
1628
|
}
|
|
1639
1629
|
function isoResolveFields(e, t) {
|
|
1640
|
-
t !== q && void 0 === e[
|
|
1641
|
-
const o = mapUnlessUndefined(e[
|
|
1642
|
-
o && ((o[0] > 12 || o[1] || void 0 !== e[
|
|
1630
|
+
t !== q && void 0 === e[wt.t] && throwTypeError(missingField(wt.t)), t !== H && void 0 === e[wt.T] && throwTypeError(missingField(wt.T)), void 0 === e[wt.v] && void 0 === e[wt.u] && throwTypeError(missingField("month, monthCode"));
|
|
1631
|
+
const o = mapUnlessUndefined(e[wt.v], parseMonthCode);
|
|
1632
|
+
o && ((o[0] > 12 || o[1] || void 0 !== e[wt.u] && o[0] !== e[wt.u]) && throwRangeError(C), e[wt.u] = o[0]);
|
|
1643
1633
|
}
|
|
1644
1634
|
function calendarResolveFields(e, t, o = z) {
|
|
1645
1635
|
"iso8601" === e ? isoResolveFields(t, o) : (function(e, t, o = z) {
|
|
1646
|
-
const n = t[
|
|
1647
|
-
let a = t[
|
|
1648
|
-
const i = t[
|
|
1636
|
+
const n = t[wt.ne], r = t[wt.re];
|
|
1637
|
+
let a = t[wt.t];
|
|
1638
|
+
const i = t[wt.v], c = t[wt.u], s = t[wt.T];
|
|
1649
1639
|
if (o === q && void 0 !== i && void 0 === c || void 0 !== a || calendarSupportsEraForNonIsoCalendars(e) && void 0 !== n && void 0 !== r || throwTypeError(missingField("year, era, eraYear")), calendarSupportsEraForNonIsoCalendars(e) && void 0 === n != (void 0 === r) && throwTypeError(), o !== H && void 0 === s && throwTypeError(missingField("day")), c === i && throwTypeError(missingField("month, monthCode")), calendarSupportsEraForNonIsoCalendars(e) && void 0 !== r) {
|
|
1650
1640
|
const o = ((e, t, o) => {
|
|
1651
|
-
const n = canonicalizeEraInCalendar(e, t)
|
|
1652
|
-
return !1 ===
|
|
1641
|
+
const n = yt[e].get(canonicalizeEraInCalendar(e, t));
|
|
1642
|
+
return !1 === n ? 1 - o : n + o - 1;
|
|
1653
1643
|
})(e, canonicalizeEraInCalendar(e, n), r);
|
|
1654
|
-
void 0 !== a && a !== o && throwRangeError("mismatch of `year`, `era` and `eraYear`"), t[
|
|
1644
|
+
void 0 !== a && a !== o && throwRangeError("mismatch of `year`, `era` and `eraYear`"), t[wt.t] = o;
|
|
1655
1645
|
}
|
|
1656
|
-
if (t[
|
|
1646
|
+
if (t[wt.ne] = t[wt.re] = void 0, isIsoLikeCalendar(e)) isoResolveFields(t, o);
|
|
1657
1647
|
else if (i) {
|
|
1658
1648
|
const o = parseMonthCode(i);
|
|
1659
1649
|
((e, t) => isWithin(t[0], 1, 12) && !t[1] || isChineseDangi(e) && isWithin(t[0], 1, 12) || isCopticOrEthiopic(e) && 13 === t[0] && !t[1] || "hebrew" === e && 5 === t[0] && t[1])(e, o) || throwRangeError(invalidMonthCode(i));
|
|
1660
|
-
const n = t[
|
|
1650
|
+
const n = t[wt.t];
|
|
1661
1651
|
if (void 0 !== n) {
|
|
1662
1652
|
const r = monthCodeToOrdinal(e, n, constrainMonthCode(e, n, o, _));
|
|
1663
|
-
void 0 !== c && c !== r && throwRangeError(C), t[
|
|
1653
|
+
void 0 !== c && c !== r && throwRangeError(C), t[wt.u] = r;
|
|
1664
1654
|
}
|
|
1665
1655
|
}
|
|
1666
1656
|
})(e, t, o);
|
|
@@ -1705,7 +1695,7 @@ function combineDateAndTimeDuration(e, t) {
|
|
|
1705
1695
|
};
|
|
1706
1696
|
}
|
|
1707
1697
|
function toTemporalDuration(e) {
|
|
1708
|
-
return
|
|
1698
|
+
return Mt.get(e) || (isObject(e) ? createTemporalDurationSlot(toTemporalPartialDurationRecord(e).map((e) => e || 0)) : (validateString(e), ((e) => {
|
|
1709
1699
|
const t = e.match(/^([+-]?)p(?:(\d+)y)?(?:(\d+)m)?(?:(\d+)w)?(?:(\d+)d)?(?:t(?:(\d+)(?:[.,](\d{1,9}))?h)?(?:(\d+)(?:[.,](\d{1,9}))?m)?(?:(\d+)(?:[.,](\d{1,9}))?s)?)?$/i);
|
|
1710
1700
|
t && !/[pt]$|[.,](\d{1,9})[hms]./i.test(e) || throwRangeError(parseError(e));
|
|
1711
1701
|
const o = balanceTime(0, 0, 0, 0, 0, 3600 * toIntegerWithTruncation((t[7] || "").padEnd(9, "0")) + 60 * toIntegerWithTruncation((t[9] || "").padEnd(9, "0")) + toIntegerWithTruncation((t[11] || "").padEnd(9, "0")));
|
|
@@ -1721,8 +1711,7 @@ function toTemporalDuration(e) {
|
|
|
1721
1711
|
o.S,
|
|
1722
1712
|
o.$
|
|
1723
1713
|
]), toIntegerWithTruncation(`${t[1]}1`));
|
|
1724
|
-
})(e));
|
|
1725
|
-
var t;
|
|
1714
|
+
})(e)));
|
|
1726
1715
|
}
|
|
1727
1716
|
function durationSign(e) {
|
|
1728
1717
|
return sign(e.find((e) => e) || 0);
|
|
@@ -1731,7 +1720,7 @@ function dateDurationSign(e) {
|
|
|
1731
1720
|
return sign(e.te || e.oe || e.ee || e.X);
|
|
1732
1721
|
}
|
|
1733
1722
|
function internalDurationSign(e) {
|
|
1734
|
-
return dateDurationSign(e.A) ||
|
|
1723
|
+
return dateDurationSign(e.A) || bt(e.p);
|
|
1735
1724
|
}
|
|
1736
1725
|
function validateDuration(...e) {
|
|
1737
1726
|
e.some((e) => e < 0) && e.some((e) => e > 0) && throwRangeError("invalid duration"), (e.some((e) => Math.abs(e) > 1e25) || [
|
|
@@ -1773,8 +1762,8 @@ function toTemporalPartialDurationRecord(e) {
|
|
|
1773
1762
|
function createTemporalDurationSlot(e) {
|
|
1774
1763
|
return validateDuration(...e), e;
|
|
1775
1764
|
}
|
|
1776
|
-
function createTemporalDuration(e, t = Object.create(
|
|
1777
|
-
return
|
|
1765
|
+
function createTemporalDuration(e, t = Object.create(Pt.prototype)) {
|
|
1766
|
+
return Mt.set(t, e), t;
|
|
1778
1767
|
}
|
|
1779
1768
|
function timeDurationFromComponents(e, t, o, n, r, a) {
|
|
1780
1769
|
return addTimeDuration(addTimeDuration(addTimeDuration(createTimeDurationFromUnit(3600 * e + 60 * t + o, 1e9), createTimeDurationFromUnit(n, 1e6)), createTimeDurationFromUnit(r, 1e3)), createTimeDurationFromUnit(a, 1));
|
|
@@ -1825,7 +1814,7 @@ function nudgeToCalendarUnit(e, t, o, n, r, a, i, c, s, l) {
|
|
|
1825
1814
|
compareEpochNanoseconds(m.ge, n) * compareEpochNanoseconds(m.fe, n) > 0 && (m = computeNudgeWindow(e, t, o, r, a, i, c, s, !0), d = !0);
|
|
1826
1815
|
const u = differenceEpochNanoseconds(m.ge, n), T = differenceEpochNanoseconds(m.ge, m.fe);
|
|
1827
1816
|
let D = m.Ie, h = m.ge;
|
|
1828
|
-
return roundNumberToIncrement(m.he + ((e, t, o) => signTimeDuration(e) ? Ee(e, t) ? Ee(addTimeDuration(e, e), t) * o / 5 + .5 : 1 : 0)(u, T, e) * c * e, c, l) === m.pe && (d = !0, D = m.Oe, h = m.fe), {
|
|
1817
|
+
return roundNumberToIncrement(m.he + ((e, t, o) => signTimeDuration(e) ? Ee(e, t) ? Ee(addTimeDuration(e, e), t) * o / 5 + .5 : 1 : 0)(u, T, e) * c * e, c, l) === m.pe && (d = !0, D = m.Oe, h = m.fe), signTimeDuration(T) || throwRangeError("internal error"), {
|
|
1829
1818
|
Fe: {
|
|
1830
1819
|
ye: combineDateAndTimeDuration(D, ve),
|
|
1831
1820
|
Se: h,
|
|
@@ -1840,7 +1829,7 @@ function roundRelativeDuration(e, t, o, n, r, a, i, c, s, m) {
|
|
|
1840
1829
|
let h = roundTimeDurationToIncrement(t.p, a * D, c);
|
|
1841
1830
|
const p = addTimeDuration(h, negateTimeDuration(T));
|
|
1842
1831
|
let g = !1, f = 0;
|
|
1843
|
-
return
|
|
1832
|
+
return bt(p) !== -e && (g = !0, f = e, h = roundTimeDurationToIncrement(p, a * D, c)), {
|
|
1844
1833
|
ye: combineDateAndTimeDuration(adjustDateDurationRecord(t.A, t.A.X + f), h),
|
|
1845
1834
|
Se: addTimeDurationToEpochNanoseconds(u, h),
|
|
1846
1835
|
we: g
|
|
@@ -1850,7 +1839,7 @@ function roundRelativeDuration(e, t, o, n, r, a, i, c, s, m) {
|
|
|
1850
1839
|
return {
|
|
1851
1840
|
ye: combineDateAndTimeDuration(adjustDateDurationRecord(e.A, isDateUnit(o) ? s : 0), isDateUnit(o) ? addTimeDuration(c, timeDurationFromComponents(24 * -s, 0, 0, 0, 0, 0)) : c),
|
|
1852
1841
|
Se: addTimeDurationToEpochNanoseconds(t, addTimeDuration(c, negateTimeDuration(i))),
|
|
1853
|
-
we: sign(s - i[0]) ===
|
|
1842
|
+
we: sign(s - i[0]) === bt(i)
|
|
1854
1843
|
};
|
|
1855
1844
|
})(e, o, i, c, s, m);
|
|
1856
1845
|
return T.we && s !== l ? ((e, t, o, n, r, a, i, c) => {
|
|
@@ -1859,8 +1848,8 @@ function roundRelativeDuration(e, t, o, n, r, a, i, c, s, m) {
|
|
|
1859
1848
|
let d;
|
|
1860
1849
|
for (let m = c - 1; m >= s; m--) if (m !== g || i === l) {
|
|
1861
1850
|
d = m === h ? createDateDurationRecord(t.A.te + e, 0, 0, 0) : m === p ? adjustDateDurationRecord(t.A, 0, 0, t.A.oe + e) : adjustDateDurationRecord(t.A, 0, t.A.ee + e);
|
|
1862
|
-
const i = combineIsoDateAndTimeRecord(calendarDateAdd(a, n.o, d, _), n.p);
|
|
1863
|
-
if (
|
|
1851
|
+
const i = combineIsoDateAndTimeRecord(calendarDateAdd(a, n.o, d, _), n.p), c = r ? getEpochNanosecondsFor(r, i, G) : getUtcEpochNanoseconds(i);
|
|
1852
|
+
if (bt(differenceEpochNanoseconds(c, o)) === -e) break;
|
|
1864
1853
|
t = combineDateAndTimeDuration(d, ve);
|
|
1865
1854
|
}
|
|
1866
1855
|
return t;
|
|
@@ -1877,7 +1866,7 @@ function temporalDurationToString(e, t) {
|
|
|
1877
1866
|
"D",
|
|
1878
1867
|
"H",
|
|
1879
1868
|
"M"
|
|
1880
|
-
].map((t, o) => e[o] ? `${e[o]}${t}` : ""), h = `${u}${D}${
|
|
1869
|
+
].map((t, o) => e[o] ? `${e[o]}${t}` : ""), h = `${u}${D}${bt(n) || defaultTemporalLargestUnit(e) >= T || void 0 !== t ? `${toString(r)}${formatFractionalSeconds(1e6 * a + 1e3 * i + c, t)}S` : ""}`;
|
|
1881
1870
|
return `${o < 0 ? "-" : ""}P${s}${l}${d}${m}${h && `T${h}`}`;
|
|
1882
1871
|
}
|
|
1883
1872
|
function addDurations(e, t, o) {
|
|
@@ -1885,7 +1874,7 @@ function addDurations(e, t, o) {
|
|
|
1885
1874
|
return isCalendarUnit(r) && throwRangeError(durationWithDateUnit(r)), createTemporalDuration(temporalDurationFromInternal(combineDateAndTimeDuration(zeroDateDuration(), addTimeDuration(toInternalDurationRecordWith24HourDays(t).p, toInternalDurationRecordWith24HourDays(n).p)), r));
|
|
1886
1875
|
}
|
|
1887
1876
|
function getInternalSlotOrThrowForDuration(e) {
|
|
1888
|
-
return getInternalSlotOrThrow(
|
|
1877
|
+
return getInternalSlotOrThrow(Mt, e);
|
|
1889
1878
|
}
|
|
1890
1879
|
function applySignToDurationSlot(e, t) {
|
|
1891
1880
|
return createTemporalDurationSlot(e.map((e) => e * t + 0));
|
|
@@ -2016,23 +2005,23 @@ function getTemporalRelativeToOption(e) {
|
|
|
2016
2005
|
if (e) return createNullPrototypeObject({ Pe: getInternalSlotOrThrowForPlainDate(createTemporalDate(e.K.o, e.Y)) });
|
|
2017
2006
|
r = getTemporalCalendarIdentifierWithIsoDefault(t);
|
|
2018
2007
|
const c = prepareCalendarFields(r, t, [
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2008
|
+
wt.t,
|
|
2009
|
+
wt.u,
|
|
2010
|
+
wt.v,
|
|
2011
|
+
wt.T,
|
|
2012
|
+
wt.D,
|
|
2013
|
+
wt.I,
|
|
2014
|
+
wt.O,
|
|
2015
|
+
wt.F,
|
|
2016
|
+
wt.S,
|
|
2017
|
+
wt.$,
|
|
2018
|
+
wt.M,
|
|
2019
|
+
wt.P
|
|
2031
2020
|
], []), l = interpretTemporalDateTimeFields(r, c, _);
|
|
2032
2021
|
a = l.o, i = l.p, o = c.timeZone, n = c.offset, s = n ? te : ne;
|
|
2033
2022
|
} else {
|
|
2034
2023
|
validateString(t);
|
|
2035
|
-
const e = parseIsoDateTime(t, [
|
|
2024
|
+
const e = parseIsoDateTime(t, [et, tt]);
|
|
2036
2025
|
n = e.P.N, e.P.R ? (o = toTemporalTimeZoneIdentifier(e.P.R), s = e.P.Z ? oe : n ? te : ne, c = void 0 !== n && hasUtcOffsetSubMinuteParts(n)) : o = void 0, r = canonicalizeCalendar(e.Y || "iso8601"), a = createIsoDateRecord(e.t, e.u, e.T), i = e.p;
|
|
2037
2026
|
}
|
|
2038
2027
|
return createNullPrototypeObject(o ? { be: getInternalSlotOrThrowForZonedDateTime(createTemporalZonedDateTime(interpretISODateTimeOffset(a, i, s, s === te ? parseDateTimeUtcOffset(n) : 0, o, G, ee, c), o, r)) } : { Pe: getInternalSlotOrThrowForPlainDate(createTemporalDate(a, r)) });
|
|
@@ -2064,7 +2053,7 @@ function formatTimeString(e, t, o, n, r) {
|
|
|
2064
2053
|
return `${toZeroPaddedDecimalString(e, 2)}:${toZeroPaddedDecimalString(t, 2)}${r === J ? "" : `:${toZeroPaddedDecimalString(o, 2)}${formatFractionalSeconds(n, r)}`}`;
|
|
2065
2054
|
}
|
|
2066
2055
|
function roundNumberToIncrement(e, t, o) {
|
|
2067
|
-
return
|
|
2056
|
+
return Rt[o](e / t) * t;
|
|
2068
2057
|
}
|
|
2069
2058
|
function getRoundingModeOption(e, t) {
|
|
2070
2059
|
return getOption(e, "roundingMode", [
|
|
@@ -2086,14 +2075,14 @@ function getRoundingIncrementOption(e) {
|
|
|
2086
2075
|
function isoDateToFields(e, t, o) {
|
|
2087
2076
|
const n = calendarIsoToDate(e, t);
|
|
2088
2077
|
return createNullPrototypeObject({
|
|
2089
|
-
[
|
|
2090
|
-
[
|
|
2091
|
-
[
|
|
2078
|
+
[wt.t]: o === q ? void 0 : n.t,
|
|
2079
|
+
[wt.v]: n.v,
|
|
2080
|
+
[wt.T]: o === H ? void 0 : n.T
|
|
2092
2081
|
});
|
|
2093
2082
|
}
|
|
2094
2083
|
function getDifferenceSettings(e, t, o, n, r, a) {
|
|
2095
|
-
let i = getTemporalUnitValuedOption(t, "largestUnit"
|
|
2096
|
-
const c = getRoundingIncrementOption(t), s = getRoundingModeOption(t, ce), l = getTemporalUnitValuedOption(t, "smallestUnit"
|
|
2084
|
+
let i = getTemporalUnitValuedOption(t, "largestUnit") ?? "auto";
|
|
2085
|
+
const c = getRoundingIncrementOption(t), s = getRoundingModeOption(t, ce), l = getTemporalUnitValuedOption(t, "smallestUnit") ?? r;
|
|
2097
2086
|
return validateTemporalUnitValue(i, o, ["auto"]), n.includes(i) && throwRangeError(disallowedUnit(i)), validateTemporalUnitValue(l, o), n.includes(l) && throwRangeError(disallowedUnit(l)), "auto" === i && (i = largerOfTwoTemporalUnits(a, l)), i > l && throwRangeError($), isDateUnit(l) || validateTemporalRoundingIncrement(c, maximumTemporalDurationRoundingIncrement(l), !1), {
|
|
2098
2087
|
H: l,
|
|
2099
2088
|
L: i,
|
|
@@ -2115,16 +2104,16 @@ function epochDaysToIsoDate(e) {
|
|
|
2115
2104
|
function isoDateTimeToFields(e, t) {
|
|
2116
2105
|
return createNullPrototypeObject({
|
|
2117
2106
|
...isoDateToFields(e, t.o, z),
|
|
2118
|
-
[
|
|
2119
|
-
[
|
|
2120
|
-
[
|
|
2121
|
-
[
|
|
2122
|
-
[
|
|
2123
|
-
[
|
|
2107
|
+
[wt.D]: t.p.D,
|
|
2108
|
+
[wt.I]: t.p.I,
|
|
2109
|
+
[wt.O]: t.p.O,
|
|
2110
|
+
[wt.F]: t.p.F,
|
|
2111
|
+
[wt.S]: t.p.S,
|
|
2112
|
+
[wt.$]: t.p.$
|
|
2124
2113
|
});
|
|
2125
2114
|
}
|
|
2126
2115
|
function getInternalSlotOrThrowForDateTimeFormat(e) {
|
|
2127
|
-
return getInternalSlotOrThrow(
|
|
2116
|
+
return getInternalSlotOrThrow($t, e);
|
|
2128
2117
|
}
|
|
2129
2118
|
function formatDateTime(e, t) {
|
|
2130
2119
|
const [o, n] = handleDateTimeValue(e, t);
|
|
@@ -2138,19 +2127,19 @@ function dateStyleToMonthStyle(e) {
|
|
|
2138
2127
|
}
|
|
2139
2128
|
function amendOptionsForPlainDate(e) {
|
|
2140
2129
|
const t = createNullPrototypeObject(e);
|
|
2141
|
-
return hasAnyOptions(e,
|
|
2130
|
+
return hasAnyOptions(e, Ct) || (hasAnyOptions(e, Yt) && throwTypeError(N), t.year = t.month = t.day = "numeric"), removeDateTimeFormatOptions(t, [...Yt, "timeZoneName"]), t.timeZone = "UTC", t;
|
|
2142
2131
|
}
|
|
2143
2132
|
function amendOptionsForPlainTime(e) {
|
|
2144
2133
|
const t = createNullPrototypeObject(e);
|
|
2145
|
-
return hasAnyOptions(e,
|
|
2146
|
-
...
|
|
2134
|
+
return hasAnyOptions(e, Yt) || (hasAnyOptions(e, Ct) && throwTypeError(N), t.hour = t.minute = t.second = "numeric"), "long" !== e.timeStyle && "full" !== e.timeStyle || (removeDateTimeFormatOptions(t, ["timeStyle"]), t.hour = t.minute = t.second = "numeric"), removeDateTimeFormatOptions(t, [
|
|
2135
|
+
...Ct,
|
|
2147
2136
|
"era",
|
|
2148
2137
|
"timeZoneName"
|
|
2149
2138
|
]), t.timeZone = "UTC", t;
|
|
2150
2139
|
}
|
|
2151
2140
|
function amendOptionsForPlainDateTime(e) {
|
|
2152
2141
|
const t = createNullPrototypeObject(e);
|
|
2153
|
-
return "long" !== e.timeStyle && "full" !== e.timeStyle || (removeDateTimeFormatOptions(t, ["timeStyle"]), t.hour = t.minute = t.second = "numeric", e.dateStyle && (removeDateTimeFormatOptions(t, ["dateStyle"]), t.year = t.day = "numeric", t.month = dateStyleToMonthStyle(e.dateStyle), t.weekday = "full" === e.dateStyle ? "long" : void 0)), hasAnyOptions(e, [...
|
|
2142
|
+
return "long" !== e.timeStyle && "full" !== e.timeStyle || (removeDateTimeFormatOptions(t, ["timeStyle"]), t.hour = t.minute = t.second = "numeric", e.dateStyle && (removeDateTimeFormatOptions(t, ["dateStyle"]), t.year = t.day = "numeric", t.month = dateStyleToMonthStyle(e.dateStyle), t.weekday = "full" === e.dateStyle ? "long" : void 0)), hasAnyOptions(e, [...Ct, ...Yt]) || (t.year = t.month = t.day = t.hour = t.minute = t.second = "numeric"), removeDateTimeFormatOptions(t, ["timeZoneName"]), t.timeZone = "UTC", t;
|
|
2154
2143
|
}
|
|
2155
2144
|
function amendOptionsForPlainYearMonth(e) {
|
|
2156
2145
|
const t = createNullPrototypeObject(e);
|
|
@@ -2158,8 +2147,8 @@ function amendOptionsForPlainYearMonth(e) {
|
|
|
2158
2147
|
"year",
|
|
2159
2148
|
"month",
|
|
2160
2149
|
"dateStyle"
|
|
2161
|
-
]) || (hasAnyOptions(e, [...
|
|
2162
|
-
|
|
2150
|
+
]) || (hasAnyOptions(e, [...Ct, ...Yt]) && throwTypeError(N), t.year = t.month = "numeric"), removeDateTimeFormatOptions(t, [
|
|
2151
|
+
...Yt,
|
|
2163
2152
|
"day",
|
|
2164
2153
|
"weekday",
|
|
2165
2154
|
"timeZoneName"
|
|
@@ -2171,8 +2160,8 @@ function amendOptionsForPlainMonthDay(e) {
|
|
|
2171
2160
|
"month",
|
|
2172
2161
|
"day",
|
|
2173
2162
|
"dateStyle"
|
|
2174
|
-
]) || (hasAnyOptions(e, [...
|
|
2175
|
-
|
|
2163
|
+
]) || (hasAnyOptions(e, [...Ct, ...Yt]) && throwTypeError(N), t.month = t.day = "numeric"), removeDateTimeFormatOptions(t, [
|
|
2164
|
+
...Yt,
|
|
2176
2165
|
"era",
|
|
2177
2166
|
"year",
|
|
2178
2167
|
"weekday",
|
|
@@ -2181,7 +2170,7 @@ function amendOptionsForPlainMonthDay(e) {
|
|
|
2181
2170
|
}
|
|
2182
2171
|
function amendOptionsForInstant(e) {
|
|
2183
2172
|
const t = createNullPrototypeObject(e);
|
|
2184
|
-
return hasAnyOptions(e, [...
|
|
2173
|
+
return hasAnyOptions(e, [...Ct, ...Yt]) || (t.year = t.month = t.day = t.hour = t.minute = t.second = "numeric"), t;
|
|
2185
2174
|
}
|
|
2186
2175
|
function hasAnyOptions(e, t) {
|
|
2187
2176
|
return t.some((t) => void 0 !== e[t]);
|
|
@@ -2189,15 +2178,15 @@ function hasAnyOptions(e, t) {
|
|
|
2189
2178
|
function createDateTimeFormat(e, t = createNullPrototypeObject(), o, n) {
|
|
2190
2179
|
null === t && throwTypeError(N);
|
|
2191
2180
|
const r = createNullPrototypeObject();
|
|
2192
|
-
let a = new
|
|
2181
|
+
let a = new Zt(e, new Proxy({}, { get(e, o) {
|
|
2193
2182
|
const a = t[o];
|
|
2194
2183
|
return "timeZone" === o && void 0 !== n ? (void 0 !== a && throwTypeError("disallowed field: timeZone"), r[o] = n) : void 0 === a ? a : r[o] = "hour12" === o ? ((e) => !!e)(a) : "fractionalSecondDigits" === o ? Se(a) : toString(a);
|
|
2195
2184
|
} }));
|
|
2196
2185
|
return (o === z && r.timeStyle || o === V && r.dateStyle) && throwTypeError(N), r.calendar = a.resolvedOptions().calendar, void 0 === n || hasAnyOptions(r, [
|
|
2197
|
-
...
|
|
2198
|
-
|
|
2186
|
+
...Ct,
|
|
2187
|
+
...Yt,
|
|
2199
2188
|
"timeZoneName"
|
|
2200
|
-
]) || (r.timeZoneName = "short", a = new
|
|
2189
|
+
]) || (r.timeZoneName = "short", a = new Zt(a.resolvedOptions().locale, r)), createNullPrototypeObject({
|
|
2201
2190
|
Re: a,
|
|
2202
2191
|
Ne: r,
|
|
2203
2192
|
Ze: a.resolvedOptions().locale
|
|
@@ -2219,23 +2208,23 @@ function toDateTimeFormattable(e) {
|
|
|
2219
2208
|
}
|
|
2220
2209
|
function handleDateTimeValue(e, t) {
|
|
2221
2210
|
const o = getInternalSlotForPlainDate(t), n = getInternalSlotForPlainDateTime(t), r = getInternalSlotForPlainYearMonth(t), a = getInternalSlotForPlainMonthDay(t);
|
|
2222
|
-
return isPlainTime(t) ? [e.Ye ||= new
|
|
2211
|
+
return isPlainTime(t) ? [e.Ye ||= new Zt(e.Ze, amendOptionsForPlainTime(e.Ne)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(createIsoDateRecord(1970, 1, 1), getInternalSlotOrThrowForPlainTime(t))))] : o ? (o.Y !== e.Ne.calendar && "iso8601" !== o.Y && throwRangeError(Z), [e.Ce ||= new Zt(e.Ze, amendOptionsForPlainDate(e.Ne)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(o.o, midnightTimeRecord())))]) : n ? (n.Y !== e.Ne.calendar && "iso8601" !== n.Y && throwRangeError(Z), [e.Ue ||= new Zt(e.Ze, amendOptionsForPlainDateTime(e.Ne)), epochMilliseconds(getUtcEpochNanoseconds(n.K))]) : r ? (r.Y !== e.Ne.calendar && throwRangeError(Z), [e.je ||= new Zt(e.Ze, amendOptionsForPlainYearMonth(e.Ne)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(r.o, midnightTimeRecord())))]) : a ? (a.Y !== e.Ne.calendar && throwRangeError(Z), [e.We ||= new Zt(e.Ze, amendOptionsForPlainMonthDay(e.Ne)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(a.o, midnightTimeRecord())))]) : isInstant(t) ? [e.ke ||= new Zt(e.Ze, amendOptionsForInstant(e.Ne)), epochMilliseconds(getInternalSlotOrThrowForInstant(t).U)] : (isZonedDateTime(t) && throwTypeError(Y), [e.Re, t]);
|
|
2223
2212
|
}
|
|
2224
2213
|
function DateTimeFormat(e, t) {
|
|
2225
|
-
return new
|
|
2214
|
+
return new Ut(e, t);
|
|
2226
2215
|
}
|
|
2227
|
-
function createTemporalInstant(e, t = Object.create(
|
|
2228
|
-
return
|
|
2216
|
+
function createTemporalInstant(e, t = Object.create(Lt.prototype)) {
|
|
2217
|
+
return At.set(t, { U: e }), t;
|
|
2229
2218
|
}
|
|
2230
2219
|
function toTemporalInstant$1(e) {
|
|
2231
2220
|
if (isObject(e)) {
|
|
2232
|
-
const o = (t = e,
|
|
2221
|
+
const o = (t = e, At.get(t) || getInternalSlotForZonedDateTime(e));
|
|
2233
2222
|
if (o) return createTemporalInstant(o.U);
|
|
2234
2223
|
e = toPrimitive(e);
|
|
2235
2224
|
}
|
|
2236
2225
|
var t;
|
|
2237
2226
|
validateString(e);
|
|
2238
|
-
const o = parseIsoDateTime(e, [
|
|
2227
|
+
const o = parseIsoDateTime(e, [ot]), n = o.P.Z ? 0 : parseDateTimeUtcOffset(o.P.N), r = o.p;
|
|
2239
2228
|
return createTemporalInstant(validateEpochNanoseconds(getUtcEpochNanoseconds(balanceIsoDateTime(o.t, o.u, o.T, r.D, r.I, r.O, r.F, r.S, r.$ - n))));
|
|
2240
2229
|
}
|
|
2241
2230
|
function addInstant(e, t) {
|
|
@@ -2246,7 +2235,7 @@ function differenceInstant(e, t, o, n, r) {
|
|
|
2246
2235
|
}
|
|
2247
2236
|
function roundTemporalInstant(e, t, o, n) {
|
|
2248
2237
|
return (function(e, t, o) {
|
|
2249
|
-
return normalizeEpochNanoseconds(e[0], ((e, t, o) =>
|
|
2238
|
+
return normalizeEpochNanoseconds(e[0], ((e, t, o) => Nt[o](e / t) * t)(e[1], t, o));
|
|
2250
2239
|
})(e, t * nanosecondsForTimeUnit(o), n);
|
|
2251
2240
|
}
|
|
2252
2241
|
function temporalInstantToString(e, t, o) {
|
|
@@ -2265,19 +2254,19 @@ function validateEpochNanoseconds(e) {
|
|
|
2265
2254
|
return ((e) => compareEpochNanoseconds(ye, e) * compareEpochNanoseconds(we, e) <= 0)(e) || throwRangeError(P), e;
|
|
2266
2255
|
}
|
|
2267
2256
|
function getInternalSlotOrThrowForInstant(e) {
|
|
2268
|
-
return getInternalSlotOrThrow(
|
|
2257
|
+
return getInternalSlotOrThrow(At, e);
|
|
2269
2258
|
}
|
|
2270
2259
|
function isInstant(e) {
|
|
2271
|
-
return
|
|
2260
|
+
return At.has(e);
|
|
2272
2261
|
}
|
|
2273
2262
|
function clampEpochNanoseconds(e) {
|
|
2274
2263
|
return compareEpochNanoseconds(e, we) > 0 ? we : compareEpochNanoseconds(e, ye) < 0 ? ye : e;
|
|
2275
2264
|
}
|
|
2276
2265
|
function systemTimeZoneIdentifier() {
|
|
2277
|
-
return
|
|
2266
|
+
return Ht && qt + Ht > Date.now() && xt ? xt : (qt = Date.now(), xt = new Zt().resolvedOptions().timeZone);
|
|
2278
2267
|
}
|
|
2279
2268
|
function setSystemTimeZoneIdCacheTtl(e) {
|
|
2280
|
-
|
|
2269
|
+
Ht = e, e || (xt = void 0, qt = -1 / 0);
|
|
2281
2270
|
}
|
|
2282
2271
|
function systemUtcEpochNanoseconds() {
|
|
2283
2272
|
return createEpochNanosecondsFromEpochMilliseconds(Date.now());
|
|
@@ -2427,21 +2416,21 @@ var be = class {
|
|
|
2427
2416
|
validatePartialTemporalObject(e);
|
|
2428
2417
|
const n = getOffsetNanosecondsForZonedDateTimeSlot(o), r = getIsoDateTimeForZonedDateTimeSlot(o), a = calendarMergeFields(o.Y, createNullPrototypeObject({
|
|
2429
2418
|
...isoDateTimeToFields(o.Y, r),
|
|
2430
|
-
[
|
|
2419
|
+
[wt.M]: formatUtcOffsetNanoseconds(n)
|
|
2431
2420
|
}), prepareCalendarFields(o.Y, e, [
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2421
|
+
wt.t,
|
|
2422
|
+
wt.u,
|
|
2423
|
+
wt.v,
|
|
2424
|
+
wt.T,
|
|
2425
|
+
wt.D,
|
|
2426
|
+
wt.I,
|
|
2427
|
+
wt.O,
|
|
2428
|
+
wt.F,
|
|
2429
|
+
wt.S,
|
|
2430
|
+
wt.$,
|
|
2431
|
+
wt.M
|
|
2443
2432
|
])), i = getOptionsObject(t), c = getTemporalDisambiguationOption(i), s = getTemporalOffsetOption(i, Q), l = getTemporalOverflowOption(i), d = interpretTemporalDateTimeFields(o.Y, a, l);
|
|
2444
|
-
return createTemporalZonedDateTime(interpretISODateTimeOffset(d.o, d.p, te, parseDateTimeUtcOffset(a[
|
|
2433
|
+
return createTemporalZonedDateTime(interpretISODateTimeOffset(d.o, d.p, te, parseDateTimeUtcOffset(a[wt.M]), o.P, c, s, !0), o.P, o.Y);
|
|
2445
2434
|
}
|
|
2446
2435
|
withPlainTime(e = void 0) {
|
|
2447
2436
|
const t = getInternalSlotOrThrowForZonedDateTime(this), o = getIsoDateTimeForZonedDateTimeSlot(t);
|
|
@@ -2483,7 +2472,7 @@ var be = class {
|
|
|
2483
2472
|
return !compareEpochNanoseconds(t.U, o.U) && timeZoneEquals(t.P, o.P) && calendarEquals(t.Y, o.Y);
|
|
2484
2473
|
}
|
|
2485
2474
|
toString(e = void 0) {
|
|
2486
|
-
const t = getInternalSlotOrThrowForZonedDateTime(this), o = getOptionsObject(e), n = getTemporalShowCalendarNameOption(o), r = getTemporalFractionalSecondDigitsOption(o), a = ((e) => getOption(e, "offset", [ge, fe], ge))(o), i = getRoundingModeOption(o, ce), c = getTemporalUnitValuedOption(o, "smallestUnit"
|
|
2475
|
+
const t = getInternalSlotOrThrowForZonedDateTime(this), o = getOptionsObject(e), n = getTemporalShowCalendarNameOption(o), r = getTemporalFractionalSecondDigitsOption(o), a = ((e) => getOption(e, "offset", [ge, fe], ge))(o), i = getRoundingModeOption(o, ce), c = getTemporalUnitValuedOption(o, "smallestUnit"), s = ((e) => getOption(e, "timeZoneName", [
|
|
2487
2476
|
Ie,
|
|
2488
2477
|
Oe,
|
|
2489
2478
|
Fe
|
|
@@ -2510,9 +2499,8 @@ var be = class {
|
|
|
2510
2499
|
const t = getInternalSlotOrThrowForZonedDateTime(this);
|
|
2511
2500
|
void 0 === e && throwTypeError(W);
|
|
2512
2501
|
const o = getOption("string" == typeof e ? { direction: e } : getOptionsObject(e), "direction", ["next", "previous"], B), n = ((e, t, o) => {
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
return -1 === o ? a === n ? null : a > r ? searchTimeZoneTransition(e, a, a - 31536e3, o) || searchTimeZoneTransition(e, r, n, o) : searchTimeZoneTransition(e, a, n, o) : searchTimeZoneTransition(e, a, a > r ? a + 31536e3 : r, o);
|
|
2502
|
+
const n = -4e9, r = Math.floor((Date.now() + 31536e7) / 1e3), a = clamp(epochSeconds(addNanosecondsToEpochSeconds(t, o > 0 ? 0 : -1)), n, 1 / 0);
|
|
2503
|
+
return "UTC" === e || isOffsetTimeZoneIdentifier(e) ? null : -1 === o ? a === n ? null : a > r ? searchTimeZoneTransition(e, a, a - 31536e3, o) || searchTimeZoneTransition(e, r, n, o) : searchTimeZoneTransition(e, a, n, o) : searchTimeZoneTransition(e, a, Math.max(a + 31536e3, r), o);
|
|
2516
2504
|
})(t.P, t.U, "next" === o ? 1 : -1);
|
|
2517
2505
|
return null === n ? null : createTemporalZonedDateTime(n, t.P, t.Y);
|
|
2518
2506
|
}
|
|
@@ -2532,8 +2520,8 @@ var be = class {
|
|
|
2532
2520
|
}
|
|
2533
2521
|
};
|
|
2534
2522
|
defineStringTag(be.prototype, "Temporal.ZonedDateTime"), renameFunction(be, "ZonedDateTime");
|
|
2535
|
-
const Pe = createNullPrototypeObject(),
|
|
2536
|
-
var
|
|
2523
|
+
const Pe = globalThis.Temporal, Re = createNullPrototypeObject(), Ne = createNullPrototypeObject(), Ze = /* @__PURE__ */ new WeakMap();
|
|
2524
|
+
var $e = class {
|
|
2537
2525
|
constructor(e, t, o, n = 0, r = 0, a = 0, i = 0, c = 0, s = 0, l = "iso8601") {
|
|
2538
2526
|
const d = [
|
|
2539
2527
|
e,
|
|
@@ -2549,7 +2537,7 @@ var Ze = class {
|
|
|
2549
2537
|
].map(toIntegerWithTruncation);
|
|
2550
2538
|
validateString(l);
|
|
2551
2539
|
const u = canonicalizeCalendar(l);
|
|
2552
|
-
|
|
2540
|
+
createTemporalDateTime(combineIsoDateAndTimeRecord(createIsoDateRecord(...d), createTimeRecord(...m)), u, this);
|
|
2553
2541
|
}
|
|
2554
2542
|
static from(e, t = void 0) {
|
|
2555
2543
|
return toTemporalDateTime(e, t);
|
|
@@ -2627,16 +2615,16 @@ var Ze = class {
|
|
|
2627
2615
|
const o = getInternalSlotOrThrowForPlainDateTime(this);
|
|
2628
2616
|
validatePartialTemporalObject(e);
|
|
2629
2617
|
const n = calendarMergeFields(o.Y, isoDateTimeToFields(o.Y, o.K), prepareCalendarFields(o.Y, e, [
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2618
|
+
wt.t,
|
|
2619
|
+
wt.u,
|
|
2620
|
+
wt.v,
|
|
2621
|
+
wt.T,
|
|
2622
|
+
wt.D,
|
|
2623
|
+
wt.I,
|
|
2624
|
+
wt.O,
|
|
2625
|
+
wt.F,
|
|
2626
|
+
wt.S,
|
|
2627
|
+
wt.$
|
|
2640
2628
|
]));
|
|
2641
2629
|
return createTemporalDateTime(interpretTemporalDateTimeFields(o.Y, n, getTemporalOverflowOption(getOptionsObject(t))), o.Y);
|
|
2642
2630
|
}
|
|
@@ -2668,7 +2656,7 @@ var Ze = class {
|
|
|
2668
2656
|
return !compareIsoDateTime(t.K, o.K) && calendarEquals(t.Y, o.Y);
|
|
2669
2657
|
}
|
|
2670
2658
|
toString(e = void 0) {
|
|
2671
|
-
const t = getInternalSlotOrThrowForPlainDateTime(this), o = getOptionsObject(e), n = getTemporalShowCalendarNameOption(o), r = getTemporalFractionalSecondDigitsOption(o), a = getRoundingModeOption(o, ce), i = getTemporalUnitValuedOption(o, "smallestUnit"
|
|
2659
|
+
const t = getInternalSlotOrThrowForPlainDateTime(this), o = getOptionsObject(e), n = getTemporalShowCalendarNameOption(o), r = getTemporalFractionalSecondDigitsOption(o), a = getRoundingModeOption(o, ce), i = getTemporalUnitValuedOption(o, "smallestUnit");
|
|
2672
2660
|
validateTemporalUnitValue(i, V), i === m && throwRangeError(invalidField("smallestUnit"));
|
|
2673
2661
|
const c = toSecondsStringPrecisionRecord(i, r);
|
|
2674
2662
|
return isoDateTimeToString(validateIsoDateTime(roundIsoDateTime(t.K, c.Me, c.Ee, a)), t.Y, c.ve, n);
|
|
@@ -2695,19 +2683,18 @@ var Ze = class {
|
|
|
2695
2683
|
return createTemporalTime(getInternalSlotOrThrowForPlainDateTime(this).K.p);
|
|
2696
2684
|
}
|
|
2697
2685
|
};
|
|
2698
|
-
defineStringTag(
|
|
2699
|
-
const
|
|
2700
|
-
var
|
|
2686
|
+
defineStringTag($e.prototype, "Temporal.PlainDateTime"), renameFunction($e, "PlainDateTime");
|
|
2687
|
+
const Ce = /* @__PURE__ */ new WeakMap();
|
|
2688
|
+
var Ye = class {
|
|
2701
2689
|
constructor(e = 0, t = 0, o = 0, n = 0, r = 0, a = 0) {
|
|
2702
|
-
|
|
2690
|
+
createTemporalTime(createTimeRecord(...[
|
|
2703
2691
|
e,
|
|
2704
2692
|
t,
|
|
2705
2693
|
o,
|
|
2706
2694
|
n,
|
|
2707
2695
|
r,
|
|
2708
2696
|
a
|
|
2709
|
-
].map(toIntegerWithTruncation);
|
|
2710
|
-
isValidTime(...i) || throwRangeError(b), createTemporalTime(createTimeRecord(...i), this);
|
|
2697
|
+
].map(toIntegerWithTruncation)), this);
|
|
2711
2698
|
}
|
|
2712
2699
|
static from(e, t = void 0) {
|
|
2713
2700
|
return createTemporalTime(toTemporalTime(e, t));
|
|
@@ -2764,7 +2751,7 @@ var Ce = class {
|
|
|
2764
2751
|
return !compareTimeRecord(getInternalSlotOrThrowForPlainTime(this), toTemporalTime(e));
|
|
2765
2752
|
}
|
|
2766
2753
|
toString(e = void 0) {
|
|
2767
|
-
const t = getInternalSlotOrThrowForPlainTime(this), o = getOptionsObject(e), n = getTemporalFractionalSecondDigitsOption(o), r = getRoundingModeOption(o, ce), a = getTemporalUnitValuedOption(o, "smallestUnit"
|
|
2754
|
+
const t = getInternalSlotOrThrowForPlainTime(this), o = getOptionsObject(e), n = getTemporalFractionalSecondDigitsOption(o), r = getRoundingModeOption(o, ce), a = getTemporalUnitValuedOption(o, "smallestUnit");
|
|
2768
2755
|
validateTemporalUnitValue(a, V), a === m && throwRangeError(invalidField("smallestUnit"));
|
|
2769
2756
|
const i = toSecondsStringPrecisionRecord(a, n);
|
|
2770
2757
|
return timeRecordToString(roundTime(t, i.Me, i.Ee, r), i.ve);
|
|
@@ -2779,32 +2766,32 @@ var Ce = class {
|
|
|
2779
2766
|
throwTypeError(j);
|
|
2780
2767
|
}
|
|
2781
2768
|
};
|
|
2782
|
-
defineStringTag(
|
|
2783
|
-
const
|
|
2784
|
-
`(?<d>${
|
|
2785
|
-
`(?<y>:?)(?<e>${
|
|
2769
|
+
defineStringTag(Ye.prototype, "Temporal.PlainTime"), renameFunction(Ye, "PlainTime");
|
|
2770
|
+
const Ue = "\\d{4}|[-+]\\d{6}", je = "0[1-9]|1[0-2]", We = "0[1-9]|[12]\\d|30|31", Ae = "[01]\\d|2[0-3]", Le = "[0-5]\\d", ke = `(?<a>${Ue})(?<x>-?)(?<b>${je})\\k<x>(?<c>${We})`, ze = optionalChain([
|
|
2771
|
+
`(?<d>${Ae})`,
|
|
2772
|
+
`(?<y>:?)(?<e>${Le})`,
|
|
2786
2773
|
"\\k<y>(?<f>[0-5]\\d|60)",
|
|
2787
2774
|
"[.,](?<g>\\d{1,9})"
|
|
2788
|
-
]), ze = optionalChain([
|
|
2789
|
-
`([+-])(${We})`,
|
|
2790
|
-
`(?<z>:?)(${Ae})`,
|
|
2791
|
-
`\\k<z>(${Ae})`,
|
|
2792
|
-
"[.,](\\d{1,9})"
|
|
2793
2775
|
]), Ve = optionalChain([
|
|
2794
|
-
|
|
2795
|
-
`
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2776
|
+
`([+-])(${Ae})`,
|
|
2777
|
+
`(?<z>:?)(${Le})`,
|
|
2778
|
+
`\\k<z>(${Le})`,
|
|
2779
|
+
"[.,](\\d{1,9})"
|
|
2780
|
+
]), xe = optionalChain([
|
|
2781
|
+
ke,
|
|
2782
|
+
`[ tT]${ze}`,
|
|
2783
|
+
`(?<h>${Ve})`
|
|
2784
|
+
]), He = `(?<l>${Ue})-?(?<m>${je})`, qe = `(?:--)?(?<m>${je})-?(?<n>${We})`, Be = `(?<h>${Ve})|(?<i>[zZ])`, Je = `([+-])(${Ae})(?::?(${Le}))?|${join("[a-zA-Z._][a-zA-Z._+-\\d]*", "\\/")}`, _e = `\\[!?(?<j>${Je})\\]`, Xe = join("[a-zA-Z\\d]+", "-"), Ge = `\\[(!)?([a-z_][a-z\\d_-]*)=(${Xe})\\]`, Ke = `(?<k>(${Ge})*)`, Qe = RegExp(Ge, "g"), et = createRegExp(`${optionalChain([
|
|
2785
|
+
ke,
|
|
2786
|
+
`[ tT]${ze}`,
|
|
2787
|
+
Be
|
|
2788
|
+
])}${_e}${Ke}`), tt = createRegExp(`${xe}(?:${_e})?${Ke}`), ot = createRegExp(`${ke}[ tT]${ze}(?:${Be})(?:${_e})?${Ke}`), nt = createRegExp(`(${ke}[ tT]|[tT]?)${ze}(?<h>${Ve})?(?:${_e})?${Ke}`), rt = createRegExp(`(${xe}|${qe})(?:${_e})?${Ke}`), at = createRegExp(`(${xe}|${He})(?:${_e})?${Ke}`), it = [createRegExp(`${qe}(${_e})?(${Ge})*`), createRegExp(`${He}(${_e})?(${Ge})*`)], ct = createRegExp(Je), st = createRegExp(Xe), lt = createRegExp(Ve), dt = /* @__PURE__ */ new WeakMap();
|
|
2789
|
+
var mt = class {
|
|
2803
2790
|
constructor(e, t, o = "iso8601", n = 1972) {
|
|
2804
2791
|
const r = toIntegerWithTruncation(e), a = toIntegerWithTruncation(t);
|
|
2805
2792
|
validateString(o);
|
|
2806
|
-
const i = canonicalizeCalendar(o)
|
|
2807
|
-
|
|
2793
|
+
const i = canonicalizeCalendar(o);
|
|
2794
|
+
createTemporalMonthDay(createIsoDateRecord(toIntegerWithTruncation(n), r, a), i, this);
|
|
2808
2795
|
}
|
|
2809
2796
|
static from(e, t = void 0) {
|
|
2810
2797
|
return toTemporalMonthDay(e, t);
|
|
@@ -2823,10 +2810,10 @@ var dt = class {
|
|
|
2823
2810
|
with(e, t = void 0) {
|
|
2824
2811
|
const o = getInternalSlotOrThrowForPlainMonthDay(this);
|
|
2825
2812
|
return validatePartialTemporalObject(e), createTemporalMonthDay(calendarMonthDayFromFields(o.Y, calendarMergeFields(o.Y, isoDateToFields(o.Y, o.o, q), prepareCalendarFields(o.Y, e, [
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2813
|
+
wt.t,
|
|
2814
|
+
wt.u,
|
|
2815
|
+
wt.v,
|
|
2816
|
+
wt.T
|
|
2830
2817
|
])), getTemporalOverflowOption(getOptionsObject(t))), o.Y);
|
|
2831
2818
|
}
|
|
2832
2819
|
equals(e) {
|
|
@@ -2847,17 +2834,17 @@ var dt = class {
|
|
|
2847
2834
|
}
|
|
2848
2835
|
toPlainDate(e) {
|
|
2849
2836
|
const t = getInternalSlotOrThrowForPlainMonthDay(this);
|
|
2850
|
-
return isObject(e) || throwTypeError(notObject(e)), createTemporalDate(calendarDateFromFields(t.Y, calendarMergeFields(t.Y, isoDateToFields(t.Y, t.o, q), prepareCalendarFields(t.Y, e, [
|
|
2837
|
+
return isObject(e) || throwTypeError(notObject(e)), createTemporalDate(calendarDateFromFields(t.Y, calendarMergeFields(t.Y, isoDateToFields(t.Y, t.o, q), prepareCalendarFields(t.Y, e, [wt.t], [])), _), t.Y);
|
|
2851
2838
|
}
|
|
2852
2839
|
};
|
|
2853
|
-
defineStringTag(
|
|
2854
|
-
const
|
|
2855
|
-
var
|
|
2840
|
+
defineStringTag(mt.prototype, "Temporal.PlainMonthDay"), renameFunction(mt, "PlainMonthDay");
|
|
2841
|
+
const ut = /* @__PURE__ */ new WeakMap();
|
|
2842
|
+
var Tt = class {
|
|
2856
2843
|
constructor(e, t, o = "iso8601", n = 1) {
|
|
2857
2844
|
const r = toIntegerWithTruncation(e), a = toIntegerWithTruncation(t);
|
|
2858
2845
|
validateString(o);
|
|
2859
|
-
const i = canonicalizeCalendar(o)
|
|
2860
|
-
|
|
2846
|
+
const i = canonicalizeCalendar(o);
|
|
2847
|
+
createTemporalYearMonth(createIsoDateRecord(r, a, toIntegerWithTruncation(n)), i, this);
|
|
2861
2848
|
}
|
|
2862
2849
|
static from(e, t = void 0) {
|
|
2863
2850
|
return toTemporalYearMonth(e, t);
|
|
@@ -2899,9 +2886,9 @@ var ut = class {
|
|
|
2899
2886
|
const o = getInternalSlotOrThrowForPlainYearMonth(this);
|
|
2900
2887
|
validatePartialTemporalObject(e);
|
|
2901
2888
|
const n = calendarMergeFields(o.Y, isoDateToFields(o.Y, o.o, H), prepareCalendarFields(o.Y, e, [
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2889
|
+
wt.t,
|
|
2890
|
+
wt.u,
|
|
2891
|
+
wt.v
|
|
2905
2892
|
]));
|
|
2906
2893
|
return createTemporalYearMonth(calendarYearMonthFromFields(o.Y, n, getTemporalOverflowOption(getOptionsObject(t))), o.Y);
|
|
2907
2894
|
}
|
|
@@ -2935,17 +2922,17 @@ var ut = class {
|
|
|
2935
2922
|
}
|
|
2936
2923
|
toPlainDate(e) {
|
|
2937
2924
|
const t = getInternalSlotOrThrowForPlainYearMonth(this);
|
|
2938
|
-
return isObject(e) || throwTypeError(notObject(e)), createTemporalDate(calendarDateFromFields(t.Y, calendarMergeFields(t.Y, isoDateToFields(t.Y, t.o, H), prepareCalendarFields(t.Y, e, [
|
|
2925
|
+
return isObject(e) || throwTypeError(notObject(e)), createTemporalDate(calendarDateFromFields(t.Y, calendarMergeFields(t.Y, isoDateToFields(t.Y, t.o, H), prepareCalendarFields(t.Y, e, [wt.T], [])), _), t.Y);
|
|
2939
2926
|
}
|
|
2940
2927
|
};
|
|
2941
|
-
defineStringTag(
|
|
2942
|
-
const
|
|
2943
|
-
var
|
|
2928
|
+
defineStringTag(Tt.prototype, "Temporal.PlainYearMonth"), renameFunction(Tt, "PlainYearMonth");
|
|
2929
|
+
const Dt = /* @__PURE__ */ new WeakMap();
|
|
2930
|
+
var ht = class {
|
|
2944
2931
|
constructor(e, t, o, n = "iso8601") {
|
|
2945
2932
|
const r = toIntegerWithTruncation(e), a = toIntegerWithTruncation(t), i = toIntegerWithTruncation(o);
|
|
2946
2933
|
validateString(n);
|
|
2947
2934
|
const c = canonicalizeCalendar(n);
|
|
2948
|
-
|
|
2935
|
+
createTemporalDate(createIsoDateRecord(r, a, i), c, this);
|
|
2949
2936
|
}
|
|
2950
2937
|
static from(e, t = void 0) {
|
|
2951
2938
|
return toTemporalDate(e, t);
|
|
@@ -3019,10 +3006,10 @@ var Dt = class {
|
|
|
3019
3006
|
const o = getInternalSlotOrThrowForPlainDate(this);
|
|
3020
3007
|
validatePartialTemporalObject(e);
|
|
3021
3008
|
const n = calendarMergeFields(o.Y, isoDateToFields(o.Y, o.o, z), prepareCalendarFields(o.Y, e, [
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3009
|
+
wt.t,
|
|
3010
|
+
wt.u,
|
|
3011
|
+
wt.v,
|
|
3012
|
+
wt.T
|
|
3026
3013
|
])), r = getTemporalOverflowOption(getOptionsObject(t));
|
|
3027
3014
|
return createTemporalDate(calendarDateFromFields(o.Y, n, r), o.Y);
|
|
3028
3015
|
}
|
|
@@ -3065,27 +3052,27 @@ var Dt = class {
|
|
|
3065
3052
|
throwTypeError(j);
|
|
3066
3053
|
}
|
|
3067
3054
|
};
|
|
3068
|
-
defineStringTag(
|
|
3069
|
-
const
|
|
3055
|
+
defineStringTag(ht.prototype, "Temporal.PlainDate"), renameFunction(ht, "PlainDate");
|
|
3056
|
+
const pt = createNullPrototypeObject(), gt = {
|
|
3070
3057
|
chinese: createLruCache(2e3),
|
|
3071
3058
|
dangi: createLruCache(2e3)
|
|
3072
|
-
},
|
|
3059
|
+
}, ft = {
|
|
3073
3060
|
chinese: createLruCache(1e4),
|
|
3074
3061
|
dangi: createLruCache(1e4)
|
|
3075
|
-
},
|
|
3076
|
-
iso8601:
|
|
3062
|
+
}, It = createLruCache(5e3), Ot = createLruCache(1e3), Ft = /* @__PURE__ */ new Map([["ah", 1], ["bh", !1]]), St = /* @__PURE__ */ new Map(), yt = createNullPrototypeObject({
|
|
3063
|
+
iso8601: St,
|
|
3077
3064
|
buddhist: /* @__PURE__ */ new Map([["be", 1]]),
|
|
3078
|
-
chinese:
|
|
3065
|
+
chinese: St,
|
|
3079
3066
|
coptic: /* @__PURE__ */ new Map([["am", 1]]),
|
|
3080
|
-
dangi:
|
|
3067
|
+
dangi: St,
|
|
3081
3068
|
ethioaa: /* @__PURE__ */ new Map([["aa", 1]]),
|
|
3082
3069
|
ethiopic: /* @__PURE__ */ new Map([["am", 1], ["aa", -5499]]),
|
|
3083
3070
|
gregory: /* @__PURE__ */ new Map([["ce", 1], ["bce", !1]]),
|
|
3084
3071
|
hebrew: /* @__PURE__ */ new Map([["am", 1]]),
|
|
3085
3072
|
indian: /* @__PURE__ */ new Map([["shaka", 1]]),
|
|
3086
|
-
"islamic-civil":
|
|
3087
|
-
"islamic-tbla":
|
|
3088
|
-
"islamic-umalqura":
|
|
3073
|
+
"islamic-civil": Ft,
|
|
3074
|
+
"islamic-tbla": Ft,
|
|
3075
|
+
"islamic-umalqura": Ft,
|
|
3089
3076
|
japanese: /* @__PURE__ */ new Map([
|
|
3090
3077
|
["reiwa", 2019],
|
|
3091
3078
|
["heisei", 1989],
|
|
@@ -3097,7 +3084,7 @@ const ht = createNullPrototypeObject(), pt = {
|
|
|
3097
3084
|
]),
|
|
3098
3085
|
persian: /* @__PURE__ */ new Map([["ap", 1]]),
|
|
3099
3086
|
roc: /* @__PURE__ */ new Map([["roc", 1], ["broc", !1]])
|
|
3100
|
-
}),
|
|
3087
|
+
}), wt = {
|
|
3101
3088
|
ne: "era",
|
|
3102
3089
|
re: "eraYear",
|
|
3103
3090
|
t: "year",
|
|
@@ -3112,41 +3099,41 @@ const ht = createNullPrototypeObject(), pt = {
|
|
|
3112
3099
|
$: "nanosecond",
|
|
3113
3100
|
M: "offset",
|
|
3114
3101
|
P: "timeZone"
|
|
3115
|
-
},
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
],
|
|
3131
|
-
[
|
|
3132
|
-
[
|
|
3133
|
-
[
|
|
3134
|
-
[
|
|
3135
|
-
[
|
|
3136
|
-
[
|
|
3137
|
-
[
|
|
3138
|
-
[
|
|
3139
|
-
[
|
|
3140
|
-
[
|
|
3141
|
-
[
|
|
3142
|
-
[
|
|
3143
|
-
[
|
|
3102
|
+
}, vt = [
|
|
3103
|
+
wt.ne,
|
|
3104
|
+
wt.re,
|
|
3105
|
+
wt.t,
|
|
3106
|
+
wt.u,
|
|
3107
|
+
wt.v,
|
|
3108
|
+
wt.T,
|
|
3109
|
+
wt.D,
|
|
3110
|
+
wt.I,
|
|
3111
|
+
wt.O,
|
|
3112
|
+
wt.F,
|
|
3113
|
+
wt.S,
|
|
3114
|
+
wt.$,
|
|
3115
|
+
wt.M,
|
|
3116
|
+
wt.P
|
|
3117
|
+
], Et = {
|
|
3118
|
+
[wt.ne]: [toString],
|
|
3119
|
+
[wt.re]: [toIntegerWithTruncation],
|
|
3120
|
+
[wt.t]: [toIntegerWithTruncation],
|
|
3121
|
+
[wt.u]: [toPositiveIntegerWithTruncation],
|
|
3122
|
+
[wt.v]: [(e) => createMonthCode(...parseMonthCode(e))],
|
|
3123
|
+
[wt.T]: [toPositiveIntegerWithTruncation],
|
|
3124
|
+
[wt.D]: [toIntegerWithTruncation, 0],
|
|
3125
|
+
[wt.I]: [toIntegerWithTruncation, 0],
|
|
3126
|
+
[wt.O]: [toIntegerWithTruncation, 0],
|
|
3127
|
+
[wt.F]: [toIntegerWithTruncation, 0],
|
|
3128
|
+
[wt.S]: [toIntegerWithTruncation, 0],
|
|
3129
|
+
[wt.$]: [toIntegerWithTruncation, 0],
|
|
3130
|
+
[wt.M]: [(e) => {
|
|
3144
3131
|
const t = toPrimitive(e);
|
|
3145
3132
|
return validateString(t), parseDateTimeUtcOffset(t), t;
|
|
3146
3133
|
}],
|
|
3147
|
-
[
|
|
3148
|
-
},
|
|
3149
|
-
var
|
|
3134
|
+
[wt.P]: [toTemporalTimeZoneIdentifier]
|
|
3135
|
+
}, Mt = /* @__PURE__ */ new WeakMap(), bt = signTimeDuration;
|
|
3136
|
+
var Pt = class {
|
|
3150
3137
|
constructor(e = 0, t = 0, o = 0, n = 0, r = 0, a = 0, i = 0, c = 0, s = 0, l = 0) {
|
|
3151
3138
|
createTemporalDuration(createTemporalDurationSlot([
|
|
3152
3139
|
e,
|
|
@@ -3225,21 +3212,19 @@ var Mt = class {
|
|
|
3225
3212
|
}
|
|
3226
3213
|
round(e) {
|
|
3227
3214
|
const t = getInternalSlotOrThrowForDuration(this), o = getRoundToOptionsObject(e);
|
|
3228
|
-
let n = getTemporalUnitValuedOption(o, "largestUnit"
|
|
3215
|
+
let n = getTemporalUnitValuedOption(o, "largestUnit");
|
|
3229
3216
|
const r = getTemporalRelativeToOption(o), a = getRoundingIncrementOption(o), i = getRoundingModeOption(o, de);
|
|
3230
|
-
let c = getTemporalUnitValuedOption(o, "smallestUnit"
|
|
3217
|
+
let c = getTemporalUnitValuedOption(o, "smallestUnit");
|
|
3231
3218
|
validateTemporalUnitValue(c, x);
|
|
3232
|
-
const s = void 0
|
|
3233
|
-
c ??= D;
|
|
3234
|
-
const l = defaultTemporalLargestUnit(t), u = largerOfTwoTemporalUnits(l, c), T = void 0 !== n;
|
|
3235
|
-
if (void 0 !== n && "auto" !== n || (n = u), (!s && !T || n > c) && throwRangeError($), isDateUnit(c) || validateTemporalRoundingIncrement(a, maximumTemporalDurationRoundingIncrement(c), !1), a > 1 && n !== c && isDateUnit(c) && throwRangeError($), r.be) return createTemporalDuration(temporalDurationFromInternal(differenceZonedDateTimeWithRounding(r.be, createZonedDateTimeSlot(addZonedDateTime(r.be, toInternalDurationRecord(t), _), r.be.P, r.be.Y), n, a, c, i), isDateUnit(n) ? m : n));
|
|
3219
|
+
const s = defaultTemporalLargestUnit(t), l = void 0 === c && void 0 === n;
|
|
3220
|
+
if (c ??= D, void 0 !== n && "auto" !== n || (n = largerOfTwoTemporalUnits(s, c)), (l || n > c) && throwRangeError($), isDateUnit(c) || validateTemporalRoundingIncrement(a, maximumTemporalDurationRoundingIncrement(c), !1), a > 1 && n !== c && isDateUnit(c) && throwRangeError($), r.be) return createTemporalDuration(temporalDurationFromInternal(differenceZonedDateTimeWithRounding(r.be, createZonedDateTimeSlot(addZonedDateTime(r.be, toInternalDurationRecord(t), _), r.be.P, r.be.Y), n, a, c, i), isDateUnit(n) ? m : n));
|
|
3236
3221
|
if (r.Pe) {
|
|
3237
3222
|
const e = toInternalDurationRecordWith24HourDays(t), o = addTime(midnightTimeRecord(), e.p);
|
|
3238
3223
|
return createTemporalDuration(temporalDurationFromInternal(differencePlainDateTimeWithRounding(combineIsoDateAndTimeRecord(r.Pe.o, midnightTimeRecord()), combineIsoDateAndTimeRecord(calendarDateAdd(r.Pe.Y, r.Pe.o, adjustDateDurationRecord(e.A, o.X), _), o), r.Pe.Y, n, a, c, i), n));
|
|
3239
3224
|
}
|
|
3240
|
-
(isCalendarUnit(
|
|
3241
|
-
const
|
|
3242
|
-
return createTemporalDuration(temporalDurationFromInternal(c === d ? combineDateAndTimeDuration(createDateDurationRecord(0, 0, 0, roundTimeDurationByDays(
|
|
3225
|
+
(isCalendarUnit(s) || isCalendarUnit(n)) && throwRangeError(missingField("relativeTo"));
|
|
3226
|
+
const u = toInternalDurationRecordWith24HourDays(t);
|
|
3227
|
+
return createTemporalDuration(temporalDurationFromInternal(c === d ? combineDateAndTimeDuration(createDateDurationRecord(0, 0, 0, roundTimeDurationByDays(u.p, a, i)[0]), ve) : combineDateAndTimeDuration(zeroDateDuration(), roundTimeDuration(u.p, a, c, i)), n));
|
|
3243
3228
|
}
|
|
3244
3229
|
total(e) {
|
|
3245
3230
|
const t = getInternalSlotOrThrowForDuration(this);
|
|
@@ -3253,7 +3238,7 @@ var Mt = class {
|
|
|
3253
3238
|
return (isCalendarUnit(defaultTemporalLargestUnit(t)) || isCalendarUnit(r)) && throwRangeError(missingField("relativeTo")), totalTimeDuration(toInternalDurationRecordWith24HourDays(t).p, r);
|
|
3254
3239
|
}
|
|
3255
3240
|
toString(e = void 0) {
|
|
3256
|
-
const t = getInternalSlotOrThrowForDuration(this), o = getOptionsObject(e), n = getTemporalFractionalSecondDigitsOption(o), r = getRoundingModeOption(o, ce), a = getTemporalUnitValuedOption(o, "smallestUnit"
|
|
3241
|
+
const t = getInternalSlotOrThrowForDuration(this), o = getOptionsObject(e), n = getTemporalFractionalSecondDigitsOption(o), r = getRoundingModeOption(o, ce), a = getTemporalUnitValuedOption(o, "smallestUnit");
|
|
3257
3242
|
validateTemporalUnitValue(a, V), a !== m && a !== u || throwRangeError(disallowedUnit(a));
|
|
3258
3243
|
const i = toSecondsStringPrecisionRecord(a, n);
|
|
3259
3244
|
if (i.Ee === D && 1 === i.Me) return temporalDurationToString(t, i.ve);
|
|
@@ -3270,8 +3255,8 @@ var Mt = class {
|
|
|
3270
3255
|
throwTypeError(j);
|
|
3271
3256
|
}
|
|
3272
3257
|
};
|
|
3273
|
-
defineStringTag(
|
|
3274
|
-
const
|
|
3258
|
+
defineStringTag(Pt.prototype, "Temporal.Duration"), renameFunction(Pt, "Duration");
|
|
3259
|
+
const Rt = {
|
|
3275
3260
|
[re]: Math.ceil,
|
|
3276
3261
|
[ae]: Math.floor,
|
|
3277
3262
|
[ie]: roundExpand,
|
|
@@ -3281,7 +3266,7 @@ const bt = {
|
|
|
3281
3266
|
[de]: (e) => (isIntegerAndHalf(e) ? roundExpand(e) : Math.round(e)) + 0,
|
|
3282
3267
|
[me]: (e) => (isIntegerAndHalf(e) ? Math.trunc(e) : Math.round(e)) + 0,
|
|
3283
3268
|
[ue]: roundHalfEven
|
|
3284
|
-
},
|
|
3269
|
+
}, Nt = {
|
|
3285
3270
|
[re]: Math.ceil,
|
|
3286
3271
|
[ae]: Math.floor,
|
|
3287
3272
|
[ie]: Math.ceil,
|
|
@@ -3291,13 +3276,13 @@ const bt = {
|
|
|
3291
3276
|
[de]: roundHalfCeil,
|
|
3292
3277
|
[me]: roundHalfFloor,
|
|
3293
3278
|
[ue]: roundHalfEven
|
|
3294
|
-
},
|
|
3279
|
+
}, Zt = globalThis.Intl.DateTimeFormat, $t = /* @__PURE__ */ new WeakMap(), Ct = [
|
|
3295
3280
|
"year",
|
|
3296
3281
|
"month",
|
|
3297
3282
|
"day",
|
|
3298
3283
|
"weekday",
|
|
3299
3284
|
"dateStyle"
|
|
3300
|
-
],
|
|
3285
|
+
], Yt = [
|
|
3301
3286
|
"hour",
|
|
3302
3287
|
"minute",
|
|
3303
3288
|
"second",
|
|
@@ -3305,16 +3290,14 @@ const bt = {
|
|
|
3305
3290
|
"dayPeriod",
|
|
3306
3291
|
"timeStyle"
|
|
3307
3292
|
];
|
|
3308
|
-
var
|
|
3309
|
-
Le(e) {
|
|
3310
|
-
return formatDateTime(getInternalSlotOrThrowForDateTimeFormat(this), e);
|
|
3311
|
-
}
|
|
3312
|
-
}, Yt = class {
|
|
3293
|
+
var Ut = class {
|
|
3313
3294
|
constructor(e, t) {
|
|
3314
|
-
|
|
3295
|
+
$t.set(this, createDateTimeFormat(e, t, x, void 0));
|
|
3315
3296
|
}
|
|
3316
3297
|
get format() {
|
|
3317
|
-
return Object.defineProperty(getInternalSlotOrThrowForDateTimeFormat(this).
|
|
3298
|
+
return Object.defineProperty(getInternalSlotOrThrowForDateTimeFormat(this).Le ||= { ze(e) {
|
|
3299
|
+
return formatDateTime(getInternalSlotOrThrowForDateTimeFormat(this), e);
|
|
3300
|
+
} }.ze.bind(this), "name", { value: "" });
|
|
3318
3301
|
}
|
|
3319
3302
|
formatToParts(e) {
|
|
3320
3303
|
return ((e, t) => {
|
|
@@ -3340,12 +3323,12 @@ var Ct = class {
|
|
|
3340
3323
|
return getInternalSlotOrThrowForDateTimeFormat(this).Re.resolvedOptions();
|
|
3341
3324
|
}
|
|
3342
3325
|
};
|
|
3343
|
-
const
|
|
3344
|
-
|
|
3345
|
-
for (const e of ["formatRange", "formatRangeToParts"])
|
|
3346
|
-
Object.defineProperties(DateTimeFormat,
|
|
3347
|
-
const
|
|
3348
|
-
var
|
|
3326
|
+
const jt = Object.getOwnPropertyDescriptors(Zt), Wt = Ut.prototype;
|
|
3327
|
+
jt.prototype.value = Wt;
|
|
3328
|
+
for (const e of ["formatRange", "formatRangeToParts"]) Zt.prototype[e] || delete Wt[e];
|
|
3329
|
+
Object.defineProperties(DateTimeFormat, jt), DateTimeFormat.prototype.constructor = DateTimeFormat, defineStringTag(DateTimeFormat.prototype, "Intl.DateTimeFormat");
|
|
3330
|
+
const At = /* @__PURE__ */ new WeakMap();
|
|
3331
|
+
var Lt = class {
|
|
3349
3332
|
constructor(e) {
|
|
3350
3333
|
createTemporalInstant(validateEpochNanoseconds(createEpochNanosecondsFromBigInt(toBigInt(e))), this);
|
|
3351
3334
|
}
|
|
@@ -3387,7 +3370,7 @@ var At = class {
|
|
|
3387
3370
|
return !compareEpochNanoseconds(getInternalSlotOrThrowForInstant(this).U, getInternalSlotOrThrowForInstant(toTemporalInstant$1(e)).U);
|
|
3388
3371
|
}
|
|
3389
3372
|
toString(e = void 0) {
|
|
3390
|
-
const t = getInternalSlotOrThrowForInstant(this), o = getOptionsObject(e), n = getTemporalFractionalSecondDigitsOption(o), r = getRoundingModeOption(o, ce), a = getTemporalUnitValuedOption(o, "smallestUnit"
|
|
3373
|
+
const t = getInternalSlotOrThrowForInstant(this), o = getOptionsObject(e), n = getTemporalFractionalSecondDigitsOption(o), r = getRoundingModeOption(o, ce), a = getTemporalUnitValuedOption(o, "smallestUnit"), i = o.timeZone;
|
|
3391
3374
|
validateTemporalUnitValue(a, V), a === m && throwRangeError(invalidField("smallestUnit"));
|
|
3392
3375
|
const c = mapUnlessUndefined(i, toTemporalTimeZoneIdentifier), s = toSecondsStringPrecisionRecord(a, n);
|
|
3393
3376
|
return temporalInstantToString(roundTemporalInstant(t.U, s.Me, s.Ee, r), c, s.ve);
|
|
@@ -3405,16 +3388,14 @@ var At = class {
|
|
|
3405
3388
|
return createTemporalZonedDateTime(getInternalSlotOrThrowForInstant(this).U, toTemporalTimeZoneIdentifier(e), "iso8601");
|
|
3406
3389
|
}
|
|
3407
3390
|
};
|
|
3408
|
-
defineStringTag(
|
|
3409
|
-
const
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
let Vt, xt = 0, Ht = -Infinity;
|
|
3417
|
-
const qt = {
|
|
3391
|
+
defineStringTag(Lt.prototype, "Temporal.Instant"), renameFunction(Lt, "Instant");
|
|
3392
|
+
const kt = { toTemporalInstant() {
|
|
3393
|
+
const e = Date.prototype.valueOf.call(this);
|
|
3394
|
+
return e != e && throwRangeError("invalid date"), createTemporalInstant(createEpochNanosecondsFromEpochMilliseconds(e));
|
|
3395
|
+
} }.toTemporalInstant, zt = {}, Vt = Object.getOwnPropertyDescriptors(globalThis.Intl);
|
|
3396
|
+
Vt.DateTimeFormat.value = DateTimeFormat, Vt.DurationFormat && (Vt.DurationFormat.value = k), Object.defineProperties(zt, Vt);
|
|
3397
|
+
let xt, Ht = 0, qt = -1 / 0;
|
|
3398
|
+
const Bt = {
|
|
3418
3399
|
timeZoneId: () => systemTimeZoneIdentifier(),
|
|
3419
3400
|
instant: () => createTemporalInstant(systemUtcEpochNanoseconds()),
|
|
3420
3401
|
plainDateTimeISO: (e = void 0) => createTemporalDateTime(systemDateTime(e), "iso8601"),
|
|
@@ -3422,17 +3403,17 @@ const qt = {
|
|
|
3422
3403
|
plainDateISO: (e = void 0) => createTemporalDate(systemDateTime(e).o, "iso8601"),
|
|
3423
3404
|
plainTimeISO: (e = void 0) => createTemporalTime(systemDateTime(e).p)
|
|
3424
3405
|
};
|
|
3425
|
-
defineStringTag(
|
|
3426
|
-
const
|
|
3427
|
-
Instant:
|
|
3428
|
-
PlainDateTime:
|
|
3429
|
-
PlainDate:
|
|
3430
|
-
PlainTime:
|
|
3431
|
-
PlainYearMonth:
|
|
3432
|
-
PlainMonthDay:
|
|
3433
|
-
Duration:
|
|
3406
|
+
defineStringTag(Bt, "Temporal.Now"), makePropertiesNonEnumerable(Bt);
|
|
3407
|
+
const Jt = {
|
|
3408
|
+
Instant: Lt,
|
|
3409
|
+
PlainDateTime: $e,
|
|
3410
|
+
PlainDate: ht,
|
|
3411
|
+
PlainTime: Ye,
|
|
3412
|
+
PlainYearMonth: Tt,
|
|
3413
|
+
PlainMonthDay: mt,
|
|
3414
|
+
Duration: Pt,
|
|
3434
3415
|
ZonedDateTime: be,
|
|
3435
|
-
Now:
|
|
3416
|
+
Now: Bt
|
|
3436
3417
|
};
|
|
3437
|
-
defineStringTag(
|
|
3438
|
-
export { defineNonEnumerableProperty as a,
|
|
3418
|
+
defineStringTag(Jt, "Temporal"), makePropertiesNonEnumerable(Jt);
|
|
3419
|
+
export { defineNonEnumerableProperty as a, kt as i, setSystemTimeZoneIdCacheTtl as n, zt as r, Jt as t };
|