temporal-polyfill-lite 0.4.3 → 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 +35 -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-BU-7y4gA.js → src-CLej0F_-.js} +220 -232
- package/dist/global.js +1 -1
- package/dist/index.js +1 -2
- package/dist/shim.js +1 -1
- package/dist/{src-sQY-gZ2P.js → src-DYpWRzuf.js} +52 -63
- package/package.json +1 -1
package/dist/global.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { install as s } from "./shim.js";
|
|
2
|
-
s(!
|
|
2
|
+
s(!1);
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { s as Intl, r as Temporal, a as toTemporalInstant };
|
|
1
|
+
export { r as Intl, t as Temporal, i as toTemporalInstant } from "./src-DYpWRzuf.js";
|
package/dist/shim.js
CHANGED
|
@@ -4,5 +4,5 @@ function install(s) {
|
|
|
4
4
|
function setSystemTimeZoneIdCacheTtl(t) {
|
|
5
5
|
s(t);
|
|
6
6
|
}
|
|
7
|
-
import { a as t, i as a, n as s, r as e, t as l } from "./src-
|
|
7
|
+
import { a as t, i as a, n as s, r as e, t as l } from "./src-DYpWRzuf.js";
|
|
8
8
|
export { install, setSystemTimeZoneIdCacheTtl };
|
|
@@ -443,10 +443,8 @@ function getNamedTimeZoneEpochCandidates(e, t) {
|
|
|
443
443
|
return n === r ? [a] : [a, i].sort(compareEpochNanoseconds);
|
|
444
444
|
}
|
|
445
445
|
function getIsoDateTimeFromOffsetNanoseconds(e, t) {
|
|
446
|
-
return ((e)
|
|
447
|
-
|
|
448
|
-
return combineIsoDateAndTimeRecord(epochDaysToIsoDate(t[0]), balanceTime(0, 0, 0, 0, 0, t[1]));
|
|
449
|
-
})(addNanosecondsToEpochSeconds(e, t));
|
|
446
|
+
return combineIsoDateAndTimeRecord(epochDaysToIsoDate((o = addNanosecondsToEpochSeconds(e, t))[0]), balanceTime(0, 0, 0, 0, 0, o[1]));
|
|
447
|
+
var o;
|
|
450
448
|
}
|
|
451
449
|
function combineIsoDateAndTimeRecord(e, t) {
|
|
452
450
|
return {
|
|
@@ -609,26 +607,22 @@ function createTemporalTime(e, t = Object.create($e.prototype)) {
|
|
|
609
607
|
return je.set(t, e), t;
|
|
610
608
|
}
|
|
611
609
|
function toTemporalTimeRecord(e, t = !1) {
|
|
612
|
-
|
|
613
|
-
const n = [
|
|
610
|
+
const o = [
|
|
614
611
|
ht.D,
|
|
615
612
|
ht.S,
|
|
616
613
|
ht.F,
|
|
617
614
|
ht.I,
|
|
618
615
|
ht.v,
|
|
619
616
|
ht.O
|
|
620
|
-
].map((
|
|
621
|
-
|
|
622
|
-
return void 0 !== r ? (o = !0, toIntegerWithTruncation(r)) : t ? void 0 : 0;
|
|
623
|
-
});
|
|
624
|
-
return o || throwTypeError(C), [
|
|
617
|
+
].map((t) => mapUnlessUndefined(e[t], toIntegerWithTruncation));
|
|
618
|
+
return o.some((e) => void 0 !== e) || throwTypeError(C), [
|
|
625
619
|
0,
|
|
626
620
|
3,
|
|
627
621
|
5,
|
|
628
622
|
2,
|
|
629
623
|
1,
|
|
630
624
|
4
|
|
631
|
-
].map((e) =>
|
|
625
|
+
].map((e) => t ? o[e] : o[e] || 0);
|
|
632
626
|
}
|
|
633
627
|
function timeRecordToString(e, t) {
|
|
634
628
|
return formatTimeString(e.D, e.I, e.O, 1e6 * e.F + 1e3 * e.S + e.v, t);
|
|
@@ -637,8 +631,8 @@ function compareTimeRecord(e, t) {
|
|
|
637
631
|
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.v, t.v);
|
|
638
632
|
}
|
|
639
633
|
function addTime(e, t) {
|
|
640
|
-
const o =
|
|
641
|
-
return
|
|
634
|
+
const o = balanceTime(e.D, e.I, e.O, e.F, e.S, e.v + t[1]);
|
|
635
|
+
return o.X += t[0], o;
|
|
642
636
|
}
|
|
643
637
|
function roundTime(e, n, r, a) {
|
|
644
638
|
const i = nanosecondsForTimeUnit(clamp(r - 1, 3, 8)), l = e.D * o + e.I * t + 1e9 * e.O + 1e6 * e.F + 1e3 * e.S + e.v;
|
|
@@ -1261,7 +1255,7 @@ function nudgeToCalendarUnit(e, t, o, n, r, a, i, l, c, s) {
|
|
|
1261
1255
|
compareEpochNanoseconds(m.he, n) * compareEpochNanoseconds(m.ge, n) > 0 && (m = computeNudgeWindow(e, t, o, r, a, 0, l, c, !0), d = !0);
|
|
1262
1256
|
const u = differenceEpochNanoseconds(m.he, n), T = differenceEpochNanoseconds(m.he, m.ge);
|
|
1263
1257
|
let D = m.fe, p = m.he;
|
|
1264
|
-
return roundNumberToIncrement(m.De + ((e, t, o) => signTimeDuration(e) ? Pe(e, t) ? Pe(addTimeDuration(e, e), t) * o / 5 + .5 : 1 : 0)(u, T, e) * l * e, l, s) === m.pe && (d = !0, D = m.Ie, p = m.ge), {
|
|
1258
|
+
return roundNumberToIncrement(m.De + ((e, t, o) => signTimeDuration(e) ? Pe(e, t) ? Pe(addTimeDuration(e, e), t) * o / 5 + .5 : 1 : 0)(u, T, e) * l * e, l, s) === m.pe && (d = !0, D = m.Ie, p = m.ge), signTimeDuration(T) || throwRangeError("internal error"), {
|
|
1265
1259
|
Oe: {
|
|
1266
1260
|
Fe: combineDateAndTimeDuration(D, ye),
|
|
1267
1261
|
Se: p,
|
|
@@ -1446,10 +1440,10 @@ function getTemporalRelativeToOption(e) {
|
|
|
1446
1440
|
if (void 0 === t) return createNullPrototypeObject();
|
|
1447
1441
|
let o, n, r, a, i, l = !0, c = te;
|
|
1448
1442
|
if (isObject(t)) {
|
|
1449
|
-
if (isZonedDateTime(t)) return createNullPrototypeObject({
|
|
1450
|
-
if (isPlainDate(t)) return createNullPrototypeObject({
|
|
1443
|
+
if (isZonedDateTime(t)) return createNullPrototypeObject({ Re: getInternalSlotOrThrowForZonedDateTime(t) });
|
|
1444
|
+
if (isPlainDate(t)) return createNullPrototypeObject({ be: getInternalSlotOrThrowForPlainDate(t) });
|
|
1451
1445
|
const e = getInternalSlotForPlainDateTime(t);
|
|
1452
|
-
if (e) return createNullPrototypeObject({
|
|
1446
|
+
if (e) return createNullPrototypeObject({ be: getInternalSlotOrThrowForPlainDate(createTemporalDate(e.K.o, e.U)) });
|
|
1453
1447
|
r = getTemporalCalendarIdentifierWithIsoDefault(t);
|
|
1454
1448
|
const l = prepareCalendarFields(r, t, [
|
|
1455
1449
|
ht.t,
|
|
@@ -1471,7 +1465,7 @@ function getTemporalRelativeToOption(e) {
|
|
|
1471
1465
|
const e = parseIsoDateTime(t, [et, tt]);
|
|
1472
1466
|
n = e.Z.N, e.Z.$ ? (o = toTemporalTimeZoneIdentifier(e.Z.$), c = e.Z.M ? oe : n ? te : ne, l = void 0 !== n && hasUtcOffsetSubMinuteParts(n)) : o = void 0, r = canonicalizeCalendar(e.U || "iso8601"), a = createIsoDateRecord(e.t, e.u, e.T), i = e.p;
|
|
1473
1467
|
}
|
|
1474
|
-
return createNullPrototypeObject(o ? {
|
|
1468
|
+
return createNullPrototypeObject(o ? { Re: getInternalSlotOrThrowForZonedDateTime(createTemporalZonedDateTime(interpretISODateTimeOffset(a, i, c, c === te ? parseDateTimeUtcOffset(n) : 0, o, G, ee, l), o, r)) } : { be: getInternalSlotOrThrowForPlainDate(createTemporalDate(a, r)) });
|
|
1475
1469
|
}
|
|
1476
1470
|
function largerOfTwoTemporalUnits(e, t) {
|
|
1477
1471
|
return e < t ? e : t;
|
|
@@ -1658,14 +1652,14 @@ function handleDateTimeValue(e, t) {
|
|
|
1658
1652
|
return isPlainTime(t) ? [e.Me ||= new vt(e.Ne, amendOptionsForPlainTime(e.$e)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(createIsoDateRecord(1970, 1, 1), getInternalSlotOrThrowForPlainTime(t))))] : o ? (o.U !== e.$e.calendar && "iso8601" !== o.U && throwRangeError(M), [e.Ue ||= new vt(e.Ne, amendOptionsForPlainDate(e.$e)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(o.o, midnightTimeRecord())))]) : n ? (n.U !== e.$e.calendar && "iso8601" !== n.U && throwRangeError(M), [e.je ||= new vt(e.Ne, amendOptionsForPlainDateTime(e.$e)), epochMilliseconds(getUtcEpochNanoseconds(n.K))]) : r ? (r.U !== e.$e.calendar && throwRangeError(M), [e.Ce ||= new vt(e.Ne, amendOptionsForPlainYearMonth(e.$e)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(r.o, midnightTimeRecord())))]) : a ? (a.U !== e.$e.calendar && throwRangeError(M), [e.Ye ||= new vt(e.Ne, amendOptionsForPlainMonthDay(e.$e)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(a.o, midnightTimeRecord())))]) : isInstant(t) ? [e.We ||= new vt(e.Ne, amendOptionsForInstant(e.$e)), epochMilliseconds(getInternalSlotOrThrowForInstant(t).Y)] : (isZonedDateTime(t) && throwTypeError($), [e.Ze, t]);
|
|
1659
1653
|
}
|
|
1660
1654
|
function DateTimeFormat(e, t) {
|
|
1661
|
-
return new
|
|
1655
|
+
return new bt(e, t);
|
|
1662
1656
|
}
|
|
1663
|
-
function createTemporalInstant(e, t = Object.create(
|
|
1664
|
-
return
|
|
1657
|
+
function createTemporalInstant(e, t = Object.create(Mt.prototype)) {
|
|
1658
|
+
return Nt.set(t, { Y: e }), t;
|
|
1665
1659
|
}
|
|
1666
1660
|
function toTemporalInstant$1(e) {
|
|
1667
1661
|
if (isObject(e)) {
|
|
1668
|
-
const o = (t = e,
|
|
1662
|
+
const o = (t = e, Nt.get(t) || getInternalSlotForZonedDateTime(e));
|
|
1669
1663
|
if (o) return createTemporalInstant(o.Y);
|
|
1670
1664
|
e = toPrimitive(e);
|
|
1671
1665
|
}
|
|
@@ -1701,19 +1695,19 @@ function validateEpochNanoseconds(e) {
|
|
|
1701
1695
|
return ((e) => compareEpochNanoseconds(we, e) * compareEpochNanoseconds(ve, e) <= 0)(e) || throwRangeError(R), e;
|
|
1702
1696
|
}
|
|
1703
1697
|
function getInternalSlotOrThrowForInstant(e) {
|
|
1704
|
-
return getInternalSlotOrThrow(
|
|
1698
|
+
return getInternalSlotOrThrow(Nt, e);
|
|
1705
1699
|
}
|
|
1706
1700
|
function isInstant(e) {
|
|
1707
|
-
return
|
|
1701
|
+
return Nt.has(e);
|
|
1708
1702
|
}
|
|
1709
1703
|
function clampEpochNanoseconds(e) {
|
|
1710
1704
|
return compareEpochNanoseconds(e, ve) > 0 ? ve : compareEpochNanoseconds(e, we) < 0 ? we : e;
|
|
1711
1705
|
}
|
|
1712
1706
|
function systemTimeZoneIdentifier() {
|
|
1713
|
-
return
|
|
1707
|
+
return Yt && Wt + Yt > Date.now() && Ct ? Ct : (Wt = Date.now(), Ct = new vt().resolvedOptions().timeZone);
|
|
1714
1708
|
}
|
|
1715
1709
|
function setSystemTimeZoneIdCacheTtl(e) {
|
|
1716
|
-
|
|
1710
|
+
Yt = e, e || (Ct = void 0, Wt = -1 / 0);
|
|
1717
1711
|
}
|
|
1718
1712
|
function systemUtcEpochNanoseconds() {
|
|
1719
1713
|
return createEpochNanosecondsFromEpochMilliseconds(Date.now());
|
|
@@ -1946,9 +1940,8 @@ var be = class {
|
|
|
1946
1940
|
const t = getInternalSlotOrThrowForZonedDateTime(this);
|
|
1947
1941
|
void 0 === e && throwTypeError(W);
|
|
1948
1942
|
const o = getOption("string" == typeof e ? { direction: e } : getOptionsObject(e), "direction", ["next", "previous"], q), n = ((e, t, o) => {
|
|
1949
|
-
if ("UTC" === e || isOffsetTimeZoneIdentifier(e)) return null;
|
|
1950
1943
|
const n = -4e9, r = Math.floor((Date.now() + 31536e7) / 1e3), a = clamp(epochSeconds(addNanosecondsToEpochSeconds(t, o > 0 ? 0 : -1)), n, 1 / 0);
|
|
1951
|
-
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
|
|
1944
|
+
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);
|
|
1952
1945
|
})(t.Z, t.Y, "next" === o ? 1 : -1);
|
|
1953
1946
|
return null === n ? null : createTemporalZonedDateTime(n, t.Z, t.U);
|
|
1954
1947
|
}
|
|
@@ -2573,7 +2566,7 @@ var Ft = class {
|
|
|
2573
2566
|
if (!n.some((e, t) => r[t] !== e)) return 0;
|
|
2574
2567
|
const i = defaultTemporalLargestUnit(n), l = defaultTemporalLargestUnit(r), c = toInternalDurationRecord(n), s = toInternalDurationRecord(r);
|
|
2575
2568
|
let d, m;
|
|
2576
|
-
return a.
|
|
2569
|
+
return a.Re && (isDateUnit(i) || isDateUnit(l)) ? compareEpochNanoseconds(addZonedDateTime(a.Re, c, _), addZonedDateTime(a.Re, s, _)) : (isCalendarUnit(i) || isCalendarUnit(l) ? (a.be || throwRangeError(missingField("relativeTo")), d = dateDurationDays(c.A, a.be), m = dateDurationDays(s.A, a.be)) : (d = n[f], m = r[f]), Pe(add24HourDaysToTimeDuration(c.p, d), add24HourDaysToTimeDuration(s.p, m)));
|
|
2577
2570
|
}
|
|
2578
2571
|
get years() {
|
|
2579
2572
|
return getInternalSlotOrThrowForDuration(this)[p];
|
|
@@ -2634,10 +2627,10 @@ var Ft = class {
|
|
|
2634
2627
|
let l = getTemporalUnitValuedOption(o, "smallestUnit");
|
|
2635
2628
|
validateTemporalUnitValue(l, H);
|
|
2636
2629
|
const c = defaultTemporalLargestUnit(t), s = void 0 === l && void 0 === n;
|
|
2637
|
-
if (l ??= D, void 0 !== n && "auto" !== n || (n = largerOfTwoTemporalUnits(c, l)), (s || n > l) && throwRangeError(U), isDateUnit(l) || validateTemporalRoundingIncrement(a, maximumTemporalDurationRoundingIncrement(l), !1), a > 1 && n !== l && isDateUnit(l) && throwRangeError(U), r.
|
|
2638
|
-
if (r.
|
|
2630
|
+
if (l ??= D, void 0 !== n && "auto" !== n || (n = largerOfTwoTemporalUnits(c, l)), (s || n > l) && throwRangeError(U), isDateUnit(l) || validateTemporalRoundingIncrement(a, maximumTemporalDurationRoundingIncrement(l), !1), a > 1 && n !== l && isDateUnit(l) && throwRangeError(U), r.Re) return createTemporalDuration(temporalDurationFromInternal(differenceZonedDateTimeWithRounding(r.Re, createZonedDateTimeSlot(addZonedDateTime(r.Re, toInternalDurationRecord(t), _), r.Re.Z, r.Re.U), n, a, l, i), isDateUnit(n) ? m : n));
|
|
2631
|
+
if (r.be) {
|
|
2639
2632
|
const e = toInternalDurationRecordWith24HourDays(t), o = addTime(midnightTimeRecord(), e.p);
|
|
2640
|
-
return createTemporalDuration(temporalDurationFromInternal(differencePlainDateTimeWithRounding(combineIsoDateAndTimeRecord(r.
|
|
2633
|
+
return createTemporalDuration(temporalDurationFromInternal(differencePlainDateTimeWithRounding(combineIsoDateAndTimeRecord(r.be.o, midnightTimeRecord()), combineIsoDateAndTimeRecord(calendarDateAdd(r.be.U, r.be.o, adjustDateDurationRecord(e.A, o.X), _), o), r.be.U, n, a, l, i), n));
|
|
2641
2634
|
}
|
|
2642
2635
|
(isCalendarUnit(c) || isCalendarUnit(n)) && throwRangeError(missingField("relativeTo"));
|
|
2643
2636
|
const u = toInternalDurationRecordWith24HourDays(t);
|
|
@@ -2647,10 +2640,10 @@ var Ft = class {
|
|
|
2647
2640
|
const t = getInternalSlotOrThrowForDuration(this);
|
|
2648
2641
|
void 0 === e && throwTypeError(W);
|
|
2649
2642
|
const o = "string" == typeof e ? createNullPrototypeObject({ unit: e }) : getOptionsObject(e), n = getTemporalRelativeToOption(o), r = getTemporalUnitValuedOption(o, "unit", q);
|
|
2650
|
-
if (validateTemporalUnitValue(r, H), n.
|
|
2651
|
-
if (n.
|
|
2643
|
+
if (validateTemporalUnitValue(r, H), n.Re) return ((e, t, o) => isDateUnit(o) ? totalRelativeDuration(differenceZonedDateTime(e, t, o), e.Y, t.Y, getIsoDateTimeForZonedDateTimeSlot(e), e.Z, e.U, o) : totalTimeDuration(timeDurationFromEpochNanosecondsDifference(t.Y, e.Y), o))(n.Re, createZonedDateTimeSlot(addZonedDateTime(n.Re, toInternalDurationRecord(t), _), n.Re.Z, n.Re.U), r);
|
|
2644
|
+
if (n.be) {
|
|
2652
2645
|
const e = toInternalDurationRecordWith24HourDays(t), o = addTime(midnightTimeRecord(), e.p);
|
|
2653
|
-
return ((e, t, o, n) => compareIsoDateTime(e, t) ? (validateIsoDateTime(e), validateIsoDateTime(t), totalRelativeDuration(differenceISODateTime(e, t, o, n), getUtcEpochNanoseconds(e), getUtcEpochNanoseconds(t), e, void 0, 0, n)) : 0)(combineIsoDateAndTimeRecord(n.
|
|
2646
|
+
return ((e, t, o, n) => compareIsoDateTime(e, t) ? (validateIsoDateTime(e), validateIsoDateTime(t), totalRelativeDuration(differenceISODateTime(e, t, o, n), getUtcEpochNanoseconds(e), getUtcEpochNanoseconds(t), e, void 0, 0, n)) : 0)(combineIsoDateAndTimeRecord(n.be.o, midnightTimeRecord()), combineIsoDateAndTimeRecord(calendarDateAdd(n.be.U, n.be.o, adjustDateDurationRecord(e.A, o.X), _), o), n.be.U, r);
|
|
2654
2647
|
}
|
|
2655
2648
|
return (isCalendarUnit(defaultTemporalLargestUnit(t)) || isCalendarUnit(r)) && throwRangeError(missingField("relativeTo")), totalTimeDuration(toInternalDurationRecordWith24HourDays(t).p, r);
|
|
2656
2649
|
}
|
|
@@ -2708,15 +2701,13 @@ const St = {
|
|
|
2708
2701
|
"timeStyle"
|
|
2709
2702
|
];
|
|
2710
2703
|
var bt = class {
|
|
2711
|
-
ke(e) {
|
|
2712
|
-
return formatDateTime(getInternalSlotOrThrowForDateTimeFormat(this), e);
|
|
2713
|
-
}
|
|
2714
|
-
}, Rt = class {
|
|
2715
2704
|
constructor(e, t) {
|
|
2716
2705
|
yt.set(this, createDateTimeFormat(e, t, H, void 0));
|
|
2717
2706
|
}
|
|
2718
2707
|
get format() {
|
|
2719
|
-
return Object.defineProperty(getInternalSlotOrThrowForDateTimeFormat(this).
|
|
2708
|
+
return Object.defineProperty(getInternalSlotOrThrowForDateTimeFormat(this).ke ||= { ze(e) {
|
|
2709
|
+
return formatDateTime(getInternalSlotOrThrowForDateTimeFormat(this), e);
|
|
2710
|
+
} }.ze.bind(this), "name", { value: "" });
|
|
2720
2711
|
}
|
|
2721
2712
|
formatToParts(e) {
|
|
2722
2713
|
return ((e, t) => {
|
|
@@ -2742,12 +2733,12 @@ var bt = class {
|
|
|
2742
2733
|
return getInternalSlotOrThrowForDateTimeFormat(this).Ze.resolvedOptions();
|
|
2743
2734
|
}
|
|
2744
2735
|
};
|
|
2745
|
-
const
|
|
2746
|
-
|
|
2747
|
-
for (const e of ["formatRange", "formatRangeToParts"]) vt.prototype[e] || delete
|
|
2748
|
-
Object.defineProperties(DateTimeFormat,
|
|
2749
|
-
const
|
|
2750
|
-
var
|
|
2736
|
+
const Rt = Object.getOwnPropertyDescriptors(vt), Zt = bt.prototype;
|
|
2737
|
+
Rt.prototype.value = Zt;
|
|
2738
|
+
for (const e of ["formatRange", "formatRangeToParts"]) vt.prototype[e] || delete Zt[e];
|
|
2739
|
+
Object.defineProperties(DateTimeFormat, Rt), DateTimeFormat.prototype.constructor = DateTimeFormat, defineStringTag(DateTimeFormat.prototype, "Intl.DateTimeFormat");
|
|
2740
|
+
const Nt = /* @__PURE__ */ new WeakMap();
|
|
2741
|
+
var Mt = class {
|
|
2751
2742
|
constructor(e) {
|
|
2752
2743
|
createTemporalInstant(validateEpochNanoseconds(createEpochNanosecondsFromBigInt(toBigInt(e))), this);
|
|
2753
2744
|
}
|
|
@@ -2807,16 +2798,14 @@ var Ut = class {
|
|
|
2807
2798
|
return createTemporalZonedDateTime(getInternalSlotOrThrowForInstant(this).Y, toTemporalTimeZoneIdentifier(e), "iso8601");
|
|
2808
2799
|
}
|
|
2809
2800
|
};
|
|
2810
|
-
defineStringTag(
|
|
2811
|
-
const
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
let Yt, Wt = 0, At = -1 / 0;
|
|
2819
|
-
const zt = {
|
|
2801
|
+
defineStringTag(Mt.prototype, "Temporal.Instant"), renameFunction(Mt, "Instant");
|
|
2802
|
+
const Ut = { toTemporalInstant() {
|
|
2803
|
+
const e = Date.prototype.valueOf.call(this);
|
|
2804
|
+
return e != e && throwRangeError("invalid date"), createTemporalInstant(createEpochNanosecondsFromEpochMilliseconds(e));
|
|
2805
|
+
} }.toTemporalInstant, jt = {}, $t = Object.getOwnPropertyDescriptors(globalThis.Intl);
|
|
2806
|
+
$t.DateTimeFormat.value = DateTimeFormat, $t.DurationFormat && ($t.DurationFormat.value = k), Object.defineProperties(jt, $t);
|
|
2807
|
+
let Ct, Yt = 0, Wt = -1 / 0;
|
|
2808
|
+
const At = {
|
|
2820
2809
|
timeZoneId: () => systemTimeZoneIdentifier(),
|
|
2821
2810
|
instant: () => createTemporalInstant(systemUtcEpochNanoseconds()),
|
|
2822
2811
|
plainDateTimeISO: (e = void 0) => createTemporalDateTime(systemDateTime(e), "iso8601"),
|
|
@@ -2824,9 +2813,9 @@ const zt = {
|
|
|
2824
2813
|
plainDateISO: (e = void 0) => createTemporalDate(systemDateTime(e).o, "iso8601"),
|
|
2825
2814
|
plainTimeISO: (e = void 0) => createTemporalTime(systemDateTime(e).p)
|
|
2826
2815
|
};
|
|
2827
|
-
defineStringTag(
|
|
2828
|
-
const
|
|
2829
|
-
Instant:
|
|
2816
|
+
defineStringTag(At, "Temporal.Now"), makePropertiesNonEnumerable(At);
|
|
2817
|
+
const zt = {
|
|
2818
|
+
Instant: Mt,
|
|
2830
2819
|
PlainDateTime: Ue,
|
|
2831
2820
|
PlainDate: pt,
|
|
2832
2821
|
PlainTime: $e,
|
|
@@ -2834,7 +2823,7 @@ const kt = {
|
|
|
2834
2823
|
PlainMonthDay: mt,
|
|
2835
2824
|
Duration: Ft,
|
|
2836
2825
|
ZonedDateTime: be,
|
|
2837
|
-
Now:
|
|
2826
|
+
Now: At
|
|
2838
2827
|
};
|
|
2839
|
-
defineStringTag(
|
|
2840
|
-
export { defineNonEnumerableProperty as a,
|
|
2828
|
+
defineStringTag(zt, "Temporal"), makePropertiesNonEnumerable(zt);
|
|
2829
|
+
export { defineNonEnumerableProperty as a, Ut as i, setSystemTimeZoneIdCacheTtl as n, jt as r, zt as t };
|