temporal-polyfill-lite 0.3.3 → 0.3.5
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 +13 -0
- package/README.md +5 -1
- package/dist/calendars/index.d.ts +4 -4
- package/dist/calendars/index.js +1 -1
- package/dist/calendars/shim.js +1 -1
- package/dist/calendars/{src-m77GJsdB.js → src-DGSugl3P.js} +66 -76
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/shim.js +1 -1
- package/dist/{src-CfkGat92.js → src-OoYXO2Zf.js} +75 -85
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## 0.3.5 (2026-04-20)
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- Fix wrong order of observable operations for options object in `Intl.DateTimeFormat` constructor ([#28](https://github.com/fabon-f/temporal-polyfill-lite/pull/28))
|
|
13
|
+
- Fix types of `Intl` when the polyfill is used as a ponyfill ([#29](https://github.com/fabon-f/temporal-polyfill-lite/pull/29))
|
|
14
|
+
|
|
15
|
+
## 0.3.4 (2026-04-14)
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- Fix discrepancy of date time format between timestamp and Temporal objects in `Intl.DateTimeFormat` ([#27](https://github.com/fabon-f/temporal-polyfill-lite/pull/27))
|
|
20
|
+
|
|
8
21
|
## 0.3.3 (2026-03-21)
|
|
9
22
|
|
|
10
23
|
### Added
|
package/README.md
CHANGED
|
@@ -48,4 +48,8 @@ This polyfill doesn't internally rely on `bigint`, thus you can support older br
|
|
|
48
48
|
|
|
49
49
|
## Spec compliance
|
|
50
50
|
|
|
51
|
-
It supports the latest spec with few intentional deviations (see
|
|
51
|
+
It supports the latest spec with few intentional deviations (see `tests/expectedFailures` directory for details).
|
|
52
|
+
|
|
53
|
+
## Docs
|
|
54
|
+
|
|
55
|
+
- `docs/restrictions.md`: caveats and restrictions of this polyfill
|
|
@@ -591,19 +591,19 @@ export namespace Intl {
|
|
|
591
591
|
}
|
|
592
592
|
}
|
|
593
593
|
|
|
594
|
-
export const Intl: {
|
|
594
|
+
export const Intl: typeof globalThis.Intl & {
|
|
595
595
|
DateTimeFormat: {
|
|
596
596
|
new (
|
|
597
|
-
locales?:
|
|
597
|
+
locales?: globalThis.Intl.LocalesArgument,
|
|
598
598
|
options?: globalThis.Intl.DateTimeFormatOptions,
|
|
599
599
|
): Intl.DateTimeFormat;
|
|
600
600
|
(
|
|
601
|
-
locales?:
|
|
601
|
+
locales?: globalThis.Intl.LocalesArgument,
|
|
602
602
|
options?: globalThis.Intl.DateTimeFormatOptions,
|
|
603
603
|
): Intl.DateTimeFormat;
|
|
604
604
|
|
|
605
605
|
supportedLocalesOf(
|
|
606
|
-
locales:
|
|
606
|
+
locales: globalThis.Intl.LocalesArgument,
|
|
607
607
|
options?: globalThis.Intl.DateTimeFormatOptions,
|
|
608
608
|
): string[];
|
|
609
609
|
};
|
package/dist/calendars/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as a, r as s, t as r } from "./src-
|
|
1
|
+
import { i as a, r as s, t as r } from "./src-DGSugl3P.js";
|
|
2
2
|
export { s as Intl, r as Temporal, a as toTemporalInstant };
|
package/dist/calendars/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-DGSugl3P.js";
|
|
8
8
|
export { install, setSystemTimeZoneIdCacheTtl };
|
|
@@ -35,9 +35,6 @@ function toPrimitive(e) {
|
|
|
35
35
|
function toString(e) {
|
|
36
36
|
return `${e}`;
|
|
37
37
|
}
|
|
38
|
-
function toBoolean(e) {
|
|
39
|
-
return !!e;
|
|
40
|
-
}
|
|
41
38
|
function toBigInt(e) {
|
|
42
39
|
return isObject(e) || "number" == typeof e ? BigInt.asIntN(2 ** 53 - 1, e) : BigInt(e);
|
|
43
40
|
}
|
|
@@ -53,7 +50,7 @@ function toPositiveIntegerWithTruncation(e) {
|
|
|
53
50
|
const t = toIntegerWithTruncation(e);
|
|
54
51
|
return t <= 0 && throwRangeError(invalidNumber(t)), t;
|
|
55
52
|
}
|
|
56
|
-
function getOptionsObject(e = createNullPrototypeObject(
|
|
53
|
+
function getOptionsObject(e = createNullPrototypeObject()) {
|
|
57
54
|
return isObject(e) || throwTypeError("invalid options object"), e;
|
|
58
55
|
}
|
|
59
56
|
function getOption(e, t, o, n) {
|
|
@@ -1663,7 +1660,7 @@ function calendarResolveFields(e, t, o = s) {
|
|
|
1663
1660
|
})(e, t, o);
|
|
1664
1661
|
}
|
|
1665
1662
|
function createEmptyCalendarFieldsRecord() {
|
|
1666
|
-
return createNullPrototypeObject(
|
|
1663
|
+
return createNullPrototypeObject();
|
|
1667
1664
|
}
|
|
1668
1665
|
function zeroDateDuration() {
|
|
1669
1666
|
return createDateDurationRecord(0, 0, 0, 0);
|
|
@@ -1981,12 +1978,12 @@ function getTemporalFractionalSecondDigitsOption(e) {
|
|
|
1981
1978
|
function toSecondsStringPrecisionRecord(e, t) {
|
|
1982
1979
|
return e ? {
|
|
1983
1980
|
$e: e === B ? D : 3 * (e - 6),
|
|
1984
|
-
|
|
1985
|
-
|
|
1981
|
+
Ee: e,
|
|
1982
|
+
ve: 1
|
|
1986
1983
|
} : {
|
|
1987
1984
|
$e: t,
|
|
1988
|
-
|
|
1989
|
-
|
|
1985
|
+
Ee: divFloor((t ?? 9) - 1, 3) + 7,
|
|
1986
|
+
ve: 10 ** ((9 - (t ?? 9)) % 3)
|
|
1990
1987
|
};
|
|
1991
1988
|
}
|
|
1992
1989
|
function getTemporalUnitValuedOption(e, t, o) {
|
|
@@ -2004,7 +2001,7 @@ function validateTemporalUnitValue(e, t, o = []) {
|
|
|
2004
2001
|
}
|
|
2005
2002
|
function getTemporalRelativeToOption(e) {
|
|
2006
2003
|
const t = e.relativeTo;
|
|
2007
|
-
if (void 0 === t) return createNullPrototypeObject(
|
|
2004
|
+
if (void 0 === t) return createNullPrototypeObject();
|
|
2008
2005
|
let o, n, r, a, i, c = !0, s = F;
|
|
2009
2006
|
if (isObject(t)) {
|
|
2010
2007
|
if (isZonedDateTime(t)) return createNullPrototypeObject({ Me: getInternalSlotOrThrowForZonedDateTime(t) });
|
|
@@ -2121,7 +2118,7 @@ function isoDateTimeToFields(e, t) {
|
|
|
2121
2118
|
});
|
|
2122
2119
|
}
|
|
2123
2120
|
function getInternalSlotOrThrowForDateTimeFormat(e) {
|
|
2124
|
-
const t =
|
|
2121
|
+
const t = Rt.get(e);
|
|
2125
2122
|
return t || throwTypeError(he), t;
|
|
2126
2123
|
}
|
|
2127
2124
|
function formatDateTime(e, t) {
|
|
@@ -2136,19 +2133,19 @@ function dateStyleToMonthStyle(e) {
|
|
|
2136
2133
|
}
|
|
2137
2134
|
function amendOptionsForPlainDate(e) {
|
|
2138
2135
|
const t = createNullPrototypeObject(e);
|
|
2139
|
-
return hasAnyOptions(e,
|
|
2136
|
+
return hasAnyOptions(e, Nt) || (hasAnyOptions(e, Zt) && throwTypeError(Te), t.year = t.month = t.day = "numeric"), removeDateTimeFormatOptions(t, [...Zt, "timeZoneName"]), t.timeZone = "UTC", t;
|
|
2140
2137
|
}
|
|
2141
2138
|
function amendOptionsForPlainTime(e) {
|
|
2142
2139
|
const t = createNullPrototypeObject(e);
|
|
2143
|
-
return hasAnyOptions(e,
|
|
2144
|
-
...
|
|
2140
|
+
return hasAnyOptions(e, Zt) || (hasAnyOptions(e, Nt) && throwTypeError(Te), 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, [
|
|
2141
|
+
...Nt,
|
|
2145
2142
|
"era",
|
|
2146
2143
|
"timeZoneName"
|
|
2147
2144
|
]), t.timeZone = "UTC", t;
|
|
2148
2145
|
}
|
|
2149
2146
|
function amendOptionsForPlainDateTime(e) {
|
|
2150
2147
|
const t = createNullPrototypeObject(e);
|
|
2151
|
-
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, [...
|
|
2148
|
+
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, [...Nt, ...Zt]) || (t.year = t.month = t.day = t.hour = t.minute = t.second = "numeric"), removeDateTimeFormatOptions(t, ["timeZoneName"]), t.timeZone = "UTC", t;
|
|
2152
2149
|
}
|
|
2153
2150
|
function amendOptionsForPlainYearMonth(e) {
|
|
2154
2151
|
const t = createNullPrototypeObject(e);
|
|
@@ -2156,8 +2153,8 @@ function amendOptionsForPlainYearMonth(e) {
|
|
|
2156
2153
|
"year",
|
|
2157
2154
|
"month",
|
|
2158
2155
|
"dateStyle"
|
|
2159
|
-
]) || (hasAnyOptions(e, [...
|
|
2160
|
-
|
|
2156
|
+
]) || (hasAnyOptions(e, [...Nt, ...Zt]) && throwTypeError(Te), t.year = t.month = "numeric"), removeDateTimeFormatOptions(t, [
|
|
2157
|
+
...Zt,
|
|
2161
2158
|
"day",
|
|
2162
2159
|
"weekday",
|
|
2163
2160
|
"timeZoneName"
|
|
@@ -2169,8 +2166,8 @@ function amendOptionsForPlainMonthDay(e) {
|
|
|
2169
2166
|
"month",
|
|
2170
2167
|
"day",
|
|
2171
2168
|
"dateStyle"
|
|
2172
|
-
]) || (hasAnyOptions(e, [...
|
|
2173
|
-
|
|
2169
|
+
]) || (hasAnyOptions(e, [...Nt, ...Zt]) && throwTypeError(Te), t.month = t.day = "numeric"), removeDateTimeFormatOptions(t, [
|
|
2170
|
+
...Zt,
|
|
2174
2171
|
"era",
|
|
2175
2172
|
"year",
|
|
2176
2173
|
"weekday",
|
|
@@ -2179,28 +2176,25 @@ function amendOptionsForPlainMonthDay(e) {
|
|
|
2179
2176
|
}
|
|
2180
2177
|
function amendOptionsForInstant(e) {
|
|
2181
2178
|
const t = createNullPrototypeObject(e);
|
|
2182
|
-
return hasAnyOptions(e, [...
|
|
2179
|
+
return hasAnyOptions(e, [...Nt, ...Zt]) || (t.year = t.month = t.day = t.hour = t.minute = t.second = "numeric"), t;
|
|
2183
2180
|
}
|
|
2184
2181
|
function hasAnyOptions(e, t) {
|
|
2185
2182
|
return t.some((t) => void 0 !== e[t]);
|
|
2186
2183
|
}
|
|
2187
|
-
function createDateTimeFormat(e, t = createNullPrototypeObject(
|
|
2184
|
+
function createDateTimeFormat(e, t = createNullPrototypeObject(), o, n, r = Object.create(Ct.prototype)) {
|
|
2188
2185
|
null === t && throwTypeError(Te);
|
|
2189
|
-
const a = (
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
return o;
|
|
2193
|
-
})
|
|
2194
|
-
|
|
2186
|
+
const a = createNullPrototypeObject();
|
|
2187
|
+
let i = new Pt(e, new Proxy(Object(t), { get(e, t) {
|
|
2188
|
+
const o = e[t];
|
|
2189
|
+
return "timeZone" === t && void 0 !== n ? (void 0 !== o && throwTypeError("disallowed field: timeZone"), a[t] = n) : void 0 === o ? o : a[t] = "hour12" === t ? ((e) => !!e)(o) : "fractionalSecondDigits" === t ? Se(o) : toString(o);
|
|
2190
|
+
} }));
|
|
2191
|
+
return (o === s && a.timeStyle || o === l && a.dateStyle) && throwTypeError(Te), a.calendar = i.resolvedOptions().calendar, void 0 === n || hasAnyOptions(a, [
|
|
2192
|
+
...Nt,
|
|
2195
2193
|
...Zt,
|
|
2196
|
-
...$t,
|
|
2197
2194
|
"timeZoneName"
|
|
2198
|
-
]) || (a.timeZoneName = "short"))
|
|
2199
|
-
const i = new Pt(e, a), c = i.resolvedOptions(), d = createNullPrototypeObject(c);
|
|
2200
|
-
for (const e of Object.keys(d)) void 0 === a[e] && (d[e] = void 0);
|
|
2201
|
-
return d.hour12 = a.hour12, d.hourCycle = a.hourCycle, d.formatMatcher = a.formatMatcher, d.timeZone = c.timeZone, d.calendar = c.calendar, (o === s && d.timeStyle || o === l && d.dateStyle) && throwTypeError(Te), Nt.set(r, createNullPrototypeObject({
|
|
2195
|
+
]) || (a.timeZoneName = "short", i = new Pt(i.resolvedOptions().locale, a)), Rt.set(r, createNullPrototypeObject({
|
|
2202
2196
|
Pe: i,
|
|
2203
|
-
Re:
|
|
2197
|
+
Re: a,
|
|
2204
2198
|
Ne: i.resolvedOptions().locale
|
|
2205
2199
|
})), r;
|
|
2206
2200
|
}
|
|
@@ -2223,10 +2217,10 @@ function handleDateTimeValue(e, t) {
|
|
|
2223
2217
|
return isPlainTime(t) ? [e.Ze ||= new Pt(e.Ne, amendOptionsForPlainTime(e.Re)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(createIsoDateRecord(1970, 1, 1), getInternalSlotOrThrowForPlainTime(t))))] : o ? (o.Y !== e.Re.calendar && "iso8601" !== o.Y && throwRangeError(De), [e.Ye ||= new Pt(e.Ne, amendOptionsForPlainDate(e.Re)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(o.o, midnightTimeRecord())))]) : n ? (n.Y !== e.Re.calendar && "iso8601" !== n.Y && throwRangeError(De), [e.Ce ||= new Pt(e.Ne, amendOptionsForPlainDateTime(e.Re)), epochMilliseconds(getUtcEpochNanoseconds(n._))]) : r ? (r.Y !== e.Re.calendar && throwRangeError(De), [e.Ue ||= new Pt(e.Ne, amendOptionsForPlainYearMonth(e.Re)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(r.o, midnightTimeRecord())))]) : a ? (a.Y !== e.Re.calendar && throwRangeError(De), [e.je ||= new Pt(e.Ne, amendOptionsForPlainMonthDay(e.Re)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(a.o, midnightTimeRecord())))]) : isInstant(t) ? [e.We ||= new Pt(e.Ne, amendOptionsForInstant(e.Re)), epochMilliseconds(getInternalSlotOrThrowForInstant(t).U)] : (isZonedDateTime(t) && throwTypeError(fe), [e.Pe, t]);
|
|
2224
2218
|
}
|
|
2225
2219
|
function DateTimeFormat(e, t) {
|
|
2226
|
-
return new
|
|
2220
|
+
return new Ct(e, t);
|
|
2227
2221
|
}
|
|
2228
|
-
function createTemporalInstant(e, t = Object.create(
|
|
2229
|
-
return
|
|
2222
|
+
function createTemporalInstant(e, t = Object.create(jt.prototype)) {
|
|
2223
|
+
return Ut.set(t, { U: e }), t;
|
|
2230
2224
|
}
|
|
2231
2225
|
function toTemporalInstant$1(e) {
|
|
2232
2226
|
if (isObject(e)) {
|
|
@@ -2265,23 +2259,23 @@ function validateEpochNanoseconds(e) {
|
|
|
2265
2259
|
return ((e) => compareEpochNanoseconds(ye, e) * compareEpochNanoseconds(we, e) <= 0)(e) || throwRangeError(me), e;
|
|
2266
2260
|
}
|
|
2267
2261
|
function getInternalSlotForInstant(e) {
|
|
2268
|
-
return
|
|
2262
|
+
return Ut.get(e);
|
|
2269
2263
|
}
|
|
2270
2264
|
function getInternalSlotOrThrowForInstant(e) {
|
|
2271
2265
|
const t = getInternalSlotForInstant(e);
|
|
2272
2266
|
return t || throwTypeError(he), t;
|
|
2273
2267
|
}
|
|
2274
2268
|
function isInstant(e) {
|
|
2275
|
-
return
|
|
2269
|
+
return Ut.has(e);
|
|
2276
2270
|
}
|
|
2277
2271
|
function clampEpochNanoseconds(e) {
|
|
2278
2272
|
return compareEpochNanoseconds(e, we) > 0 ? we : compareEpochNanoseconds(e, ye) < 0 ? ye : e;
|
|
2279
2273
|
}
|
|
2280
2274
|
function systemTimeZoneIdentifier() {
|
|
2281
|
-
return
|
|
2275
|
+
return zt && Vt + zt > Date.now() && kt ? kt : (Vt = Date.now(), kt = new Pt().resolvedOptions().timeZone);
|
|
2282
2276
|
}
|
|
2283
2277
|
function setSystemTimeZoneIdCacheTtl(e) {
|
|
2284
|
-
|
|
2278
|
+
zt = e, e || (kt = void 0, Vt = -Infinity);
|
|
2285
2279
|
}
|
|
2286
2280
|
function systemUtcEpochNanoseconds() {
|
|
2287
2281
|
return createEpochNanosecondsFromEpochMilliseconds(Date.now());
|
|
@@ -2475,7 +2469,7 @@ var Me = class {
|
|
|
2475
2469
|
], A))(o);
|
|
2476
2470
|
validateTemporalUnitValue(c, l), c === q && throwRangeError(invalidField("smallestUnit"));
|
|
2477
2471
|
const d = toSecondsStringPrecisionRecord(c, r);
|
|
2478
|
-
return temporalZonedDateTimeToString(t, d.$e, n, s, a, d.
|
|
2472
|
+
return temporalZonedDateTimeToString(t, d.$e, n, s, a, d.ve, d.Ee, i);
|
|
2479
2473
|
}
|
|
2480
2474
|
toLocaleString(e = void 0, t = void 0) {
|
|
2481
2475
|
const o = getInternalSlotOrThrowForZonedDateTime(this), n = createDateTimeFormat(e, t, d, o.P), r = getInternalSlotOrThrowForDateTimeFormat(n);
|
|
@@ -2517,7 +2511,7 @@ var Me = class {
|
|
|
2517
2511
|
}
|
|
2518
2512
|
};
|
|
2519
2513
|
defineStringTag(Me.prototype, "Temporal.ZonedDateTime"), renameFunction(Me, "ZonedDateTime");
|
|
2520
|
-
const be = createNullPrototypeObject(
|
|
2514
|
+
const be = createNullPrototypeObject(), Pe = createNullPrototypeObject(), Re = /* @__PURE__ */ new WeakMap();
|
|
2521
2515
|
var Ne = class {
|
|
2522
2516
|
constructor(e, t, o, n = 0, r = 0, a = 0, i = 0, c = 0, s = 0, l = "iso8601") {
|
|
2523
2517
|
const d = [
|
|
@@ -2671,7 +2665,7 @@ var Ne = class {
|
|
|
2671
2665
|
const t = getInternalSlotOrThrowForPlainDateTime(this), o = getOptionsObject(e), n = getTemporalShowCalendarNameOption(o), r = getTemporalFractionalSecondDigitsOption(o), a = getRoundingModeOption(o, M), i = getTemporalUnitValuedOption(o, "smallestUnit", void 0);
|
|
2672
2666
|
validateTemporalUnitValue(i, l), i === q && throwRangeError(invalidField("smallestUnit"));
|
|
2673
2667
|
const c = toSecondsStringPrecisionRecord(i, r);
|
|
2674
|
-
return isoDateTimeToString(validateIsoDateTime(roundIsoDateTime(t._, c.
|
|
2668
|
+
return isoDateTimeToString(validateIsoDateTime(roundIsoDateTime(t._, c.ve, c.Ee, a)), t.Y, c.$e, n);
|
|
2675
2669
|
}
|
|
2676
2670
|
toLocaleString(e = void 0, t = void 0) {
|
|
2677
2671
|
return getInternalSlotOrThrowForPlainDateTime(this), formatDateTime(createDateTimeFormat(e, t, d), this);
|
|
@@ -2767,7 +2761,7 @@ var $e = class {
|
|
|
2767
2761
|
const t = getInternalSlotOrThrowForPlainTime(this), o = getOptionsObject(e), n = getTemporalFractionalSecondDigitsOption(o), r = getRoundingModeOption(o, M), a = getTemporalUnitValuedOption(o, "smallestUnit", void 0);
|
|
2768
2762
|
validateTemporalUnitValue(a, l), a === q && throwRangeError(invalidField("smallestUnit"));
|
|
2769
2763
|
const i = toSecondsStringPrecisionRecord(a, n);
|
|
2770
|
-
return timeRecordToString(roundTime(t, i.
|
|
2764
|
+
return timeRecordToString(roundTime(t, i.ve, i.Ee, r), i.$e);
|
|
2771
2765
|
}
|
|
2772
2766
|
toLocaleString(e = void 0, t = void 0) {
|
|
2773
2767
|
return getInternalSlotOrThrowForPlainTime(this), formatDateTime(createDateTimeFormat(e, t, l), this);
|
|
@@ -3090,7 +3084,7 @@ var Tt = class {
|
|
|
3090
3084
|
}
|
|
3091
3085
|
};
|
|
3092
3086
|
defineStringTag(Tt.prototype, "Temporal.PlainDate"), renameFunction(Tt, "PlainDate");
|
|
3093
|
-
const Dt = createNullPrototypeObject(
|
|
3087
|
+
const Dt = createNullPrototypeObject(), ht = {
|
|
3094
3088
|
chinese: createLruCache(2e3),
|
|
3095
3089
|
dangi: createLruCache(2e3)
|
|
3096
3090
|
}, pt = {
|
|
@@ -3280,15 +3274,15 @@ var Et = class {
|
|
|
3280
3274
|
const t = getInternalSlotOrThrowForDuration(this), o = getOptionsObject(e), n = getTemporalFractionalSecondDigitsOption(o), r = getRoundingModeOption(o, M), a = getTemporalUnitValuedOption(o, "smallestUnit", void 0);
|
|
3281
3275
|
validateTemporalUnitValue(a, l), a !== q && a !== B || throwRangeError(disallowedUnit(a));
|
|
3282
3276
|
const i = toSecondsStringPrecisionRecord(a, n);
|
|
3283
|
-
if (i.
|
|
3277
|
+
if (i.Ee === G && 1 === i.ve) return temporalDurationToString(t, i.$e);
|
|
3284
3278
|
const c = toInternalDurationRecord(t);
|
|
3285
|
-
return temporalDurationToString(temporalDurationFromInternal(combineDateAndTimeDuration(c.A, roundTimeDuration(c.p, i.
|
|
3279
|
+
return temporalDurationToString(temporalDurationFromInternal(combineDateAndTimeDuration(c.A, roundTimeDuration(c.p, i.ve, i.Ee, r)), largerOfTwoTemporalUnits(defaultTemporalLargestUnit(t), J)), i.$e);
|
|
3286
3280
|
}
|
|
3287
3281
|
toJSON() {
|
|
3288
3282
|
return temporalDurationToString(getInternalSlotOrThrowForDuration(this));
|
|
3289
3283
|
}
|
|
3290
3284
|
toLocaleString(e = void 0, t = void 0) {
|
|
3291
|
-
const o = getInternalSlotOrThrowForDuration(this), n = createNullPrototypeObject(
|
|
3285
|
+
const o = getInternalSlotOrThrowForDuration(this), n = createNullPrototypeObject();
|
|
3292
3286
|
return ce.map((e, t) => {
|
|
3293
3287
|
n[e] = o[t];
|
|
3294
3288
|
}), new Intl.DurationFormat(e, t).format(n);
|
|
@@ -3318,17 +3312,13 @@ const Mt = {
|
|
|
3318
3312
|
[R]: roundHalfCeil,
|
|
3319
3313
|
[N]: roundHalfFloor,
|
|
3320
3314
|
[Z]: roundHalfEven
|
|
3321
|
-
}, Pt = globalThis.Intl.DateTimeFormat, Rt = [
|
|
3322
|
-
new Pt(void 0, new Proxy({}, { get(e, t) {
|
|
3323
|
-
Rt.push(t);
|
|
3324
|
-
} }));
|
|
3325
|
-
const Nt = /* @__PURE__ */ new WeakMap(), Zt = [
|
|
3315
|
+
}, Pt = globalThis.Intl.DateTimeFormat, Rt = /* @__PURE__ */ new WeakMap(), Nt = [
|
|
3326
3316
|
"year",
|
|
3327
3317
|
"month",
|
|
3328
3318
|
"day",
|
|
3329
3319
|
"weekday",
|
|
3330
3320
|
"dateStyle"
|
|
3331
|
-
],
|
|
3321
|
+
], Zt = [
|
|
3332
3322
|
"hour",
|
|
3333
3323
|
"minute",
|
|
3334
3324
|
"second",
|
|
@@ -3336,16 +3326,16 @@ const Nt = /* @__PURE__ */ new WeakMap(), Zt = [
|
|
|
3336
3326
|
"dayPeriod",
|
|
3337
3327
|
"timeStyle"
|
|
3338
3328
|
];
|
|
3339
|
-
var
|
|
3329
|
+
var $t = class {
|
|
3340
3330
|
Ae(e) {
|
|
3341
3331
|
return formatDateTime(this, e);
|
|
3342
3332
|
}
|
|
3343
|
-
},
|
|
3333
|
+
}, Ct = class {
|
|
3344
3334
|
constructor(e, t) {
|
|
3345
3335
|
createDateTimeFormat(e, t, d, void 0, this);
|
|
3346
3336
|
}
|
|
3347
3337
|
get format() {
|
|
3348
|
-
return Object.defineProperty(getInternalSlotOrThrowForDateTimeFormat(this).ke ||=
|
|
3338
|
+
return Object.defineProperty(getInternalSlotOrThrowForDateTimeFormat(this).ke ||= $t.prototype.Ae.bind(this), "name", { value: "" });
|
|
3349
3339
|
}
|
|
3350
3340
|
formatToParts(e) {
|
|
3351
3341
|
return ((e, t) => {
|
|
@@ -3373,10 +3363,10 @@ var Ct = class {
|
|
|
3373
3363
|
return getInternalSlotOrThrowForDateTimeFormat(this).Pe.resolvedOptions();
|
|
3374
3364
|
}
|
|
3375
3365
|
};
|
|
3376
|
-
const
|
|
3377
|
-
|
|
3378
|
-
const
|
|
3379
|
-
var
|
|
3366
|
+
const Yt = Object.getOwnPropertyDescriptors(Intl.DateTimeFormat);
|
|
3367
|
+
Yt.prototype.value = Ct.prototype, Object.defineProperties(DateTimeFormat, Yt), DateTimeFormat.prototype.constructor = DateTimeFormat, defineStringTag(DateTimeFormat.prototype, "Intl.DateTimeFormat");
|
|
3368
|
+
const Ut = /* @__PURE__ */ new WeakMap();
|
|
3369
|
+
var jt = class {
|
|
3380
3370
|
constructor(e) {
|
|
3381
3371
|
createTemporalInstant(validateEpochNanoseconds(createEpochNanosecondsFromBigInt(toBigInt(e))), this);
|
|
3382
3372
|
}
|
|
@@ -3421,7 +3411,7 @@ var Wt = class {
|
|
|
3421
3411
|
const t = getInternalSlotOrThrowForInstant(this), o = getOptionsObject(e), n = getTemporalFractionalSecondDigitsOption(o), r = getRoundingModeOption(o, M), a = getTemporalUnitValuedOption(o, "smallestUnit", void 0), i = o.timeZone;
|
|
3422
3412
|
validateTemporalUnitValue(a, l), a === q && throwRangeError(invalidField("smallestUnit"));
|
|
3423
3413
|
const c = mapUnlessUndefined(i, toTemporalTimeZoneIdentifier), s = toSecondsStringPrecisionRecord(a, n);
|
|
3424
|
-
return temporalInstantToString(roundTemporalInstant(t.U, s.
|
|
3414
|
+
return temporalInstantToString(roundTemporalInstant(t.U, s.ve, s.Ee, r), c, s.$e);
|
|
3425
3415
|
}
|
|
3426
3416
|
toLocaleString(e = void 0, t = void 0) {
|
|
3427
3417
|
return getInternalSlotOrThrowForInstant(this), formatDateTime(createDateTimeFormat(e, t, d), this);
|
|
@@ -3436,18 +3426,18 @@ var Wt = class {
|
|
|
3436
3426
|
return createTemporalZonedDateTime(getInternalSlotOrThrowForInstant(this).U, toTemporalTimeZoneIdentifier(e), "iso8601");
|
|
3437
3427
|
}
|
|
3438
3428
|
};
|
|
3439
|
-
defineStringTag(
|
|
3440
|
-
const
|
|
3429
|
+
defineStringTag(jt.prototype, "Temporal.Instant"), renameFunction(jt, "Instant");
|
|
3430
|
+
const Wt = class {
|
|
3441
3431
|
toTemporalInstant() {
|
|
3442
3432
|
const e = Date.prototype.valueOf.call(this);
|
|
3443
3433
|
return isNaN(e) && throwRangeError("invalid date"), createTemporalInstant(createEpochNanosecondsFromEpochMilliseconds(e));
|
|
3444
3434
|
}
|
|
3445
|
-
}.prototype.toTemporalInstant,
|
|
3446
|
-
|
|
3447
|
-
const
|
|
3448
|
-
Object.defineProperties(
|
|
3449
|
-
let
|
|
3450
|
-
const
|
|
3435
|
+
}.prototype.toTemporalInstant, At = Object.getOwnPropertyDescriptors(globalThis.Intl);
|
|
3436
|
+
At.DateTimeFormat.value = DateTimeFormat;
|
|
3437
|
+
const Lt = {};
|
|
3438
|
+
Object.defineProperties(Lt, At);
|
|
3439
|
+
let kt, zt = 0, Vt = -Infinity;
|
|
3440
|
+
const xt = {
|
|
3451
3441
|
timeZoneId: () => systemTimeZoneIdentifier(),
|
|
3452
3442
|
instant: () => createTemporalInstant(systemUtcEpochNanoseconds()),
|
|
3453
3443
|
plainDateTimeISO: (e = void 0) => createTemporalDateTime(systemDateTime(e), "iso8601"),
|
|
@@ -3455,9 +3445,9 @@ const Ht = {
|
|
|
3455
3445
|
plainDateISO: (e = void 0) => createTemporalDate(systemDateTime(e).o, "iso8601"),
|
|
3456
3446
|
plainTimeISO: (e = void 0) => createTemporalTime(systemDateTime(e).p)
|
|
3457
3447
|
};
|
|
3458
|
-
defineStringTag(
|
|
3459
|
-
const
|
|
3460
|
-
Instant:
|
|
3448
|
+
defineStringTag(xt, "Temporal.Now"), makePropertiesNonEnumerable(xt);
|
|
3449
|
+
const Ht = {
|
|
3450
|
+
Instant: jt,
|
|
3461
3451
|
PlainDateTime: Ne,
|
|
3462
3452
|
PlainDate: Tt,
|
|
3463
3453
|
PlainTime: $e,
|
|
@@ -3465,7 +3455,7 @@ const qt = {
|
|
|
3465
3455
|
PlainMonthDay: lt,
|
|
3466
3456
|
Duration: Et,
|
|
3467
3457
|
ZonedDateTime: Me,
|
|
3468
|
-
Now:
|
|
3458
|
+
Now: xt
|
|
3469
3459
|
};
|
|
3470
|
-
defineStringTag(
|
|
3471
|
-
export { defineNonEnumerableProperty as a,
|
|
3460
|
+
defineStringTag(Ht, "Temporal"), makePropertiesNonEnumerable(Ht);
|
|
3461
|
+
export { defineNonEnumerableProperty as a, Wt as i, setSystemTimeZoneIdCacheTtl as n, Lt as r, Ht as t };
|
package/dist/index.d.ts
CHANGED
|
@@ -591,19 +591,19 @@ export namespace Intl {
|
|
|
591
591
|
}
|
|
592
592
|
}
|
|
593
593
|
|
|
594
|
-
export const Intl: {
|
|
594
|
+
export const Intl: typeof globalThis.Intl & {
|
|
595
595
|
DateTimeFormat: {
|
|
596
596
|
new (
|
|
597
|
-
locales?:
|
|
597
|
+
locales?: globalThis.Intl.LocalesArgument,
|
|
598
598
|
options?: globalThis.Intl.DateTimeFormatOptions,
|
|
599
599
|
): Intl.DateTimeFormat;
|
|
600
600
|
(
|
|
601
|
-
locales?:
|
|
601
|
+
locales?: globalThis.Intl.LocalesArgument,
|
|
602
602
|
options?: globalThis.Intl.DateTimeFormatOptions,
|
|
603
603
|
): Intl.DateTimeFormat;
|
|
604
604
|
|
|
605
605
|
supportedLocalesOf(
|
|
606
|
-
locales:
|
|
606
|
+
locales: globalThis.Intl.LocalesArgument,
|
|
607
607
|
options?: globalThis.Intl.DateTimeFormatOptions,
|
|
608
608
|
): string[];
|
|
609
609
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as a, r as s, t as r } from "./src-
|
|
1
|
+
import { i as a, r as s, t as r } from "./src-OoYXO2Zf.js";
|
|
2
2
|
export { s as Intl, r as Temporal, a as toTemporalInstant };
|
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-OoYXO2Zf.js";
|
|
8
8
|
export { install, setSystemTimeZoneIdCacheTtl };
|
|
@@ -35,9 +35,6 @@ function toPrimitive(e) {
|
|
|
35
35
|
function toString(e) {
|
|
36
36
|
return `${e}`;
|
|
37
37
|
}
|
|
38
|
-
function toBoolean(e) {
|
|
39
|
-
return !!e;
|
|
40
|
-
}
|
|
41
38
|
function toBigInt(e) {
|
|
42
39
|
return isObject(e) || "number" == typeof e ? BigInt.asIntN(2 ** 53 - 1, e) : BigInt(e);
|
|
43
40
|
}
|
|
@@ -53,7 +50,7 @@ function toPositiveIntegerWithTruncation(e) {
|
|
|
53
50
|
const t = toIntegerWithTruncation(e);
|
|
54
51
|
return t <= 0 && throwRangeError(invalidNumber(t)), t;
|
|
55
52
|
}
|
|
56
|
-
function getOptionsObject(e = createNullPrototypeObject(
|
|
53
|
+
function getOptionsObject(e = createNullPrototypeObject()) {
|
|
57
54
|
return isObject(e) || throwTypeError("invalid options object"), e;
|
|
58
55
|
}
|
|
59
56
|
function getOption(e, t, o, n) {
|
|
@@ -232,7 +229,7 @@ function toTemporalZonedDateTime(e, t) {
|
|
|
232
229
|
return createZonedDateTimeSlot(interpretISODateTimeOffset(l, c, m, m === S ? parseDateTimeUtcOffset(n) : 0, o, r, a, d), o, i);
|
|
233
230
|
}
|
|
234
231
|
function createTemporalZonedDateTime(e, t, o, n) {
|
|
235
|
-
return createTemporalZonedDateTimeFromSlot(createZonedDateTimeSlot(e, t, o, ((e, t) =>
|
|
232
|
+
return createTemporalZonedDateTimeFromSlot(createZonedDateTimeSlot(e, t, o, ((e, t) => be[e] && be[e].C(clampEpochSecond(t)))(t, epochSeconds(e))), n);
|
|
236
233
|
}
|
|
237
234
|
function createZonedDateTimeSlot(e, t, o, n) {
|
|
238
235
|
return {
|
|
@@ -315,7 +312,7 @@ function clampEpochSecond(e) {
|
|
|
315
312
|
}
|
|
316
313
|
function getNamedTimeZoneOffsetNanosecondsForEpochSecond(t, o, n) {
|
|
317
314
|
if ("UTC" === t) return 0;
|
|
318
|
-
const r = clampEpochSecond(o), a =
|
|
315
|
+
const r = clampEpochSecond(o), a = be[t] ||= (() => {
|
|
319
316
|
const e = /* @__PURE__ */ new Map();
|
|
320
317
|
return {
|
|
321
318
|
C(t) {
|
|
@@ -341,7 +338,7 @@ function getNamedTimeZoneOffsetNanosecondsForEpochSecond(t, o, n) {
|
|
|
341
338
|
return n || a.q(r, c), c;
|
|
342
339
|
}
|
|
343
340
|
function getFormatterForTimeZone(e) {
|
|
344
|
-
return
|
|
341
|
+
return Re[e] ||= new Ft("en-u-hc-h23", {
|
|
345
342
|
timeZone: e,
|
|
346
343
|
year: "numeric",
|
|
347
344
|
month: "numeric",
|
|
@@ -1099,7 +1096,7 @@ function calendarResolveFields(e, t, o = c) {
|
|
|
1099
1096
|
})(0, t, o);
|
|
1100
1097
|
}
|
|
1101
1098
|
function createEmptyCalendarFieldsRecord() {
|
|
1102
|
-
return createNullPrototypeObject(
|
|
1099
|
+
return createNullPrototypeObject();
|
|
1103
1100
|
}
|
|
1104
1101
|
function zeroDateDuration() {
|
|
1105
1102
|
return createDateDurationRecord(0, 0, 0, 0);
|
|
@@ -1385,7 +1382,7 @@ function getTemporalDisambiguationOption(e) {
|
|
|
1385
1382
|
], g);
|
|
1386
1383
|
}
|
|
1387
1384
|
function negateRoundingMode(e) {
|
|
1388
|
-
return "ceil" === e ? y : "floor" === e ? v : "halfCeil" === e ?
|
|
1385
|
+
return "ceil" === e ? y : "floor" === e ? v : "halfCeil" === e ? b : "halfFloor" === e ? R : e;
|
|
1389
1386
|
}
|
|
1390
1387
|
function getTemporalOffsetOption(e, t) {
|
|
1391
1388
|
return getOption(e, "offset", [
|
|
@@ -1440,13 +1437,13 @@ function validateTemporalUnitValue(e, t, o = []) {
|
|
|
1440
1437
|
}
|
|
1441
1438
|
function getTemporalRelativeToOption(e) {
|
|
1442
1439
|
const t = e.relativeTo;
|
|
1443
|
-
if (void 0 === t) return createNullPrototypeObject(
|
|
1440
|
+
if (void 0 === t) return createNullPrototypeObject();
|
|
1444
1441
|
let o, n, r, a, i, l = !0, c = S;
|
|
1445
1442
|
if (isObject(t)) {
|
|
1446
1443
|
if (isZonedDateTime(t)) return createNullPrototypeObject({ Pe: getInternalSlotOrThrowForZonedDateTime(t) });
|
|
1447
|
-
if (isPlainDate(t)) return createNullPrototypeObject({
|
|
1444
|
+
if (isPlainDate(t)) return createNullPrototypeObject({ Re: getInternalSlotOrThrowForPlainDate(t) });
|
|
1448
1445
|
const e = getInternalSlotForPlainDateTime(t);
|
|
1449
|
-
if (e) return createNullPrototypeObject({
|
|
1446
|
+
if (e) return createNullPrototypeObject({ Re: getInternalSlotOrThrowForPlainDate(createTemporalDate(e._.o, e.U)) });
|
|
1450
1447
|
r = getTemporalCalendarIdentifierWithIsoDefault(t);
|
|
1451
1448
|
const l = prepareCalendarFields(r, t, [
|
|
1452
1449
|
Dt.t,
|
|
@@ -1468,7 +1465,7 @@ function getTemporalRelativeToOption(e) {
|
|
|
1468
1465
|
const e = parseIsoDateTime(t, [Xe, Qe]);
|
|
1469
1466
|
n = e.Z.$, e.Z.N ? (o = toTemporalTimeZoneIdentifier(e.Z.N), c = e.Z.M ? F : n ? S : w, 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;
|
|
1470
1467
|
}
|
|
1471
|
-
return createNullPrototypeObject(o ? { Pe: getInternalSlotOrThrowForZonedDateTime(createTemporalZonedDateTime(interpretISODateTimeOffset(a, i, c, c === S ? parseDateTimeUtcOffset(n) : 0, o, g, O, l), o, r)) } : {
|
|
1468
|
+
return createNullPrototypeObject(o ? { Pe: getInternalSlotOrThrowForZonedDateTime(createTemporalZonedDateTime(interpretISODateTimeOffset(a, i, c, c === S ? parseDateTimeUtcOffset(n) : 0, o, g, O, l), o, r)) } : { Re: getInternalSlotOrThrowForPlainDate(createTemporalDate(a, r)) });
|
|
1472
1469
|
}
|
|
1473
1470
|
function largerOfTwoTemporalUnits(e, t) {
|
|
1474
1471
|
return e < t ? e : t;
|
|
@@ -1505,8 +1502,8 @@ function getRoundingModeOption(e, t) {
|
|
|
1505
1502
|
y,
|
|
1506
1503
|
E,
|
|
1507
1504
|
P,
|
|
1508
|
-
b,
|
|
1509
1505
|
R,
|
|
1506
|
+
b,
|
|
1510
1507
|
Z,
|
|
1511
1508
|
N,
|
|
1512
1509
|
M
|
|
@@ -1557,7 +1554,7 @@ function isoDateTimeToFields(e, t) {
|
|
|
1557
1554
|
});
|
|
1558
1555
|
}
|
|
1559
1556
|
function getInternalSlotOrThrowForDateTimeFormat(e) {
|
|
1560
|
-
const t =
|
|
1557
|
+
const t = wt.get(e);
|
|
1561
1558
|
return t || throwTypeError(pe), t;
|
|
1562
1559
|
}
|
|
1563
1560
|
function formatDateTime(e, t) {
|
|
@@ -1572,19 +1569,19 @@ function dateStyleToMonthStyle(e) {
|
|
|
1572
1569
|
}
|
|
1573
1570
|
function amendOptionsForPlainDate(e) {
|
|
1574
1571
|
const t = createNullPrototypeObject(e);
|
|
1575
|
-
return hasAnyOptions(e,
|
|
1572
|
+
return hasAnyOptions(e, vt) || (hasAnyOptions(e, yt) && throwTypeError(ue), t.year = t.month = t.day = "numeric"), removeDateTimeFormatOptions(t, [...yt, "timeZoneName"]), t.timeZone = "UTC", t;
|
|
1576
1573
|
}
|
|
1577
1574
|
function amendOptionsForPlainTime(e) {
|
|
1578
1575
|
const t = createNullPrototypeObject(e);
|
|
1579
|
-
return hasAnyOptions(e,
|
|
1580
|
-
...
|
|
1576
|
+
return hasAnyOptions(e, yt) || (hasAnyOptions(e, vt) && throwTypeError(ue), 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, [
|
|
1577
|
+
...vt,
|
|
1581
1578
|
"era",
|
|
1582
1579
|
"timeZoneName"
|
|
1583
1580
|
]), t.timeZone = "UTC", t;
|
|
1584
1581
|
}
|
|
1585
1582
|
function amendOptionsForPlainDateTime(e) {
|
|
1586
1583
|
const t = createNullPrototypeObject(e);
|
|
1587
|
-
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, [...
|
|
1584
|
+
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, [...vt, ...yt]) || (t.year = t.month = t.day = t.hour = t.minute = t.second = "numeric"), removeDateTimeFormatOptions(t, ["timeZoneName"]), t.timeZone = "UTC", t;
|
|
1588
1585
|
}
|
|
1589
1586
|
function amendOptionsForPlainYearMonth(e) {
|
|
1590
1587
|
const t = createNullPrototypeObject(e);
|
|
@@ -1592,8 +1589,8 @@ function amendOptionsForPlainYearMonth(e) {
|
|
|
1592
1589
|
"year",
|
|
1593
1590
|
"month",
|
|
1594
1591
|
"dateStyle"
|
|
1595
|
-
]) || (hasAnyOptions(e, [...
|
|
1596
|
-
...
|
|
1592
|
+
]) || (hasAnyOptions(e, [...vt, ...yt]) && throwTypeError(ue), t.year = t.month = "numeric"), removeDateTimeFormatOptions(t, [
|
|
1593
|
+
...yt,
|
|
1597
1594
|
"day",
|
|
1598
1595
|
"weekday",
|
|
1599
1596
|
"timeZoneName"
|
|
@@ -1605,8 +1602,8 @@ function amendOptionsForPlainMonthDay(e) {
|
|
|
1605
1602
|
"month",
|
|
1606
1603
|
"day",
|
|
1607
1604
|
"dateStyle"
|
|
1608
|
-
]) || (hasAnyOptions(e, [...
|
|
1609
|
-
...
|
|
1605
|
+
]) || (hasAnyOptions(e, [...vt, ...yt]) && throwTypeError(ue), t.month = t.day = "numeric"), removeDateTimeFormatOptions(t, [
|
|
1606
|
+
...yt,
|
|
1610
1607
|
"era",
|
|
1611
1608
|
"year",
|
|
1612
1609
|
"weekday",
|
|
@@ -1615,28 +1612,25 @@ function amendOptionsForPlainMonthDay(e) {
|
|
|
1615
1612
|
}
|
|
1616
1613
|
function amendOptionsForInstant(e) {
|
|
1617
1614
|
const t = createNullPrototypeObject(e);
|
|
1618
|
-
return hasAnyOptions(e, [...
|
|
1615
|
+
return hasAnyOptions(e, [...vt, ...yt]) || (t.year = t.month = t.day = t.hour = t.minute = t.second = "numeric"), t;
|
|
1619
1616
|
}
|
|
1620
1617
|
function hasAnyOptions(e, t) {
|
|
1621
1618
|
return t.some((t) => void 0 !== e[t]);
|
|
1622
1619
|
}
|
|
1623
|
-
function createDateTimeFormat(e, t = createNullPrototypeObject(
|
|
1620
|
+
function createDateTimeFormat(e, t = createNullPrototypeObject(), o, n, r = Object.create(Pt.prototype)) {
|
|
1624
1621
|
null === t && throwTypeError(ue);
|
|
1625
|
-
const a = (
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
return o;
|
|
1629
|
-
})
|
|
1630
|
-
|
|
1622
|
+
const a = createNullPrototypeObject();
|
|
1623
|
+
let i = new Ft(e, new Proxy(Object(t), { get(e, t) {
|
|
1624
|
+
const o = e[t];
|
|
1625
|
+
return "timeZone" === t && void 0 !== n ? (void 0 !== o && throwTypeError("disallowed field: timeZone"), a[t] = n) : void 0 === o ? o : a[t] = "hour12" === t ? ((e) => !!e)(o) : "fractionalSecondDigits" === t ? Fe(o) : toString(o);
|
|
1626
|
+
} }));
|
|
1627
|
+
return (o === c && a.timeStyle || o === s && a.dateStyle) && throwTypeError(ue), a.calendar = i.resolvedOptions().calendar, void 0 === n || hasAnyOptions(a, [
|
|
1628
|
+
...vt,
|
|
1631
1629
|
...yt,
|
|
1632
|
-
...Et,
|
|
1633
1630
|
"timeZoneName"
|
|
1634
|
-
]) || (a.timeZoneName = "short"))
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
return d.hour12 = a.hour12, d.hourCycle = a.hourCycle, d.formatMatcher = a.formatMatcher, d.timeZone = l.timeZone, d.calendar = l.calendar, (o === c && d.timeStyle || o === s && d.dateStyle) && throwTypeError(ue), vt.set(r, createNullPrototypeObject({
|
|
1638
|
-
Re: i,
|
|
1639
|
-
Ze: d,
|
|
1631
|
+
]) || (a.timeZoneName = "short", i = new Ft(i.resolvedOptions().locale, a)), wt.set(r, createNullPrototypeObject({
|
|
1632
|
+
be: i,
|
|
1633
|
+
Ze: a,
|
|
1640
1634
|
Ne: i.resolvedOptions().locale
|
|
1641
1635
|
})), r;
|
|
1642
1636
|
}
|
|
@@ -1656,13 +1650,13 @@ function toDateTimeFormattable(e) {
|
|
|
1656
1650
|
}
|
|
1657
1651
|
function handleDateTimeValue(e, t) {
|
|
1658
1652
|
const o = getInternalSlotForPlainDate(t), n = getInternalSlotForPlainDateTime(t), r = getInternalSlotForPlainYearMonth(t), a = getInternalSlotForPlainMonthDay(t);
|
|
1659
|
-
return isPlainTime(t) ? [e.$e ||= new Ft(e.Ne, amendOptionsForPlainTime(e.Ze)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(createIsoDateRecord(1970, 1, 1), getInternalSlotOrThrowForPlainTime(t))))] : o ? (o.U !== e.Ze.calendar && "iso8601" !== o.U && throwRangeError(De), [e.Me ||= new Ft(e.Ne, amendOptionsForPlainDate(e.Ze)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(o.o, midnightTimeRecord())))]) : n ? (n.U !== e.Ze.calendar && "iso8601" !== n.U && throwRangeError(De), [e.Ue ||= new Ft(e.Ne, amendOptionsForPlainDateTime(e.Ze)), epochMilliseconds(getUtcEpochNanoseconds(n._))]) : r ? (r.U !== e.Ze.calendar && throwRangeError(De), [e.je ||= new Ft(e.Ne, amendOptionsForPlainYearMonth(e.Ze)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(r.o, midnightTimeRecord())))]) : a ? (a.U !== e.Ze.calendar && throwRangeError(De), [e.Ce ||= new Ft(e.Ne, amendOptionsForPlainMonthDay(e.Ze)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(a.o, midnightTimeRecord())))]) : isInstant(t) ? [e.Ye ||= new Ft(e.Ne, amendOptionsForInstant(e.Ze)), epochMilliseconds(getInternalSlotOrThrowForInstant(t).Y)] : (isZonedDateTime(t) && throwTypeError(fe), [e.
|
|
1653
|
+
return isPlainTime(t) ? [e.$e ||= new Ft(e.Ne, amendOptionsForPlainTime(e.Ze)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(createIsoDateRecord(1970, 1, 1), getInternalSlotOrThrowForPlainTime(t))))] : o ? (o.U !== e.Ze.calendar && "iso8601" !== o.U && throwRangeError(De), [e.Me ||= new Ft(e.Ne, amendOptionsForPlainDate(e.Ze)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(o.o, midnightTimeRecord())))]) : n ? (n.U !== e.Ze.calendar && "iso8601" !== n.U && throwRangeError(De), [e.Ue ||= new Ft(e.Ne, amendOptionsForPlainDateTime(e.Ze)), epochMilliseconds(getUtcEpochNanoseconds(n._))]) : r ? (r.U !== e.Ze.calendar && throwRangeError(De), [e.je ||= new Ft(e.Ne, amendOptionsForPlainYearMonth(e.Ze)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(r.o, midnightTimeRecord())))]) : a ? (a.U !== e.Ze.calendar && throwRangeError(De), [e.Ce ||= new Ft(e.Ne, amendOptionsForPlainMonthDay(e.Ze)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(a.o, midnightTimeRecord())))]) : isInstant(t) ? [e.Ye ||= new Ft(e.Ne, amendOptionsForInstant(e.Ze)), epochMilliseconds(getInternalSlotOrThrowForInstant(t).Y)] : (isZonedDateTime(t) && throwTypeError(fe), [e.be, t]);
|
|
1660
1654
|
}
|
|
1661
1655
|
function DateTimeFormat(e, t) {
|
|
1662
|
-
return new
|
|
1656
|
+
return new Pt(e, t);
|
|
1663
1657
|
}
|
|
1664
|
-
function createTemporalInstant(e, t = Object.create(
|
|
1665
|
-
return
|
|
1658
|
+
function createTemporalInstant(e, t = Object.create(Zt.prototype)) {
|
|
1659
|
+
return bt.set(t, { Y: e }), t;
|
|
1666
1660
|
}
|
|
1667
1661
|
function toTemporalInstant$1(e) {
|
|
1668
1662
|
if (isObject(e)) {
|
|
@@ -1701,23 +1695,23 @@ function validateEpochNanoseconds(e) {
|
|
|
1701
1695
|
return ((e) => compareEpochNanoseconds(we, e) * compareEpochNanoseconds(ve, e) <= 0)(e) || throwRangeError(me), e;
|
|
1702
1696
|
}
|
|
1703
1697
|
function getInternalSlotForInstant(e) {
|
|
1704
|
-
return
|
|
1698
|
+
return bt.get(e);
|
|
1705
1699
|
}
|
|
1706
1700
|
function getInternalSlotOrThrowForInstant(e) {
|
|
1707
1701
|
const t = getInternalSlotForInstant(e);
|
|
1708
1702
|
return t || throwTypeError(pe), t;
|
|
1709
1703
|
}
|
|
1710
1704
|
function isInstant(e) {
|
|
1711
|
-
return
|
|
1705
|
+
return bt.has(e);
|
|
1712
1706
|
}
|
|
1713
1707
|
function clampEpochNanoseconds(e) {
|
|
1714
1708
|
return compareEpochNanoseconds(e, ve) > 0 ? ve : compareEpochNanoseconds(e, we) < 0 ? we : e;
|
|
1715
1709
|
}
|
|
1716
1710
|
function systemTimeZoneIdentifier() {
|
|
1717
|
-
return
|
|
1711
|
+
return $t && Ct + $t > Date.now() && jt ? jt : (Ct = Date.now(), jt = new Ft().resolvedOptions().timeZone);
|
|
1718
1712
|
}
|
|
1719
1713
|
function setSystemTimeZoneIdCacheTtl(e) {
|
|
1720
|
-
|
|
1714
|
+
$t = e, e || (jt = void 0, Ct = -Infinity);
|
|
1721
1715
|
}
|
|
1722
1716
|
function systemUtcEpochNanoseconds() {
|
|
1723
1717
|
return createEpochNanosecondsFromEpochMilliseconds(Date.now());
|
|
@@ -1725,7 +1719,7 @@ function systemUtcEpochNanoseconds() {
|
|
|
1725
1719
|
function systemDateTime(e = systemTimeZoneIdentifier()) {
|
|
1726
1720
|
return getIsoDateTimeForZonedDateTimeSlot(createZonedDateTimeSlot(systemUtcEpochNanoseconds(), toTemporalTimeZoneIdentifier(e), "iso8601"));
|
|
1727
1721
|
}
|
|
1728
|
-
const e = 1e6, t = 6e10, o = 36e11, n = 86400, r = 864e5, a = 864e8, i = 864e11, l = 146097, c = Symbol(), s = Symbol(), d = Symbol(), m = Symbol(), T = Symbol(), u = Symbol(), D = Symbol(), p = "constrain", h = "reject", g = "compatible", f = "later", I = "prefer", O = "reject", S = Symbol(), F = Symbol(), w = Symbol(), v = "ceil", y = "floor", E = "expand", P = "trunc",
|
|
1722
|
+
const e = 1e6, t = 6e10, o = 36e11, n = 86400, r = 864e5, a = 864e8, i = 864e11, l = 146097, c = Symbol(), s = Symbol(), d = Symbol(), m = Symbol(), T = Symbol(), u = Symbol(), D = Symbol(), p = "constrain", h = "reject", g = "compatible", f = "later", I = "prefer", O = "reject", S = Symbol(), F = Symbol(), w = Symbol(), v = "ceil", y = "floor", E = "expand", P = "trunc", R = "halfCeil", b = "halfFloor", Z = "halfExpand", N = "halfTrunc", M = "halfEven", U = "auto", j = "always", $ = "never", C = "critical", Y = "auto", A = "never", W = "auto", z = "never", V = "critical", k = 0, H = 1, x = 2, L = 3, B = 4, q = 5, J = 6, G = 9, _ = 0, K = 1, X = 2, Q = 3, ee = 4, te = 5, oe = 6, ne = 7, re = 8, ae = 9, ie = [
|
|
1729
1723
|
"year",
|
|
1730
1724
|
"month",
|
|
1731
1725
|
"week",
|
|
@@ -1953,7 +1947,7 @@ var Pe = class {
|
|
|
1953
1947
|
}
|
|
1954
1948
|
};
|
|
1955
1949
|
defineStringTag(Pe.prototype, "Temporal.ZonedDateTime"), renameFunction(Pe, "ZonedDateTime");
|
|
1956
|
-
const
|
|
1950
|
+
const Re = createNullPrototypeObject(), be = createNullPrototypeObject(), Ze = /* @__PURE__ */ new WeakMap();
|
|
1957
1951
|
var Ne = class {
|
|
1958
1952
|
constructor(e, t, o, n = 0, r = 0, a = 0, i = 0, l = 0, c = 0, s = "iso8601") {
|
|
1959
1953
|
const d = [
|
|
@@ -2598,7 +2592,7 @@ var It = class {
|
|
|
2598
2592
|
if (n.every((e, t) => r[t] === e)) return 0;
|
|
2599
2593
|
const i = defaultTemporalLargestUnit(n), l = defaultTemporalLargestUnit(r), c = toInternalDurationRecord(n), s = toInternalDurationRecord(r);
|
|
2600
2594
|
let d, m;
|
|
2601
|
-
return a.Pe && (isDateUnit(i) || isDateUnit(l)) ? compareEpochNanoseconds(addZonedDateTime(a.Pe, c, p), addZonedDateTime(a.Pe, s, p)) : (isCalendarUnit(i) || isCalendarUnit(l) ? (a.
|
|
2595
|
+
return a.Pe && (isDateUnit(i) || isDateUnit(l)) ? compareEpochNanoseconds(addZonedDateTime(a.Pe, c, p), addZonedDateTime(a.Pe, s, p)) : (isCalendarUnit(i) || isCalendarUnit(l) ? (a.Re || throwRangeError(missingField("relativeTo")), d = dateDurationDays(c.W, a.Re), m = dateDurationDays(s.W, a.Re)) : (d = n[Q], m = r[Q]), ye(add24HourDaysToTimeDuration(c.p, d), add24HourDaysToTimeDuration(s.p, m)));
|
|
2602
2596
|
}
|
|
2603
2597
|
get years() {
|
|
2604
2598
|
return getInternalSlotOrThrowForDuration(this)[_];
|
|
@@ -2662,9 +2656,9 @@ var It = class {
|
|
|
2662
2656
|
l ??= G;
|
|
2663
2657
|
const s = defaultTemporalLargestUnit(t), m = largerOfTwoTemporalUnits(s, l), T = void 0 !== n;
|
|
2664
2658
|
if (void 0 !== n && "auto" !== n || (n = m), (!c && !T || n > l) && throwRangeError(he), isDateUnit(l) || validateTemporalRoundingIncrement(a, maximumTemporalDurationRoundingIncrement(l), !1), a > 1 && n !== l && isDateUnit(l) && throwRangeError(he), r.Pe) return createTemporalDuration(temporalDurationFromInternal(differenceZonedDateTimeWithRounding(r.Pe, createZonedDateTimeSlot(addZonedDateTime(r.Pe, toInternalDurationRecord(t), p), r.Pe.Z, r.Pe.U), n, a, l, i), isDateUnit(n) ? B : n));
|
|
2665
|
-
if (r.
|
|
2659
|
+
if (r.Re) {
|
|
2666
2660
|
const e = toInternalDurationRecordWith24HourDays(t), o = addTime(midnightTimeRecord(), e.p);
|
|
2667
|
-
return createTemporalDuration(temporalDurationFromInternal(differencePlainDateTimeWithRounding(combineIsoDateAndTimeRecord(r.
|
|
2661
|
+
return createTemporalDuration(temporalDurationFromInternal(differencePlainDateTimeWithRounding(combineIsoDateAndTimeRecord(r.Re.o, midnightTimeRecord()), combineIsoDateAndTimeRecord(calendarDateAdd(r.Re.U, r.Re.o, adjustDateDurationRecord(e.W, o.K), p), o), r.Re.U, n, a, l, i), n));
|
|
2668
2662
|
}
|
|
2669
2663
|
(isCalendarUnit(s) || isCalendarUnit(n)) && throwRangeError(missingField("relativeTo"));
|
|
2670
2664
|
const u = toInternalDurationRecordWith24HourDays(t);
|
|
@@ -2675,9 +2669,9 @@ var It = class {
|
|
|
2675
2669
|
void 0 === e && throwTypeError(Se);
|
|
2676
2670
|
const o = "string" == typeof e ? createNullPrototypeObject({ unit: e }) : getOptionsObject(e), n = getTemporalRelativeToOption(o), r = getTemporalUnitValuedOption(o, "unit", u);
|
|
2677
2671
|
if (validateTemporalUnitValue(r, d), n.Pe) 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.Pe, createZonedDateTimeSlot(addZonedDateTime(n.Pe, toInternalDurationRecord(t), p), n.Pe.Z, n.Pe.U), r);
|
|
2678
|
-
if (n.
|
|
2672
|
+
if (n.Re) {
|
|
2679
2673
|
const e = toInternalDurationRecordWith24HourDays(t), o = addTime(midnightTimeRecord(), e.p);
|
|
2680
|
-
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.
|
|
2674
|
+
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.Re.o, midnightTimeRecord()), combineIsoDateAndTimeRecord(calendarDateAdd(n.Re.U, n.Re.o, adjustDateDurationRecord(e.W, o.K), p), o), n.Re.U, r);
|
|
2681
2675
|
}
|
|
2682
2676
|
return (isCalendarUnit(defaultTemporalLargestUnit(t)) || isCalendarUnit(r)) && throwRangeError(missingField("relativeTo")), totalTimeDuration(toInternalDurationRecordWith24HourDays(t).p, r);
|
|
2683
2677
|
}
|
|
@@ -2693,7 +2687,7 @@ var It = class {
|
|
|
2693
2687
|
return temporalDurationToString(getInternalSlotOrThrowForDuration(this));
|
|
2694
2688
|
}
|
|
2695
2689
|
toLocaleString(e = void 0, t = void 0) {
|
|
2696
|
-
const o = getInternalSlotOrThrowForDuration(this), n = createNullPrototypeObject(
|
|
2690
|
+
const o = getInternalSlotOrThrowForDuration(this), n = createNullPrototypeObject();
|
|
2697
2691
|
return le.map((e, t) => {
|
|
2698
2692
|
n[e] = o[t];
|
|
2699
2693
|
}), new Intl.DurationFormat(e, t).format(n);
|
|
@@ -2708,8 +2702,8 @@ const Ot = {
|
|
|
2708
2702
|
[y]: Math.floor,
|
|
2709
2703
|
[E]: roundExpand,
|
|
2710
2704
|
[P]: Math.trunc,
|
|
2711
|
-
[
|
|
2712
|
-
[
|
|
2705
|
+
[R]: roundHalfCeil,
|
|
2706
|
+
[b]: roundHalfFloor,
|
|
2713
2707
|
[Z]: (e) => (isIntegerAndHalf(e) ? roundExpand(e) : Math.round(e)) + 0,
|
|
2714
2708
|
[N]: (e) => (isIntegerAndHalf(e) ? Math.trunc(e) : Math.round(e)) + 0,
|
|
2715
2709
|
[M]: roundHalfEven
|
|
@@ -2718,22 +2712,18 @@ const Ot = {
|
|
|
2718
2712
|
[y]: Math.floor,
|
|
2719
2713
|
[E]: Math.ceil,
|
|
2720
2714
|
[P]: Math.floor,
|
|
2721
|
-
[
|
|
2722
|
-
[
|
|
2715
|
+
[R]: roundHalfCeil,
|
|
2716
|
+
[b]: roundHalfFloor,
|
|
2723
2717
|
[Z]: roundHalfCeil,
|
|
2724
2718
|
[N]: roundHalfFloor,
|
|
2725
2719
|
[M]: roundHalfEven
|
|
2726
|
-
}, Ft = globalThis.Intl.DateTimeFormat, wt = [
|
|
2727
|
-
new Ft(void 0, new Proxy({}, { get(e, t) {
|
|
2728
|
-
wt.push(t);
|
|
2729
|
-
} }));
|
|
2730
|
-
const vt = /* @__PURE__ */ new WeakMap(), yt = [
|
|
2720
|
+
}, Ft = globalThis.Intl.DateTimeFormat, wt = /* @__PURE__ */ new WeakMap(), vt = [
|
|
2731
2721
|
"year",
|
|
2732
2722
|
"month",
|
|
2733
2723
|
"day",
|
|
2734
2724
|
"weekday",
|
|
2735
2725
|
"dateStyle"
|
|
2736
|
-
],
|
|
2726
|
+
], yt = [
|
|
2737
2727
|
"hour",
|
|
2738
2728
|
"minute",
|
|
2739
2729
|
"second",
|
|
@@ -2741,16 +2731,16 @@ const vt = /* @__PURE__ */ new WeakMap(), yt = [
|
|
|
2741
2731
|
"dayPeriod",
|
|
2742
2732
|
"timeStyle"
|
|
2743
2733
|
];
|
|
2744
|
-
var
|
|
2734
|
+
var Et = class {
|
|
2745
2735
|
Ae(e) {
|
|
2746
2736
|
return formatDateTime(this, e);
|
|
2747
2737
|
}
|
|
2748
|
-
},
|
|
2738
|
+
}, Pt = class {
|
|
2749
2739
|
constructor(e, t) {
|
|
2750
2740
|
createDateTimeFormat(e, t, d, void 0, this);
|
|
2751
2741
|
}
|
|
2752
2742
|
get format() {
|
|
2753
|
-
return Object.defineProperty(getInternalSlotOrThrowForDateTimeFormat(this).We ||=
|
|
2743
|
+
return Object.defineProperty(getInternalSlotOrThrowForDateTimeFormat(this).We ||= Et.prototype.Ae.bind(this), "name", { value: "" });
|
|
2754
2744
|
}
|
|
2755
2745
|
formatToParts(e) {
|
|
2756
2746
|
return ((e, t) => {
|
|
@@ -2775,13 +2765,13 @@ var Pt = class {
|
|
|
2775
2765
|
})(this, toDateTimeFormattable(e), toDateTimeFormattable(t));
|
|
2776
2766
|
}
|
|
2777
2767
|
resolvedOptions() {
|
|
2778
|
-
return getInternalSlotOrThrowForDateTimeFormat(this).
|
|
2768
|
+
return getInternalSlotOrThrowForDateTimeFormat(this).be.resolvedOptions();
|
|
2779
2769
|
}
|
|
2780
2770
|
};
|
|
2781
2771
|
const Rt = Object.getOwnPropertyDescriptors(Intl.DateTimeFormat);
|
|
2782
|
-
Rt.prototype.value =
|
|
2783
|
-
const
|
|
2784
|
-
var
|
|
2772
|
+
Rt.prototype.value = Pt.prototype, Object.defineProperties(DateTimeFormat, Rt), DateTimeFormat.prototype.constructor = DateTimeFormat, defineStringTag(DateTimeFormat.prototype, "Intl.DateTimeFormat");
|
|
2773
|
+
const bt = /* @__PURE__ */ new WeakMap();
|
|
2774
|
+
var Zt = class {
|
|
2785
2775
|
constructor(e) {
|
|
2786
2776
|
createTemporalInstant(validateEpochNanoseconds(createEpochNanosecondsFromBigInt(toBigInt(e))), this);
|
|
2787
2777
|
}
|
|
@@ -2841,18 +2831,18 @@ var Nt = class {
|
|
|
2841
2831
|
return createTemporalZonedDateTime(getInternalSlotOrThrowForInstant(this).Y, toTemporalTimeZoneIdentifier(e), "iso8601");
|
|
2842
2832
|
}
|
|
2843
2833
|
};
|
|
2844
|
-
defineStringTag(
|
|
2845
|
-
const
|
|
2834
|
+
defineStringTag(Zt.prototype, "Temporal.Instant"), renameFunction(Zt, "Instant");
|
|
2835
|
+
const Nt = class {
|
|
2846
2836
|
toTemporalInstant() {
|
|
2847
2837
|
const e = Date.prototype.valueOf.call(this);
|
|
2848
2838
|
return isNaN(e) && throwRangeError("invalid date"), createTemporalInstant(createEpochNanosecondsFromEpochMilliseconds(e));
|
|
2849
2839
|
}
|
|
2850
|
-
}.prototype.toTemporalInstant,
|
|
2851
|
-
|
|
2852
|
-
const
|
|
2853
|
-
Object.defineProperties(
|
|
2854
|
-
let $t
|
|
2855
|
-
const
|
|
2840
|
+
}.prototype.toTemporalInstant, Mt = Object.getOwnPropertyDescriptors(globalThis.Intl);
|
|
2841
|
+
Mt.DateTimeFormat.value = DateTimeFormat;
|
|
2842
|
+
const Ut = {};
|
|
2843
|
+
Object.defineProperties(Ut, Mt);
|
|
2844
|
+
let jt, $t = 0, Ct = -Infinity;
|
|
2845
|
+
const Yt = {
|
|
2856
2846
|
timeZoneId: () => systemTimeZoneIdentifier(),
|
|
2857
2847
|
instant: () => createTemporalInstant(systemUtcEpochNanoseconds()),
|
|
2858
2848
|
plainDateTimeISO: (e = void 0) => createTemporalDateTime(systemDateTime(e), "iso8601"),
|
|
@@ -2860,9 +2850,9 @@ const At = {
|
|
|
2860
2850
|
plainDateISO: (e = void 0) => createTemporalDate(systemDateTime(e).o, "iso8601"),
|
|
2861
2851
|
plainTimeISO: (e = void 0) => createTemporalTime(systemDateTime(e).p)
|
|
2862
2852
|
};
|
|
2863
|
-
defineStringTag(
|
|
2864
|
-
const
|
|
2865
|
-
Instant:
|
|
2853
|
+
defineStringTag(Yt, "Temporal.Now"), makePropertiesNonEnumerable(Yt);
|
|
2854
|
+
const At = {
|
|
2855
|
+
Instant: Zt,
|
|
2866
2856
|
PlainDateTime: Ne,
|
|
2867
2857
|
PlainDate: ut,
|
|
2868
2858
|
PlainTime: Ue,
|
|
@@ -2870,7 +2860,7 @@ const Wt = {
|
|
|
2870
2860
|
PlainMonthDay: st,
|
|
2871
2861
|
Duration: It,
|
|
2872
2862
|
ZonedDateTime: Pe,
|
|
2873
|
-
Now:
|
|
2863
|
+
Now: Yt
|
|
2874
2864
|
};
|
|
2875
|
-
defineStringTag(
|
|
2876
|
-
export { defineNonEnumerableProperty as a,
|
|
2865
|
+
defineStringTag(At, "Temporal"), makePropertiesNonEnumerable(At);
|
|
2866
|
+
export { defineNonEnumerableProperty as a, Nt as i, setSystemTimeZoneIdCacheTtl as n, Ut as r, At as t };
|