temporal-polyfill-lite 0.4.1 → 0.4.2
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 +10 -0
- package/README.md +3 -4
- package/dist/calendars/index.js +1 -1
- package/dist/calendars/shim.js +1 -1
- package/dist/calendars/{src-CIbGWA87.js → src-Bu0ZLzZY.js} +721 -707
- package/dist/index.js +1 -1
- package/dist/shim.js +1 -1
- package/dist/{src-Cpu9wF28.js → src-C0TzYU7p.js} +676 -662
- package/package.json +1 -1
|
@@ -1,15 +1,33 @@
|
|
|
1
|
-
function getNameFromUnit(e) {
|
|
2
|
-
return ae[e];
|
|
3
|
-
}
|
|
4
|
-
function nanosecondsForTimeUnit(e) {
|
|
5
|
-
return le[e - 3];
|
|
6
|
-
}
|
|
7
1
|
function isObject(e) {
|
|
8
2
|
return ("object" == typeof e || "function" == typeof e) && null !== e;
|
|
9
3
|
}
|
|
10
4
|
function createNullPrototypeObject(e) {
|
|
11
5
|
return Object.assign(Object.create(null), e);
|
|
12
6
|
}
|
|
7
|
+
function makePropertyNonEnumerable(e, t) {
|
|
8
|
+
Object.defineProperty(e, t, { enumerable: !1 });
|
|
9
|
+
}
|
|
10
|
+
function makePropertiesNonEnumerable(e) {
|
|
11
|
+
for (const t of Object.keys(e)) makePropertyNonEnumerable(e, t);
|
|
12
|
+
}
|
|
13
|
+
function defineNonEnumerableProperty(e, t, o) {
|
|
14
|
+
e[t] = o, makePropertyNonEnumerable(e, t);
|
|
15
|
+
}
|
|
16
|
+
function defineStringTag(e, t) {
|
|
17
|
+
Object.defineProperty(e, Symbol.toStringTag, {
|
|
18
|
+
value: t,
|
|
19
|
+
configurable: !0
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function renameFunction(e, t) {
|
|
23
|
+
Object.defineProperty(e, "name", { value: t });
|
|
24
|
+
}
|
|
25
|
+
function getNameFromUnit(e) {
|
|
26
|
+
return y[e];
|
|
27
|
+
}
|
|
28
|
+
function nanosecondsForTimeUnit(e) {
|
|
29
|
+
return P[e - 3];
|
|
30
|
+
}
|
|
13
31
|
function mapUnlessUndefined(e, t) {
|
|
14
32
|
return void 0 === e ? void 0 : t(e);
|
|
15
33
|
}
|
|
@@ -22,6 +40,19 @@ function throwRangeError(e) {
|
|
|
22
40
|
function throwTypeError(e) {
|
|
23
41
|
throw new TypeError(e);
|
|
24
42
|
}
|
|
43
|
+
function getInternalSlotOrThrow(e, t) {
|
|
44
|
+
const o = e.get(t);
|
|
45
|
+
return o || throwTypeError("invalid method call"), o;
|
|
46
|
+
}
|
|
47
|
+
function getInternalSlotOrThrowForDurationFormat(e) {
|
|
48
|
+
return getInternalSlotOrThrow(z, e);
|
|
49
|
+
}
|
|
50
|
+
function durationRecordToDurationLikeObject(e) {
|
|
51
|
+
const t = createNullPrototypeObject();
|
|
52
|
+
return E.map((o, n) => {
|
|
53
|
+
t[o] = e[n];
|
|
54
|
+
}), t;
|
|
55
|
+
}
|
|
25
56
|
function toPrimitive(e) {
|
|
26
57
|
if (!isObject(e)) return e;
|
|
27
58
|
const t = e[Symbol.toPrimitive];
|
|
@@ -38,11 +69,11 @@ function toBigInt(e) {
|
|
|
38
69
|
return BigInt.asIntN(2 ** 53 - 1, e);
|
|
39
70
|
}
|
|
40
71
|
function toIntegerIfIntegral(e) {
|
|
41
|
-
const t =
|
|
72
|
+
const t = Se(e);
|
|
42
73
|
return Number.isInteger(t) || throwRangeError(invalidNumber(t)), t + 0;
|
|
43
74
|
}
|
|
44
75
|
function toIntegerWithTruncation(e) {
|
|
45
|
-
const t =
|
|
76
|
+
const t = Se(e);
|
|
46
77
|
return isFinite(t) || throwRangeError(invalidNumber(t)), Math.trunc(t) + 0;
|
|
47
78
|
}
|
|
48
79
|
function toPositiveIntegerWithTruncation(e) {
|
|
@@ -54,11 +85,11 @@ function getOptionsObject(e = createNullPrototypeObject()) {
|
|
|
54
85
|
}
|
|
55
86
|
function getOption(e, t, o, n) {
|
|
56
87
|
const r = e[t];
|
|
57
|
-
if (void 0 === r) return n ===
|
|
88
|
+
if (void 0 === r) return n === B && throwRangeError(missingField(t)), n;
|
|
58
89
|
const a = toString(r);
|
|
59
90
|
return o.includes(a) || throwRangeError(invalidField(t)), a;
|
|
60
91
|
}
|
|
61
|
-
function getRoundToOptionsObject(e = throwTypeError(
|
|
92
|
+
function getRoundToOptionsObject(e = throwTypeError(W)) {
|
|
62
93
|
return "string" == typeof e ? createNullPrototypeObject({ smallestUnit: e }) : getOptionsObject(e);
|
|
63
94
|
}
|
|
64
95
|
function validateString(e) {
|
|
@@ -85,24 +116,6 @@ function clamp(e, t, o) {
|
|
|
85
116
|
function isWithin(e, t, o) {
|
|
86
117
|
return e >= t && e <= o;
|
|
87
118
|
}
|
|
88
|
-
function makePropertyNonEnumerable(e, t) {
|
|
89
|
-
Object.defineProperty(e, t, { enumerable: !1 });
|
|
90
|
-
}
|
|
91
|
-
function makePropertiesNonEnumerable(e) {
|
|
92
|
-
for (const t of Object.keys(e)) makePropertyNonEnumerable(e, t);
|
|
93
|
-
}
|
|
94
|
-
function defineNonEnumerableProperty(e, t, o) {
|
|
95
|
-
e[t] = o, makePropertyNonEnumerable(e, t);
|
|
96
|
-
}
|
|
97
|
-
function defineStringTag(e, t) {
|
|
98
|
-
Object.defineProperty(e, Symbol.toStringTag, {
|
|
99
|
-
value: t,
|
|
100
|
-
configurable: !0
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
function renameFunction(e, t) {
|
|
104
|
-
Object.defineProperty(e, "name", { value: t });
|
|
105
|
-
}
|
|
106
119
|
function normalizeEpochNanoseconds(e, t) {
|
|
107
120
|
return [e + divFloor(t, a), modFloor(t, a)];
|
|
108
121
|
}
|
|
@@ -163,11 +176,11 @@ function negateTimeDuration(e) {
|
|
|
163
176
|
return normalize(-e[0], -e[1]);
|
|
164
177
|
}
|
|
165
178
|
function signTimeDuration(e) {
|
|
166
|
-
return
|
|
179
|
+
return Ee(e, ye);
|
|
167
180
|
}
|
|
168
181
|
function timeDurationToSubsecondsNumber(e, t, o) {
|
|
169
182
|
const n = signTimeDuration(e);
|
|
170
|
-
return e = absTimeDuration(e), n *
|
|
183
|
+
return e = absTimeDuration(e), n * Se(`${864 * e[0] + divTrunc(e[1], 1e11)}${toZeroPaddedDecimalString(divTrunc(e[1] % 1e11, 10 ** (9 + t)), 2 - t)}.${o ? toZeroPaddedDecimalString(e[1] % 10 ** (9 + t), 9 + t) : "0"}`) + 0;
|
|
171
184
|
}
|
|
172
185
|
function roundTimeDurationByDays(e, t, o) {
|
|
173
186
|
return normalize(roundNumberToIncrement(e[0] + signTimeDuration(e) * (e[1] ? .2 * compare(Math.abs(e[1] / a), .5) + .5 : 0), t, o), 0);
|
|
@@ -178,10 +191,10 @@ function divideTimeDurationToFloatingPoint(e, t) {
|
|
|
178
191
|
function interpretISODateTimeOffset(e, t, o, n, r, a, i, l) {
|
|
179
192
|
if (!t) return getStartOfDay(r, e);
|
|
180
193
|
const c = combineIsoDateAndTimeRecord(e, t);
|
|
181
|
-
if (o ===
|
|
182
|
-
if (o ===
|
|
194
|
+
if (o === ne || o === te && "ignore" == i) return getEpochNanosecondsFor(r, c, a);
|
|
195
|
+
if (o === oe || o === te && "use" == i) return validateEpochNanoseconds(getUtcEpochNanoseconds(balanceIsoDateTime(c.o.t, c.o.u, c.o.T, c.p.D, c.p.I, c.p.O, c.p.F, c.p.S, c.p.v - n)));
|
|
183
196
|
((e) => {
|
|
184
|
-
Math.abs(isoDateToEpochDays(e.t, e.u - 1, e.T)) > 1e8 && throwRangeError(
|
|
197
|
+
Math.abs(isoDateToEpochDays(e.t, e.u - 1, e.T)) > 1e8 && throwRangeError(b);
|
|
185
198
|
})(e);
|
|
186
199
|
const s = getPossibleEpochNanoseconds(r, c);
|
|
187
200
|
for (const e of s) {
|
|
@@ -196,40 +209,40 @@ function toTemporalZonedDateTime(e, t) {
|
|
|
196
209
|
if (isObject(e)) {
|
|
197
210
|
if (isZonedDateTime(e)) {
|
|
198
211
|
const o = getOptionsObject(t);
|
|
199
|
-
return getTemporalDisambiguationOption(o), getTemporalOffsetOption(o,
|
|
212
|
+
return getTemporalDisambiguationOption(o), getTemporalOffsetOption(o, X), getTemporalOverflowOption(o), getInternalSlotOrThrowForZonedDateTime(e);
|
|
200
213
|
}
|
|
201
214
|
i = getTemporalCalendarIdentifierWithIsoDefault(e);
|
|
202
215
|
const s = prepareCalendarFields(i, e, [
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
], [
|
|
216
|
+
pt.t,
|
|
217
|
+
pt.u,
|
|
218
|
+
pt.P,
|
|
219
|
+
pt.T,
|
|
220
|
+
pt.D,
|
|
221
|
+
pt.I,
|
|
222
|
+
pt.O,
|
|
223
|
+
pt.F,
|
|
224
|
+
pt.S,
|
|
225
|
+
pt.v,
|
|
226
|
+
pt.R,
|
|
227
|
+
pt.Z
|
|
228
|
+
], [pt.Z]);
|
|
216
229
|
o = s.timeZone, n = s.offset;
|
|
217
230
|
const d = getOptionsObject(t);
|
|
218
|
-
r = getTemporalDisambiguationOption(d), a = getTemporalOffsetOption(d,
|
|
231
|
+
r = getTemporalDisambiguationOption(d), a = getTemporalOffsetOption(d, X);
|
|
219
232
|
const m = interpretTemporalDateTimeFields(i, s, getTemporalOverflowOption(d));
|
|
220
233
|
l = m.o, c = m.p;
|
|
221
234
|
} else {
|
|
222
235
|
validateString(e);
|
|
223
|
-
const m = parseIsoDateTime(e, [
|
|
236
|
+
const m = parseIsoDateTime(e, [Qe]);
|
|
224
237
|
o = toTemporalTimeZoneIdentifier(m.Z.$), n = m.Z.N, s = m.Z.M, i = canonicalizeCalendar(m.U || "iso8601"), d = !1, n && (d = hasUtcOffsetSubMinuteParts(n));
|
|
225
238
|
const u = getOptionsObject(t);
|
|
226
|
-
r = getTemporalDisambiguationOption(u), a = getTemporalOffsetOption(u,
|
|
239
|
+
r = getTemporalDisambiguationOption(u), a = getTemporalOffsetOption(u, X), getTemporalOverflowOption(u), l = createIsoDateRecord(m.t, m.u, m.T), c = m.p;
|
|
227
240
|
}
|
|
228
|
-
const m = s ?
|
|
229
|
-
return createZonedDateTimeSlot(interpretISODateTimeOffset(l, c, m, m ===
|
|
241
|
+
const m = s ? oe : n ? te : ne;
|
|
242
|
+
return createZonedDateTimeSlot(interpretISODateTimeOffset(l, c, m, m === te ? parseDateTimeUtcOffset(n) : 0, o, r, a, d), o, i);
|
|
230
243
|
}
|
|
231
244
|
function createTemporalZonedDateTime(e, t, o, n) {
|
|
232
|
-
return createTemporalZonedDateTimeFromSlot(createZonedDateTimeSlot(e, t, o, ((e, t) =>
|
|
245
|
+
return createTemporalZonedDateTimeFromSlot(createZonedDateTimeSlot(e, t, o, ((e, t) => Ze[e] && Ze[e].C(clampEpochSecond(t)))(t, epochSeconds(e))), n);
|
|
233
246
|
}
|
|
234
247
|
function createZonedDateTimeSlot(e, t, o, n) {
|
|
235
248
|
return {
|
|
@@ -239,34 +252,34 @@ function createZonedDateTimeSlot(e, t, o, n) {
|
|
|
239
252
|
W: n
|
|
240
253
|
};
|
|
241
254
|
}
|
|
242
|
-
function temporalZonedDateTimeToString(e, t, o, n, r, a = 1, i =
|
|
255
|
+
function temporalZonedDateTimeToString(e, t, o, n, r, a = 1, i = D, l = le) {
|
|
243
256
|
const c = roundTemporalInstant(e.Y, a, i, l), s = epochSeconds(c) === epochSeconds(e.Y) ? getOffsetNanosecondsForZonedDateTimeSlot(e) : getOffsetNanosecondsFor(e.Z, c);
|
|
244
|
-
return `${isoDateTimeToString(getIsoDateTimeFromOffsetNanoseconds(c, s), "iso8601", t,
|
|
257
|
+
return `${isoDateTimeToString(getIsoDateTimeFromOffsetNanoseconds(c, s), "iso8601", t, pe)}${r === fe ? "" : formatDateTimeUtcOffsetRounded(s)}${n === Oe ? "" : `[${n === Fe ? "!" : ""}${e.Z}]`}${formatCalendarAnnotation(e.U, o)}`;
|
|
245
258
|
}
|
|
246
259
|
function addZonedDateTime(e, t, o) {
|
|
247
260
|
if (!dateDurationSign(t.A)) return addInstant(e.Y, t.p);
|
|
248
261
|
const n = getIsoDateTimeForZonedDateTimeSlot(e);
|
|
249
|
-
return addInstant(getEpochNanosecondsFor(e.Z, validateIsoDateTime(combineIsoDateAndTimeRecord(calendarDateAdd(e.U, n.o, t.A, o), n.p)),
|
|
262
|
+
return addInstant(getEpochNanosecondsFor(e.Z, validateIsoDateTime(combineIsoDateAndTimeRecord(calendarDateAdd(e.U, n.o, t.A, o), n.p)), G), t.p);
|
|
250
263
|
}
|
|
251
264
|
function differenceZonedDateTime(e, t, o) {
|
|
252
265
|
const n = compareEpochNanoseconds(e.Y, t.Y);
|
|
253
|
-
if (!n) return combineDateAndTimeDuration(zeroDateDuration(),
|
|
266
|
+
if (!n) return combineDateAndTimeDuration(zeroDateDuration(), ye);
|
|
254
267
|
const r = getIsoDateTimeForZonedDateTimeSlot(e), a = getIsoDateTimeForZonedDateTimeSlot(t);
|
|
255
268
|
if (!compareIsoDate(r.o, a.o)) return combineDateAndTimeDuration(zeroDateDuration(), timeDurationFromEpochNanosecondsDifference(t.Y, e.Y));
|
|
256
269
|
let i, l = differenceTime(r.p, a.p);
|
|
257
|
-
for (let o =
|
|
258
|
-
return combineDateAndTimeDuration(calendarDateUntil(e.U, r.o, i.o, largerOfTwoTemporalUnits(o,
|
|
270
|
+
for (let o = It(l) === n ? 1 : 0; o <= (3 - n) / 2 && (i = combineIsoDateAndTimeRecord(addDaysToIsoDate(a.o, o * n), r.p), l = timeDurationFromEpochNanosecondsDifference(t.Y, getEpochNanosecondsFor(e.Z, i, G)), It(l) === n); o++);
|
|
271
|
+
return combineDateAndTimeDuration(calendarDateUntil(e.U, r.o, i.o, largerOfTwoTemporalUnits(o, d)), l);
|
|
259
272
|
}
|
|
260
273
|
function differenceZonedDateTimeWithRounding(e, t, o, n, r, a) {
|
|
261
274
|
if (!isDateUnit(o)) return differenceInstant(e.Y, t.Y, n, r, a);
|
|
262
275
|
const i = differenceZonedDateTime(e, t, o);
|
|
263
|
-
return r ===
|
|
276
|
+
return r === D && 1 === n ? i : roundRelativeDuration(i, e.Y, t.Y, getIsoDateTimeForZonedDateTimeSlot(e), e.Z, e.U, o, n, r, a);
|
|
264
277
|
}
|
|
265
278
|
function differenceTemporalZonedDateTime(e, t, o, n) {
|
|
266
279
|
const r = toTemporalZonedDateTime(o);
|
|
267
|
-
calendarEquals(t.U, r.U) || throwRangeError(
|
|
268
|
-
const a = getDifferenceSettings(e, getOptionsObject(n),
|
|
269
|
-
return isDateUnit(a.V) ? (timeZoneEquals(t.Z, r.Z) || throwRangeError("time zone mismatch"), compareEpochNanoseconds(t.Y, r.Y) ? createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(differenceZonedDateTimeWithRounding(t, r, a.V, a.
|
|
280
|
+
calendarEquals(t.U, r.U) || throwRangeError(M);
|
|
281
|
+
const a = getDifferenceSettings(e, getOptionsObject(n), H, [], D, m);
|
|
282
|
+
return isDateUnit(a.V) ? (timeZoneEquals(t.Z, r.Z) || throwRangeError("time zone mismatch"), compareEpochNanoseconds(t.Y, r.Y) ? createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(differenceZonedDateTimeWithRounding(t, r, a.V, a.L, a.H, a.q), m), e)) : createTemporalDuration(createTemporalDurationSlot([
|
|
270
283
|
0,
|
|
271
284
|
0,
|
|
272
285
|
0,
|
|
@@ -277,7 +290,7 @@ function differenceTemporalZonedDateTime(e, t, o, n) {
|
|
|
277
290
|
0,
|
|
278
291
|
0,
|
|
279
292
|
0
|
|
280
|
-
]))) : createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(differenceInstant(t.Y, r.Y, a.
|
|
293
|
+
]))) : createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(differenceInstant(t.Y, r.Y, a.L, a.H, a.q), a.V), e));
|
|
281
294
|
}
|
|
282
295
|
function addDurationToZonedDateTime(e, t, o, n) {
|
|
283
296
|
return createTemporalZonedDateTime(addZonedDateTime(t, toInternalDurationRecord(applySignToDurationSlot(toTemporalDuration(o), e)), getTemporalOverflowOption(getOptionsObject(n))), t.Z, t.U);
|
|
@@ -288,18 +301,17 @@ function getOffsetNanosecondsForZonedDateTimeSlot(e) {
|
|
|
288
301
|
function getIsoDateTimeForZonedDateTimeSlot(e) {
|
|
289
302
|
return getIsoDateTimeFromOffsetNanoseconds(e.Y, getOffsetNanosecondsForZonedDateTimeSlot(e));
|
|
290
303
|
}
|
|
291
|
-
function createTemporalZonedDateTimeFromSlot(e, t = Object.create(
|
|
292
|
-
return
|
|
304
|
+
function createTemporalZonedDateTimeFromSlot(e, t = Object.create(Re.prototype)) {
|
|
305
|
+
return Pe.set(t, e), t;
|
|
293
306
|
}
|
|
294
307
|
function calendarIsoToDateForZonedDateTimeSlot(e) {
|
|
295
308
|
return calendarIsoToDate(e.U, getIsoDateTimeForZonedDateTimeSlot(e).o);
|
|
296
309
|
}
|
|
297
310
|
function getInternalSlotForZonedDateTime(e) {
|
|
298
|
-
return
|
|
311
|
+
return Pe.get(e);
|
|
299
312
|
}
|
|
300
313
|
function getInternalSlotOrThrowForZonedDateTime(e) {
|
|
301
|
-
|
|
302
|
-
return t || throwTypeError(Te), t;
|
|
314
|
+
return getInternalSlotOrThrow(Pe, e);
|
|
303
315
|
}
|
|
304
316
|
function isZonedDateTime(e) {
|
|
305
317
|
return !!getInternalSlotForZonedDateTime(e);
|
|
@@ -312,7 +324,7 @@ function clampEpochSecond(e) {
|
|
|
312
324
|
}
|
|
313
325
|
function getNamedTimeZoneOffsetNanosecondsForEpochSecond(t, o, n) {
|
|
314
326
|
if ("UTC" === t) return 0;
|
|
315
|
-
const r = clampEpochSecond(o), a =
|
|
327
|
+
const r = clampEpochSecond(o), a = Ze[t] ||= (function() {
|
|
316
328
|
const e = /* @__PURE__ */ new Map();
|
|
317
329
|
return {
|
|
318
330
|
C(t) {
|
|
@@ -337,7 +349,7 @@ function getNamedTimeZoneOffsetNanosecondsForEpochSecond(t, o, n) {
|
|
|
337
349
|
return n || a.B(r, c), c;
|
|
338
350
|
}
|
|
339
351
|
function getFormatterForTimeZone(e) {
|
|
340
|
-
return
|
|
352
|
+
return be[e] ||= new wt("en-u-hc-h23", {
|
|
341
353
|
timeZone: e,
|
|
342
354
|
year: "numeric",
|
|
343
355
|
month: "numeric",
|
|
@@ -377,10 +389,10 @@ function formatOffsetTimeZoneIdentifier(e) {
|
|
|
377
389
|
}
|
|
378
390
|
function formatUtcOffsetNanoseconds(e) {
|
|
379
391
|
const n = Math.abs(e);
|
|
380
|
-
return `${e < 0 ? "-" : "+"}${formatTimeString(divFloor(n, o), modFloor(divFloor(n, t), 60), modFloor(divFloor(n, 1e9), 60), 0, n % 6e10 ? void 0 :
|
|
392
|
+
return `${e < 0 ? "-" : "+"}${formatTimeString(divFloor(n, o), modFloor(divFloor(n, t), 60), modFloor(divFloor(n, 1e9), 60), 0, n % 6e10 ? void 0 : J)}`;
|
|
381
393
|
}
|
|
382
394
|
function formatDateTimeUtcOffsetRounded(e) {
|
|
383
|
-
return formatOffsetTimeZoneIdentifier(roundNumberToIncrement(e, t,
|
|
395
|
+
return formatOffsetTimeZoneIdentifier(roundNumberToIncrement(e, t, de) / t);
|
|
384
396
|
}
|
|
385
397
|
function toTemporalTimeZoneIdentifier(e) {
|
|
386
398
|
if (isZonedDateTime(e)) return getInternalSlotOrThrowForZonedDateTime(e).Z;
|
|
@@ -388,12 +400,12 @@ function toTemporalTimeZoneIdentifier(e) {
|
|
|
388
400
|
const t = ((e) => {
|
|
389
401
|
if (isTimeZoneIdentifier(e)) return parseTimeZoneIdentifier(e);
|
|
390
402
|
const t = parseIsoDateTime(e, [
|
|
391
|
-
Ge,
|
|
392
|
-
Ke,
|
|
393
403
|
Qe,
|
|
394
404
|
et,
|
|
395
405
|
tt,
|
|
396
|
-
ot
|
|
406
|
+
ot,
|
|
407
|
+
nt,
|
|
408
|
+
rt
|
|
397
409
|
]).Z, o = t.$ || t.M && "UTC" || t.N;
|
|
398
410
|
return o || throwRangeError(invalidTimeZone(e)), parseTimeZoneIdentifier(o);
|
|
399
411
|
})(e);
|
|
@@ -406,7 +418,7 @@ function getEpochNanosecondsFor(e, t, o) {
|
|
|
406
418
|
return disambiguatePossibleEpochNanoseconds(getPossibleEpochNanoseconds(e, t), e, t, o);
|
|
407
419
|
}
|
|
408
420
|
function disambiguatePossibleEpochNanoseconds(e, t, o, n) {
|
|
409
|
-
return 1 === e.length ? e[0] : ("reject" === n && throwRangeError("ambiguity / gaps in local time"), getNamedTimeZoneEpochCandidates(t, o).map(validateEpochNanoseconds)["compatible" === n ? +!e[0] : +(n ===
|
|
421
|
+
return 1 === e.length ? e[0] : ("reject" === n && throwRangeError("ambiguity / gaps in local time"), getNamedTimeZoneEpochCandidates(t, o).map(validateEpochNanoseconds)["compatible" === n ? +!e[0] : +(n === K)]);
|
|
410
422
|
}
|
|
411
423
|
function getPossibleEpochNanoseconds(e, t) {
|
|
412
424
|
return isOffsetTimeZoneIdentifier(e) ? [validateEpochNanoseconds(getUtcEpochNanoseconds(balanceIsoDateTime(t.o.t, t.o.u, t.o.T, t.p.D, t.p.I, t.p.O, t.p.F, t.p.S, t.p.v - parseDateTimeUtcOffset(e))))] : ((e, t) => getNamedTimeZoneEpochCandidates(e, t).filter((o) => !compareEpochNanoseconds(addNanosecondsToEpochSeconds(o, getOffsetNanosecondsFor(e, o)), getUtcEpochNanoseconds(t))))(e, t).map(validateEpochNanoseconds);
|
|
@@ -443,7 +455,7 @@ function combineIsoDateAndTimeRecord(e, t) {
|
|
|
443
455
|
};
|
|
444
456
|
}
|
|
445
457
|
function interpretTemporalDateTimeFields(e, t, o) {
|
|
446
|
-
return combineIsoDateAndTimeRecord(calendarDateFromFields(e, t, o), regulateTime(t[
|
|
458
|
+
return combineIsoDateAndTimeRecord(calendarDateFromFields(e, t, o), regulateTime(t[pt.D], t[pt.I], t[pt.O], t[pt.F], t[pt.S], t[pt.v], o));
|
|
447
459
|
}
|
|
448
460
|
function toTemporalDateTime(e, t) {
|
|
449
461
|
if (isObject(e)) {
|
|
@@ -463,28 +475,28 @@ function toTemporalDateTime(e, t) {
|
|
|
463
475
|
}
|
|
464
476
|
const o = getTemporalCalendarIdentifierWithIsoDefault(e);
|
|
465
477
|
return createTemporalDateTime(interpretTemporalDateTimeFields(o, prepareCalendarFields(o, e, [
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
478
|
+
pt.t,
|
|
479
|
+
pt.u,
|
|
480
|
+
pt.P,
|
|
481
|
+
pt.T,
|
|
482
|
+
pt.D,
|
|
483
|
+
pt.I,
|
|
484
|
+
pt.O,
|
|
485
|
+
pt.F,
|
|
486
|
+
pt.S,
|
|
487
|
+
pt.v
|
|
476
488
|
], []), getTemporalOverflowOption(getOptionsObject(t))), o);
|
|
477
489
|
}
|
|
478
490
|
validateString(e);
|
|
479
|
-
const o = parseIsoDateTime(e, [
|
|
491
|
+
const o = parseIsoDateTime(e, [et]), n = canonicalizeCalendar(o.U || "iso8601");
|
|
480
492
|
return getTemporalOverflowOption(getOptionsObject(t)), createTemporalDateTime(combineIsoDateAndTimeRecord(createIsoDateRecord(o.t, o.u, o.T), o.p || midnightTimeRecord()), n);
|
|
481
493
|
}
|
|
482
494
|
function balanceIsoDateTime(e, t, o, n, r, a, i, l, c) {
|
|
483
495
|
const s = balanceTime(n, r, a, i, l, c);
|
|
484
496
|
return combineIsoDateAndTimeRecord(addDaysToIsoDate(createIsoDateRecord(e, t, o), s.X), s);
|
|
485
497
|
}
|
|
486
|
-
function createTemporalDateTime(e, t, o = Object.create(
|
|
487
|
-
return
|
|
498
|
+
function createTemporalDateTime(e, t, o = Object.create(Me.prototype)) {
|
|
499
|
+
return Ne.set(o, {
|
|
488
500
|
K: validateIsoDateTime(e),
|
|
489
501
|
U: t
|
|
490
502
|
}), o;
|
|
@@ -501,23 +513,23 @@ function roundIsoDateTime(e, t, o, n) {
|
|
|
501
513
|
}
|
|
502
514
|
function differenceISODateTime(e, t, o, n) {
|
|
503
515
|
let r = differenceTime(e.p, t.p);
|
|
504
|
-
const a =
|
|
516
|
+
const a = It(r);
|
|
505
517
|
let i = t.o;
|
|
506
518
|
a === compareIsoDate(e.o, t.o) && (i = addDaysToIsoDate(i, a), r = add24HourDaysToTimeDuration(r, -a));
|
|
507
|
-
const l = largerOfTwoTemporalUnits(
|
|
519
|
+
const l = largerOfTwoTemporalUnits(d, n), c = calendarDateUntil(o, e.o, i, l);
|
|
508
520
|
return n !== l && (r = add24HourDaysToTimeDuration(r, c.X), c.X = 0), combineDateAndTimeDuration(c, r);
|
|
509
521
|
}
|
|
510
522
|
function differencePlainDateTimeWithRounding(e, t, o, n, r, a, i) {
|
|
511
|
-
if (!compareIsoDateTime(e, t)) return combineDateAndTimeDuration(zeroDateDuration(),
|
|
523
|
+
if (!compareIsoDateTime(e, t)) return combineDateAndTimeDuration(zeroDateDuration(), ye);
|
|
512
524
|
validateIsoDateTime(e), validateIsoDateTime(t);
|
|
513
525
|
const l = differenceISODateTime(e, t, o, n);
|
|
514
|
-
return a ===
|
|
526
|
+
return a === D && 1 === r ? l : roundRelativeDuration(l, getUtcEpochNanoseconds(e), getUtcEpochNanoseconds(t), e, void 0, o, n, r, a, i);
|
|
515
527
|
}
|
|
516
528
|
function differenceTemporalPlainDateTime(e, t, o, n) {
|
|
517
529
|
const r = getInternalSlotOrThrowForPlainDateTime(toTemporalDateTime(o));
|
|
518
|
-
calendarEquals(t.U, r.U) || throwRangeError(
|
|
519
|
-
const a = getDifferenceSettings(e, getOptionsObject(n),
|
|
520
|
-
return compareIsoDateTime(t.K, r.K) ? createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(differencePlainDateTimeWithRounding(t.K, r.K, t.U, a.V, a.
|
|
530
|
+
calendarEquals(t.U, r.U) || throwRangeError(M);
|
|
531
|
+
const a = getDifferenceSettings(e, getOptionsObject(n), H, [], D, d);
|
|
532
|
+
return compareIsoDateTime(t.K, r.K) ? createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(differencePlainDateTimeWithRounding(t.K, r.K, t.U, a.V, a.L, a.H, a.q), a.V), e)) : createTemporalDuration(createTemporalDurationSlot([
|
|
521
533
|
0,
|
|
522
534
|
0,
|
|
523
535
|
0,
|
|
@@ -538,14 +550,13 @@ function validateIsoDateTime(e) {
|
|
|
538
550
|
return ((e) => {
|
|
539
551
|
const t = isoDateRecordToEpochDays(e.o);
|
|
540
552
|
return Math.abs(t) <= 1e8 || -100000001 === t && !!compareTimeRecord(e.p, midnightTimeRecord());
|
|
541
|
-
})(e) || throwRangeError(
|
|
553
|
+
})(e) || throwRangeError(b), e;
|
|
542
554
|
}
|
|
543
555
|
function getInternalSlotForPlainDateTime(e) {
|
|
544
|
-
return
|
|
556
|
+
return Ne.get(e);
|
|
545
557
|
}
|
|
546
558
|
function getInternalSlotOrThrowForPlainDateTime(e) {
|
|
547
|
-
|
|
548
|
-
return t || throwTypeError(Te), t;
|
|
559
|
+
return getInternalSlotOrThrow(Ne, e);
|
|
549
560
|
}
|
|
550
561
|
function isPlainDateTime(e) {
|
|
551
562
|
return !!getInternalSlotForPlainDateTime(e);
|
|
@@ -574,14 +585,14 @@ function differenceTime(e, t) {
|
|
|
574
585
|
function toTemporalTime(e, t) {
|
|
575
586
|
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)));
|
|
576
587
|
validateString(e);
|
|
577
|
-
const o = parseIsoDateTime(e, [
|
|
588
|
+
const o = parseIsoDateTime(e, [ot]);
|
|
578
589
|
return getTemporalOverflowOption(getOptionsObject(t)), o.p;
|
|
579
590
|
}
|
|
580
591
|
function toTimeRecordOrMidnight(e) {
|
|
581
592
|
return void 0 === e ? midnightTimeRecord() : toTemporalTime(e);
|
|
582
593
|
}
|
|
583
594
|
function regulateTime(e, t, o, n, r, a, i) {
|
|
584
|
-
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)) : (isValidTime(e, t, o, n, r, a) || throwRangeError(
|
|
595
|
+
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)) : (isValidTime(e, t, o, n, r, a) || throwRangeError(R), createTimeRecord(e, t, o, n, r, a));
|
|
585
596
|
}
|
|
586
597
|
function isValidTime(e, t, o, n, r, a) {
|
|
587
598
|
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);
|
|
@@ -597,23 +608,23 @@ function balanceTime(e, t, o, n, r, a) {
|
|
|
597
608
|
X: divFloor(e, 24)
|
|
598
609
|
};
|
|
599
610
|
}
|
|
600
|
-
function createTemporalTime(e, t = Object.create(
|
|
601
|
-
return
|
|
611
|
+
function createTemporalTime(e, t = Object.create(je.prototype)) {
|
|
612
|
+
return Ue.set(t, e), t;
|
|
602
613
|
}
|
|
603
614
|
function toTemporalTimeRecord(e, t = !1) {
|
|
604
615
|
let o = !1;
|
|
605
616
|
const n = [
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
617
|
+
pt.D,
|
|
618
|
+
pt.S,
|
|
619
|
+
pt.F,
|
|
620
|
+
pt.I,
|
|
621
|
+
pt.v,
|
|
622
|
+
pt.O
|
|
612
623
|
].map((n) => {
|
|
613
624
|
const r = e[n];
|
|
614
625
|
return void 0 !== r ? (o = !0, toIntegerWithTruncation(r)) : t ? void 0 : 0;
|
|
615
626
|
});
|
|
616
|
-
return o || throwTypeError(
|
|
627
|
+
return o || throwTypeError(C), [
|
|
617
628
|
0,
|
|
618
629
|
3,
|
|
619
630
|
5,
|
|
@@ -637,18 +648,17 @@ function roundTime(e, n, r, a) {
|
|
|
637
648
|
return balanceTime(0, 0, 0, 0, 0, divFloor(l, i) * i + roundNumberToIncrement(modFloor(l, i), n * nanosecondsForTimeUnit(r), a));
|
|
638
649
|
}
|
|
639
650
|
function differenceTemporalPlainTime(e, t, o, n) {
|
|
640
|
-
const r = toTemporalTime(o), a = getDifferenceSettings(e, getOptionsObject(n),
|
|
641
|
-
return createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(combineDateAndTimeDuration(zeroDateDuration(), roundTimeDuration(differenceTime(t, r), a.
|
|
651
|
+
const r = toTemporalTime(o), a = getDifferenceSettings(e, getOptionsObject(n), L, [], D, m);
|
|
652
|
+
return createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(combineDateAndTimeDuration(zeroDateDuration(), roundTimeDuration(differenceTime(t, r), a.L, a.H, a.q)), a.V), e));
|
|
642
653
|
}
|
|
643
654
|
function addDurationToTime(e, t, o) {
|
|
644
655
|
return createTemporalTime(addTime(t, toInternalDurationRecord(applySignToDurationSlot(toTemporalDuration(o), e)).p));
|
|
645
656
|
}
|
|
646
657
|
function getInternalSlotOrThrowForPlainTime(e) {
|
|
647
|
-
|
|
648
|
-
return t || throwTypeError(Te), t;
|
|
658
|
+
return getInternalSlotOrThrow(Ue, e);
|
|
649
659
|
}
|
|
650
660
|
function isPlainTime(e) {
|
|
651
|
-
return
|
|
661
|
+
return Ue.has(e);
|
|
652
662
|
}
|
|
653
663
|
function optionalChain(e) {
|
|
654
664
|
return e.reduceRight((e, t) => `${t}(?:${e})?`);
|
|
@@ -660,31 +670,31 @@ function createRegExp(e) {
|
|
|
660
670
|
return RegExp(`^(?:${e})$`);
|
|
661
671
|
}
|
|
662
672
|
function isAmbiguousTemporalTimeString(e) {
|
|
663
|
-
return
|
|
673
|
+
return at.some((t) => isSemanticallyValid(e.match(t)?.groups));
|
|
664
674
|
}
|
|
665
675
|
function isTimeZoneIdentifier(e) {
|
|
666
|
-
return
|
|
676
|
+
return it.test(e);
|
|
667
677
|
}
|
|
668
678
|
function isSemanticallyValid(e) {
|
|
669
|
-
return !!e && "-000000" !== (e.a || e.l) && (!e.a || isValidIsoDate(
|
|
679
|
+
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)));
|
|
670
680
|
}
|
|
671
681
|
function parseIsoDateTime(e, t) {
|
|
672
682
|
for (const o of t) {
|
|
673
683
|
const t = e.match(o);
|
|
674
|
-
if (!t || !isSemanticallyValid(t.groups) || o ===
|
|
684
|
+
if (!t || !isSemanticallyValid(t.groups) || o === ot && isAmbiguousTemporalTimeString(e)) continue;
|
|
675
685
|
const n = t.groups;
|
|
676
686
|
let r;
|
|
677
687
|
if (n.k) {
|
|
678
688
|
let t = !1;
|
|
679
|
-
for (const [, o, a, i] of n.k.matchAll(
|
|
689
|
+
for (const [, o, a, i] of n.k.matchAll(Ke)) "u-ca" === a ? r ? (o || t) && throwRangeError(parseError(e)) : (r = i, t = !!o) : o && throwRangeError(parseError(e));
|
|
680
690
|
}
|
|
681
691
|
n.m && r && "iso8601" !== asciiLowerCase(r) && throwRangeError(parseError(e));
|
|
682
692
|
const a = (n.g || "").padEnd(9, "0");
|
|
683
693
|
return {
|
|
684
|
-
t: mapUnlessUndefined(n.a || n.l,
|
|
685
|
-
u:
|
|
686
|
-
T:
|
|
687
|
-
p: n.d ? createTimeRecord(
|
|
694
|
+
t: mapUnlessUndefined(n.a || n.l, Se),
|
|
695
|
+
u: Se(n.b || n.m || 1),
|
|
696
|
+
T: Se(n.c || n.n || 1),
|
|
697
|
+
p: n.d ? createTimeRecord(Se(n.d || 0), Se(n.e || 0), clamp(Se(n.f || 0), 0, 59), Se(a.slice(0, 3)), Se(a.slice(3, 6)), Se(a.slice(6))) : void 0,
|
|
688
698
|
Z: {
|
|
689
699
|
M: !!n.i,
|
|
690
700
|
N: n.h,
|
|
@@ -696,11 +706,11 @@ function parseIsoDateTime(e, t) {
|
|
|
696
706
|
throwRangeError(parseError(e));
|
|
697
707
|
}
|
|
698
708
|
function parseDateTimeUtcOffset(e) {
|
|
699
|
-
const o = e.match(
|
|
700
|
-
return o || throwRangeError(parseError(e)),
|
|
709
|
+
const o = e.match(ct);
|
|
710
|
+
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);
|
|
701
711
|
}
|
|
702
712
|
function hasUtcOffsetSubMinuteParts(e) {
|
|
703
|
-
return !!e.match(
|
|
713
|
+
return !!e.match(ct)[5];
|
|
704
714
|
}
|
|
705
715
|
function toTemporalMonthDay(e, t) {
|
|
706
716
|
if (isObject(e)) {
|
|
@@ -708,31 +718,30 @@ function toTemporalMonthDay(e, t) {
|
|
|
708
718
|
if (o) return getTemporalOverflowOption(getOptionsObject(t)), createTemporalMonthDay(o.o, o.U);
|
|
709
719
|
const n = getTemporalCalendarIdentifierWithIsoDefault(e);
|
|
710
720
|
return createTemporalMonthDay(calendarMonthDayFromFields(n, prepareCalendarFields(n, e, [
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
721
|
+
pt.t,
|
|
722
|
+
pt.u,
|
|
723
|
+
pt.P,
|
|
724
|
+
pt.T
|
|
715
725
|
], []), getTemporalOverflowOption(getOptionsObject(t))), n);
|
|
716
726
|
}
|
|
717
727
|
validateString(e);
|
|
718
|
-
const o = parseIsoDateTime(e, [
|
|
719
|
-
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)),
|
|
728
|
+
const o = parseIsoDateTime(e, [nt]), n = canonicalizeCalendar(o.U || "iso8601");
|
|
729
|
+
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);
|
|
720
730
|
}
|
|
721
|
-
function createTemporalMonthDay(e, t, o = Object.create(
|
|
722
|
-
return
|
|
731
|
+
function createTemporalMonthDay(e, t, o = Object.create(dt.prototype)) {
|
|
732
|
+
return st.set(o, {
|
|
723
733
|
o: validateIsoDate(e),
|
|
724
734
|
U: t
|
|
725
735
|
}), o;
|
|
726
736
|
}
|
|
727
737
|
function temporalMonthDayToString(e, t) {
|
|
728
|
-
return `${t ===
|
|
738
|
+
return `${t === De || t === he || "iso8601" !== e.U ? `${padIsoYear(e.o.t)}-` : ""}${toZeroPaddedDecimalString(e.o.u, 2)}-${toZeroPaddedDecimalString(e.o.T, 2)}${formatCalendarAnnotation(e.U, t)}`;
|
|
729
739
|
}
|
|
730
740
|
function getInternalSlotForPlainMonthDay(e) {
|
|
731
|
-
return
|
|
741
|
+
return st.get(e);
|
|
732
742
|
}
|
|
733
743
|
function getInternalSlotOrThrowForPlainMonthDay(e) {
|
|
734
|
-
|
|
735
|
-
return t || throwTypeError(Te), t;
|
|
744
|
+
return getInternalSlotOrThrow(st, e);
|
|
736
745
|
}
|
|
737
746
|
function isPlainMonthDay(e) {
|
|
738
747
|
return !!getInternalSlotForPlainMonthDay(e);
|
|
@@ -743,14 +752,14 @@ function toTemporalYearMonth(e, t) {
|
|
|
743
752
|
if (o) return getTemporalOverflowOption(getOptionsObject(t)), createTemporalYearMonth(o.o, o.U);
|
|
744
753
|
const n = getTemporalCalendarIdentifierWithIsoDefault(e);
|
|
745
754
|
return createTemporalYearMonth(calendarYearMonthFromFields(n, prepareCalendarFields(n, e, [
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
755
|
+
pt.t,
|
|
756
|
+
pt.u,
|
|
757
|
+
pt.P
|
|
749
758
|
], []), getTemporalOverflowOption(getOptionsObject(t))), n);
|
|
750
759
|
}
|
|
751
760
|
validateString(e);
|
|
752
|
-
const o = parseIsoDateTime(e, [
|
|
753
|
-
return getTemporalOverflowOption(getOptionsObject(t)), createTemporalYearMonth(calendarYearMonthFromFields(n, isoDateToFields(n, validateIsoYearMonth(createIsoDateRecord(o.t, o.u, o.T)),
|
|
761
|
+
const o = parseIsoDateTime(e, [rt]), n = canonicalizeCalendar(o.U || "iso8601");
|
|
762
|
+
return getTemporalOverflowOption(getOptionsObject(t)), createTemporalYearMonth(calendarYearMonthFromFields(n, isoDateToFields(n, validateIsoYearMonth(createIsoDateRecord(o.t, o.u, o.T)), x), _), n);
|
|
754
763
|
}
|
|
755
764
|
function balanceIsoYearMonth(e, t) {
|
|
756
765
|
return {
|
|
@@ -758,19 +767,19 @@ function balanceIsoYearMonth(e, t) {
|
|
|
758
767
|
u: modFloor(t - 1, 12) + 1
|
|
759
768
|
};
|
|
760
769
|
}
|
|
761
|
-
function createTemporalYearMonth(e, t, o = Object.create(
|
|
762
|
-
return
|
|
770
|
+
function createTemporalYearMonth(e, t, o = Object.create(ut.prototype)) {
|
|
771
|
+
return mt.set(o, {
|
|
763
772
|
o: validateIsoYearMonth(e),
|
|
764
773
|
U: t
|
|
765
774
|
}), o;
|
|
766
775
|
}
|
|
767
776
|
function temporalYearMonthToString(e, t) {
|
|
768
|
-
return `${padIsoYear(e.o.t)}-${toZeroPaddedDecimalString(e.o.u, 2)}${t ===
|
|
777
|
+
return `${padIsoYear(e.o.t)}-${toZeroPaddedDecimalString(e.o.u, 2)}${t === De || t === he || "iso8601" !== e.U ? `-${toZeroPaddedDecimalString(e.o.T, 2)}` : ""}${formatCalendarAnnotation(e.U, t)}`;
|
|
769
778
|
}
|
|
770
779
|
function differenceTemporalPlainYearMonth(e, t, o, n) {
|
|
771
780
|
const r = getInternalSlotOrThrowForPlainYearMonth(toTemporalYearMonth(o));
|
|
772
|
-
calendarEquals(t.U, r.U) || throwRangeError(
|
|
773
|
-
const a = getDifferenceSettings(e, getOptionsObject(n),
|
|
781
|
+
calendarEquals(t.U, r.U) || throwRangeError(M);
|
|
782
|
+
const a = getDifferenceSettings(e, getOptionsObject(n), V, [s, d], c, l);
|
|
774
783
|
if (!compareIsoDate(t.o, r.o)) return createTemporalDuration(createTemporalDurationSlot([
|
|
775
784
|
0,
|
|
776
785
|
0,
|
|
@@ -784,35 +793,34 @@ function differenceTemporalPlainYearMonth(e, t, o, n) {
|
|
|
784
793
|
0
|
|
785
794
|
]));
|
|
786
795
|
const i = calendarDateFromFields(t.U, createNullPrototypeObject({
|
|
787
|
-
...isoDateToFields(t.U, t.o,
|
|
788
|
-
[
|
|
789
|
-
}),
|
|
790
|
-
...isoDateToFields(t.U, r.o,
|
|
791
|
-
[
|
|
792
|
-
}),
|
|
793
|
-
let
|
|
794
|
-
if (a.
|
|
796
|
+
...isoDateToFields(t.U, t.o, x),
|
|
797
|
+
[pt.T]: 1
|
|
798
|
+
}), _), m = calendarDateFromFields(t.U, createNullPrototypeObject({
|
|
799
|
+
...isoDateToFields(t.U, r.o, x),
|
|
800
|
+
[pt.T]: 1
|
|
801
|
+
}), _);
|
|
802
|
+
let u = combineDateAndTimeDuration(adjustDateDurationRecord(calendarDateUntil(t.U, i, m, a.V), 0, 0), ye);
|
|
803
|
+
if (a.H !== c || 1 !== a.L) {
|
|
795
804
|
const e = combineIsoDateAndTimeRecord(i, midnightTimeRecord());
|
|
796
|
-
|
|
805
|
+
u = roundRelativeDuration(u, getUtcEpochNanoseconds(e), getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(m, midnightTimeRecord())), e, void 0, t.U, a.V, a.L, a.H, a.q);
|
|
797
806
|
}
|
|
798
|
-
return createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(
|
|
807
|
+
return createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(u, d), e));
|
|
799
808
|
}
|
|
800
809
|
function addDurationToYearMonth(e, t, o, n) {
|
|
801
810
|
const r = toInternalDurationRecord(applySignToDurationSlot(toTemporalDuration(o), e)), a = getTemporalOverflowOption(getOptionsObject(n));
|
|
802
811
|
return (r.A.ee || r.A.X || signTimeDuration(r.p)) && throwRangeError("duration can contain only years and months"), createTemporalYearMonth(calendarYearMonthFromFields(t.U, isoDateToFields(t.U, calendarDateAdd(t.U, calendarDateFromFields(t.U, createNullPrototypeObject({
|
|
803
|
-
...isoDateToFields(t.U, t.o,
|
|
804
|
-
[
|
|
805
|
-
}),
|
|
812
|
+
...isoDateToFields(t.U, t.o, x),
|
|
813
|
+
[pt.T]: 1
|
|
814
|
+
}), _), r.A, a), x), a), t.U);
|
|
806
815
|
}
|
|
807
816
|
function validateIsoYearMonth(e) {
|
|
808
|
-
return ((e) => isWithin(12 * e.t + e.u, -3261848, 3309129))(e) || throwRangeError(
|
|
817
|
+
return ((e) => isWithin(12 * e.t + e.u, -3261848, 3309129))(e) || throwRangeError(b), e;
|
|
809
818
|
}
|
|
810
819
|
function getInternalSlotForPlainYearMonth(e) {
|
|
811
|
-
return
|
|
820
|
+
return mt.get(e);
|
|
812
821
|
}
|
|
813
822
|
function getInternalSlotOrThrowForPlainYearMonth(e) {
|
|
814
|
-
|
|
815
|
-
return t || throwTypeError(Te), t;
|
|
823
|
+
return getInternalSlotOrThrow(mt, e);
|
|
816
824
|
}
|
|
817
825
|
function isPlainYearMonth(e) {
|
|
818
826
|
return !!getInternalSlotForPlainYearMonth(e);
|
|
@@ -828,8 +836,8 @@ function createIsoDateRecord(e, t, o) {
|
|
|
828
836
|
T: o
|
|
829
837
|
};
|
|
830
838
|
}
|
|
831
|
-
function createTemporalDate(e, t, o = Object.create(
|
|
832
|
-
return
|
|
839
|
+
function createTemporalDate(e, t, o = Object.create(Dt.prototype)) {
|
|
840
|
+
return Tt.set(o, {
|
|
833
841
|
o: validateIsoDate(e),
|
|
834
842
|
U: t
|
|
835
843
|
}), o;
|
|
@@ -853,18 +861,18 @@ function toTemporalDate(e, t) {
|
|
|
853
861
|
}
|
|
854
862
|
const o = getTemporalCalendarIdentifierWithIsoDefault(e);
|
|
855
863
|
return createTemporalDate(calendarDateFromFields(o, prepareCalendarFields(o, e, [
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
864
|
+
pt.t,
|
|
865
|
+
pt.u,
|
|
866
|
+
pt.P,
|
|
867
|
+
pt.T
|
|
860
868
|
], []), getTemporalOverflowOption(getOptionsObject(t))), o);
|
|
861
869
|
}
|
|
862
870
|
validateString(e);
|
|
863
|
-
const o = parseIsoDateTime(e, [
|
|
871
|
+
const o = parseIsoDateTime(e, [et]), n = canonicalizeCalendar(o.U || "iso8601");
|
|
864
872
|
return getTemporalOverflowOption(getOptionsObject(t)), createTemporalDate(createIsoDateRecord(o.t, o.u, o.T), n);
|
|
865
873
|
}
|
|
866
874
|
function regulateIsoDate(e, t, o, n) {
|
|
867
|
-
return "constrain" === n ? createIsoDateRecord(e, t = clamp(t, 1, 12), clamp(o, 1, isoDaysInMonth(e, t))) : (isValidIsoDate(e, t, o) || throwRangeError(
|
|
875
|
+
return "constrain" === n ? createIsoDateRecord(e, t = clamp(t, 1, 12), clamp(o, 1, isoDaysInMonth(e, t))) : (isValidIsoDate(e, t, o) || throwRangeError(R), createIsoDateRecord(e, t, o));
|
|
868
876
|
}
|
|
869
877
|
function isValidIsoDate(e, t, o) {
|
|
870
878
|
return isWithin(t, 1, 12) && isWithin(o, 1, isoDaysInMonth(e, t));
|
|
@@ -883,8 +891,8 @@ function compareIsoDate(e, t) {
|
|
|
883
891
|
}
|
|
884
892
|
function differenceTemporalPlainDate(e, t, o, n) {
|
|
885
893
|
const r = getInternalSlotOrThrowForPlainDate(toTemporalDate(o));
|
|
886
|
-
calendarEquals(t.U, r.U) || throwRangeError(
|
|
887
|
-
const a = getDifferenceSettings(e, getOptionsObject(n),
|
|
894
|
+
calendarEquals(t.U, r.U) || throwRangeError(M);
|
|
895
|
+
const a = getDifferenceSettings(e, getOptionsObject(n), V, [], d, d);
|
|
888
896
|
if (!compareIsoDate(t.o, r.o)) return createTemporalDuration(createTemporalDurationSlot([
|
|
889
897
|
0,
|
|
890
898
|
0,
|
|
@@ -897,12 +905,12 @@ function differenceTemporalPlainDate(e, t, o, n) {
|
|
|
897
905
|
0,
|
|
898
906
|
0
|
|
899
907
|
]));
|
|
900
|
-
let i = combineDateAndTimeDuration(calendarDateUntil(t.U, t.o, r.o, a.V),
|
|
901
|
-
if (a.
|
|
908
|
+
let i = combineDateAndTimeDuration(calendarDateUntil(t.U, t.o, r.o, a.V), ye);
|
|
909
|
+
if (a.H !== d || 1 !== a.L) {
|
|
902
910
|
const e = combineIsoDateAndTimeRecord(t.o, midnightTimeRecord());
|
|
903
|
-
i = roundRelativeDuration(i, getUtcEpochNanoseconds(e), getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(r.o, midnightTimeRecord())), e, void 0, t.U, a.V, a.
|
|
911
|
+
i = roundRelativeDuration(i, getUtcEpochNanoseconds(e), getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(r.o, midnightTimeRecord())), e, void 0, t.U, a.V, a.L, a.H, a.q);
|
|
904
912
|
}
|
|
905
|
-
return createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(i,
|
|
913
|
+
return createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(i, d), e));
|
|
906
914
|
}
|
|
907
915
|
function addDurationToDate(e, t, o, n) {
|
|
908
916
|
return createTemporalDate(calendarDateAdd(t.U, t.o, ((e) => {
|
|
@@ -911,11 +919,10 @@ function addDurationToDate(e, t, o, n) {
|
|
|
911
919
|
})(applySignToDurationSlot(toTemporalDuration(o), e)), getTemporalOverflowOption(getOptionsObject(n))), t.U);
|
|
912
920
|
}
|
|
913
921
|
function getInternalSlotForPlainDate(e) {
|
|
914
|
-
return
|
|
922
|
+
return Tt.get(e);
|
|
915
923
|
}
|
|
916
924
|
function getInternalSlotOrThrowForPlainDate(e) {
|
|
917
|
-
|
|
918
|
-
return t || throwTypeError(Te), t;
|
|
925
|
+
return getInternalSlotOrThrow(Tt, e);
|
|
919
926
|
}
|
|
920
927
|
function isPlainDate(e) {
|
|
921
928
|
return !!getInternalSlotForPlainDate(e);
|
|
@@ -940,16 +947,16 @@ function calendarDateUntil(e, t, o, n) {
|
|
|
940
947
|
return ((e, t, o) => {
|
|
941
948
|
const n = compareIsoDate(t, e);
|
|
942
949
|
if (!n) return zeroDateDuration();
|
|
943
|
-
if (o ===
|
|
950
|
+
if (o === s || o === d) {
|
|
944
951
|
const n = isoDateToEpochDays(t.t, t.u - 1, t.T) - isoDateToEpochDays(e.t, e.u - 1, e.T);
|
|
945
|
-
return o ===
|
|
952
|
+
return o === s ? createDateDurationRecord(0, 0, divTrunc(n, 7) + 0, n % 7 + 0) : createDateDurationRecord(0, 0, 0, n);
|
|
946
953
|
}
|
|
947
|
-
const r = 12 * t.t + t.u - 12 * e.t - e.u - (n * (e.T - t.T) > 0 ? n : 0), a = balanceIsoYearMonth(e.t, e.u + r), i = isoDateRecordToEpochDays(t) - isoDateRecordToEpochDays(regulateIsoDate(a.t, a.u, e.T,
|
|
948
|
-
return o ===
|
|
954
|
+
const r = 12 * t.t + t.u - 12 * e.t - e.u - (n * (e.T - t.T) > 0 ? n : 0), a = balanceIsoYearMonth(e.t, e.u + r), i = isoDateRecordToEpochDays(t) - isoDateRecordToEpochDays(regulateIsoDate(a.t, a.u, e.T, _));
|
|
955
|
+
return o === l ? createDateDurationRecord(divTrunc(r, 12), r % 12 + 0, 0, i) : createDateDurationRecord(0, r, 0, i);
|
|
949
956
|
})(t, o, n);
|
|
950
957
|
}
|
|
951
958
|
function calendarDateToIso(e, t, o) {
|
|
952
|
-
return ((e, t) => regulateIsoDate(e[
|
|
959
|
+
return ((e, t) => regulateIsoDate(e[pt.t], e[pt.u], e[pt.T], t))(t, o);
|
|
953
960
|
}
|
|
954
961
|
function calendarSupportsEra(e) {
|
|
955
962
|
return "gregory" === e;
|
|
@@ -961,7 +968,7 @@ function parseMonthCode(e) {
|
|
|
961
968
|
const t = toPrimitive(e);
|
|
962
969
|
validateString(t);
|
|
963
970
|
const o = t.match(/M(\d\d)(L?)/);
|
|
964
|
-
return o && "M00" !== t || throwRangeError(invalidMonthCode(t)), [
|
|
971
|
+
return o && "M00" !== t || throwRangeError(invalidMonthCode(t)), [Se(o[1]), !!o[2]];
|
|
965
972
|
}
|
|
966
973
|
function createMonthCode(e, t = !1) {
|
|
967
974
|
return `M${toZeroPaddedDecimalString(e, 2)}${t ? "L" : ""}`;
|
|
@@ -972,16 +979,16 @@ function prepareCalendarFields(e, t, o, n) {
|
|
|
972
979
|
let a = !1;
|
|
973
980
|
for (const e of o) {
|
|
974
981
|
const o = t[e];
|
|
975
|
-
void 0 !== o ? (a = !0, r[e] =
|
|
982
|
+
void 0 !== o ? (a = !0, r[e] = gt[e][0](o)) : n && (n.includes(e) && throwTypeError(missingField(e)), r[e] = gt[e][1]);
|
|
976
983
|
}
|
|
977
|
-
return n || a || throwTypeError(
|
|
984
|
+
return n || a || throwTypeError(C), r;
|
|
978
985
|
}
|
|
979
986
|
function calendarMergeFields(e, t, o) {
|
|
980
987
|
const n = ((e, t) => {
|
|
981
988
|
const o = [];
|
|
982
|
-
return void 0 !== t[
|
|
989
|
+
return void 0 !== t[pt.u] && o.push(pt.P), void 0 !== t[pt.P] && o.push(pt.u), !calendarSupportsEra(e) || void 0 === t[pt.ne] && void 0 === t[pt.re] && void 0 === t[pt.t] || o.push(pt.ne, pt.re, pt.t), o;
|
|
983
990
|
})(e, o), r = createEmptyCalendarFieldsRecord();
|
|
984
|
-
for (const e of
|
|
991
|
+
for (const e of ht) void 0 === t[e] || n.includes(e) || (r[e] = t[e]), void 0 !== o[e] && (r[e] = o[e]);
|
|
985
992
|
return r;
|
|
986
993
|
}
|
|
987
994
|
function toTemporalCalendarIdentifier(e) {
|
|
@@ -989,15 +996,15 @@ function toTemporalCalendarIdentifier(e) {
|
|
|
989
996
|
return t ? t.U : (validateString(e), canonicalizeCalendar(((e) => {
|
|
990
997
|
try {
|
|
991
998
|
return parseIsoDateTime(e, [
|
|
992
|
-
Ge,
|
|
993
|
-
Ke,
|
|
994
999
|
Qe,
|
|
995
1000
|
et,
|
|
996
1001
|
tt,
|
|
997
|
-
ot
|
|
1002
|
+
ot,
|
|
1003
|
+
nt,
|
|
1004
|
+
rt
|
|
998
1005
|
]).U || "iso8601";
|
|
999
1006
|
} catch {
|
|
1000
|
-
return
|
|
1007
|
+
return lt.test(e) || throwRangeError(parseError(e)), e;
|
|
1001
1008
|
}
|
|
1002
1009
|
})(e)));
|
|
1003
1010
|
}
|
|
@@ -1009,18 +1016,18 @@ function calendarDateFromFields(e, t, o) {
|
|
|
1009
1016
|
return calendarResolveFields(e, t), validateIsoDate(calendarDateToIso(0, t, o));
|
|
1010
1017
|
}
|
|
1011
1018
|
function calendarYearMonthFromFields(e, t, o) {
|
|
1012
|
-
return t.day = 1, calendarResolveFields(e, t,
|
|
1019
|
+
return t.day = 1, calendarResolveFields(e, t, x), validateIsoYearMonth(calendarDateToIso(0, t, o));
|
|
1013
1020
|
}
|
|
1014
1021
|
function calendarMonthDayFromFields(e, t, o) {
|
|
1015
|
-
return calendarResolveFields(e, t,
|
|
1022
|
+
return calendarResolveFields(e, t, q), (function(e, t, o) {
|
|
1016
1023
|
return ((e, t, o) => {
|
|
1017
|
-
const n = regulateIsoDate(e[
|
|
1024
|
+
const n = regulateIsoDate(e[pt.t] ?? 1972, e[pt.u], e[pt.T], t);
|
|
1018
1025
|
return o || validateIsoDate(n), createIsoDateRecord(1972, n.u, n.T);
|
|
1019
1026
|
})(t, o, "iso8601" === e);
|
|
1020
1027
|
})(e, t, o);
|
|
1021
1028
|
}
|
|
1022
1029
|
function formatCalendarAnnotation(e, t) {
|
|
1023
|
-
return t ===
|
|
1030
|
+
return t === pe || t === Te && "iso8601" === e ? "" : `[${t === he ? "!" : ""}u-ca=${e}]`;
|
|
1024
1031
|
}
|
|
1025
1032
|
function calendarEquals(e, t) {
|
|
1026
1033
|
return e === t;
|
|
@@ -1082,20 +1089,20 @@ function calendarExtraFields(e, t) {
|
|
|
1082
1089
|
return calendarSupportsEra(e) && t.includes("year") ? ["era", "eraYear"] : [];
|
|
1083
1090
|
}
|
|
1084
1091
|
function isoResolveFields(e, t) {
|
|
1085
|
-
t !==
|
|
1086
|
-
const o = mapUnlessUndefined(e[
|
|
1087
|
-
o && ((o[0] > 12 || o[1] || void 0 !== e[
|
|
1088
|
-
}
|
|
1089
|
-
function calendarResolveFields(e, t, o =
|
|
1090
|
-
"iso8601" === e ? isoResolveFields(t, o) : (function(e, t, o =
|
|
1091
|
-
const n = t[
|
|
1092
|
-
let a = t[
|
|
1093
|
-
const i = t[
|
|
1094
|
-
if (o ===
|
|
1092
|
+
t !== q && void 0 === e[pt.t] && throwTypeError(missingField(pt.t)), t !== x && void 0 === e[pt.T] && throwTypeError(missingField(pt.T)), void 0 === e[pt.P] && void 0 === e[pt.u] && throwTypeError(missingField("month, monthCode"));
|
|
1093
|
+
const o = mapUnlessUndefined(e[pt.P], parseMonthCode);
|
|
1094
|
+
o && ((o[0] > 12 || o[1] || void 0 !== e[pt.u] && o[0] !== e[pt.u]) && throwRangeError(j), e[pt.u] = o[0]);
|
|
1095
|
+
}
|
|
1096
|
+
function calendarResolveFields(e, t, o = V) {
|
|
1097
|
+
"iso8601" === e ? isoResolveFields(t, o) : (function(e, t, o = V) {
|
|
1098
|
+
const n = t[pt.ne], r = t[pt.re];
|
|
1099
|
+
let a = t[pt.t];
|
|
1100
|
+
const i = t[pt.P], l = t[pt.u], c = t[pt.T];
|
|
1101
|
+
if (o === q && void 0 !== i && void 0 === l || void 0 !== a || void 0 !== n && void 0 !== r || throwTypeError(missingField("year, era, eraYear")), void 0 === n != (void 0 === r) && throwTypeError(), o !== x && void 0 === c && throwTypeError(missingField("day")), l === i && throwTypeError(missingField("month, monthCode")), void 0 !== r) {
|
|
1095
1102
|
const e = ((e, t, o) => "ce" === canonicalizeEraInCalendar(0, t) ? o : 1 - o)(0, canonicalizeEraInCalendar(0, n), r);
|
|
1096
|
-
void 0 !== a && a !== e && throwRangeError("mismatch of `year`, `era` and `eraYear`"), t[
|
|
1103
|
+
void 0 !== a && a !== e && throwRangeError("mismatch of `year`, `era` and `eraYear`"), t[pt.t] = e;
|
|
1097
1104
|
}
|
|
1098
|
-
t[
|
|
1105
|
+
t[pt.ne] = t[pt.re] = void 0, isoResolveFields(t, o);
|
|
1099
1106
|
})(0, t, o);
|
|
1100
1107
|
}
|
|
1101
1108
|
function createEmptyCalendarFieldsRecord() {
|
|
@@ -1105,7 +1112,7 @@ function zeroDateDuration() {
|
|
|
1105
1112
|
return createDateDurationRecord(0, 0, 0, 0);
|
|
1106
1113
|
}
|
|
1107
1114
|
function toInternalDurationRecord(e) {
|
|
1108
|
-
return combineDateAndTimeDuration(createDateDurationRecord(e[
|
|
1115
|
+
return combineDateAndTimeDuration(createDateDurationRecord(e[p], e[h], e[g], e[f]), timeDurationFromComponents(e[I], e[O], e[F], e[S], e[w], e[v]));
|
|
1109
1116
|
}
|
|
1110
1117
|
function toInternalDurationRecordWith24HourDays([e, t, o, n, ...r]) {
|
|
1111
1118
|
return combineDateAndTimeDuration(createDateDurationRecord(e, t, o, 0), add24HourDaysToTimeDuration(timeDurationFromComponents(...r), n));
|
|
@@ -1138,9 +1145,9 @@ function combineDateAndTimeDuration(e, t) {
|
|
|
1138
1145
|
};
|
|
1139
1146
|
}
|
|
1140
1147
|
function toTemporalDuration(e) {
|
|
1141
|
-
return t = e,
|
|
1142
|
-
const t =
|
|
1143
|
-
t && !/[pt]$|[.,](\d{1,9})[hms]
|
|
1148
|
+
return t = e, ft.has(t) ? getInternalSlotOrThrowForDuration(e) : isObject(e) ? createTemporalDurationSlot(toTemporalPartialDurationRecord(e).map((e) => e || 0)) : (validateString(e), ((e) => {
|
|
1149
|
+
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);
|
|
1150
|
+
t && !/[pt]$|[.,](\d{1,9})[hms]./i.test(e) || throwRangeError(parseError(e));
|
|
1144
1151
|
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")));
|
|
1145
1152
|
return applySignToDurationSlot(createTemporalDurationSlot([
|
|
1146
1153
|
toIntegerWithTruncation(t[2] || ""),
|
|
@@ -1164,14 +1171,14 @@ function dateDurationSign(e) {
|
|
|
1164
1171
|
return sign(e.te || e.oe || e.ee || e.X);
|
|
1165
1172
|
}
|
|
1166
1173
|
function internalDurationSign(e) {
|
|
1167
|
-
return dateDurationSign(e.A) ||
|
|
1174
|
+
return dateDurationSign(e.A) || It(e.p);
|
|
1168
1175
|
}
|
|
1169
1176
|
function validateDuration(...e) {
|
|
1170
1177
|
e.some((e) => e < 0) && e.some((e) => e > 0) && throwRangeError("invalid duration"), (e.some((e) => Math.abs(e) > 1e25) || [
|
|
1171
|
-
e[
|
|
1172
|
-
e[
|
|
1173
|
-
e[
|
|
1174
|
-
].some((e) => Math.abs(e) >= 2 ** 32)) && throwRangeError(
|
|
1178
|
+
e[p],
|
|
1179
|
+
e[h],
|
|
1180
|
+
e[g]
|
|
1181
|
+
].some((e) => Math.abs(e) >= 2 ** 32)) && throwRangeError(Z), validateTimeDurationRange(timeDurationFromComponents(24 * e[f] + e[I], e[O], e[F], e[S], e[w], e[v]));
|
|
1175
1182
|
}
|
|
1176
1183
|
function defaultTemporalLargestUnit(e) {
|
|
1177
1184
|
return (e.findIndex((e) => e) + 10) % 10;
|
|
@@ -1189,8 +1196,8 @@ function toTemporalPartialDurationRecord(e) {
|
|
|
1189
1196
|
6,
|
|
1190
1197
|
2,
|
|
1191
1198
|
0
|
|
1192
|
-
].map((t) => mapUnlessUndefined(e[
|
|
1193
|
-
return t.some((e) => void 0 !== e) || throwTypeError(
|
|
1199
|
+
].map((t) => mapUnlessUndefined(e[E[t]], toIntegerIfIntegral));
|
|
1200
|
+
return t.some((e) => void 0 !== e) || throwTypeError(C), [
|
|
1194
1201
|
9,
|
|
1195
1202
|
5,
|
|
1196
1203
|
8,
|
|
@@ -1206,8 +1213,8 @@ function toTemporalPartialDurationRecord(e) {
|
|
|
1206
1213
|
function createTemporalDurationSlot(e) {
|
|
1207
1214
|
return validateDuration(...e), e;
|
|
1208
1215
|
}
|
|
1209
|
-
function createTemporalDuration(e, t = Object.create(
|
|
1210
|
-
return
|
|
1216
|
+
function createTemporalDuration(e, t = Object.create(Ot.prototype)) {
|
|
1217
|
+
return ft.set(t, e), t;
|
|
1211
1218
|
}
|
|
1212
1219
|
function timeDurationFromComponents(e, t, o, n, r, a) {
|
|
1213
1220
|
return addTimeDuration(addTimeDuration(addTimeDuration(createTimeDurationFromUnit(3600 * e + 60 * t + o, 1e9), createTimeDurationFromUnit(n, 1e6)), createTimeDurationFromUnit(r, 1e3)), createTimeDurationFromUnit(a, 1));
|
|
@@ -1223,7 +1230,7 @@ function roundTimeDurationToIncrement(e, t, o) {
|
|
|
1223
1230
|
}
|
|
1224
1231
|
function dateDurationDays(e, t) {
|
|
1225
1232
|
const o = adjustDateDurationRecord(e, 0);
|
|
1226
|
-
return dateDurationSign(e) ? e.X + isoDateRecordToEpochDays(calendarDateAdd(t.U, t.o, o,
|
|
1233
|
+
return dateDurationSign(e) ? e.X + isoDateRecordToEpochDays(calendarDateAdd(t.U, t.o, o, _)) - isoDateRecordToEpochDays(t.o) : e.X;
|
|
1227
1234
|
}
|
|
1228
1235
|
function roundTimeDuration(e, t, o, n) {
|
|
1229
1236
|
return roundTimeDurationToIncrement(e, nanosecondsForTimeUnit(o) * t, n);
|
|
@@ -1231,26 +1238,26 @@ function roundTimeDuration(e, t, o, n) {
|
|
|
1231
1238
|
function totalTimeDuration(e, t) {
|
|
1232
1239
|
return divideTimeDurationToFloatingPoint(e, nanosecondsForTimeUnit(t));
|
|
1233
1240
|
}
|
|
1234
|
-
function computeNudgeWindow(e, t, o, n, r, a, i,
|
|
1235
|
-
let
|
|
1236
|
-
if (
|
|
1237
|
-
else if (
|
|
1238
|
-
else if (
|
|
1239
|
-
const o = calendarDateAdd(0, n.o, adjustDateDurationRecord(t.A, 0, 0),
|
|
1240
|
-
|
|
1241
|
-
} else
|
|
1242
|
-
if (dateDurationSign(
|
|
1243
|
-
const e = combineIsoDateAndTimeRecord(calendarDateAdd(0, n.o,
|
|
1244
|
-
|
|
1245
|
-
} else
|
|
1246
|
-
const
|
|
1241
|
+
function computeNudgeWindow(e, t, o, n, r, a, i, d, m) {
|
|
1242
|
+
let u, T, D, p, h;
|
|
1243
|
+
if (d === l) u = roundNumberToIncrement(t.A.te, i, le) + (m ? i * e : 0), T = u + i * e, D = createDateDurationRecord(u, 0, 0, 0), p = createDateDurationRecord(T, 0, 0, 0);
|
|
1244
|
+
else if (d === c) u = roundNumberToIncrement(t.A.oe, i, le) + (m ? i * e : 0), T = u + i * e, D = adjustDateDurationRecord(t.A, 0, 0, u), p = adjustDateDurationRecord(t.A, 0, 0, T);
|
|
1245
|
+
else if (d === s) {
|
|
1246
|
+
const o = calendarDateAdd(0, n.o, adjustDateDurationRecord(t.A, 0, 0), _);
|
|
1247
|
+
u = roundNumberToIncrement(t.A.ee + calendarDateUntil(0, o, addDaysToIsoDate(o, t.A.X), s).ee, i, le), T = u + i * e, D = adjustDateDurationRecord(t.A, 0, u), p = adjustDateDurationRecord(t.A, 0, T);
|
|
1248
|
+
} else u = roundNumberToIncrement(t.A.X, i, le), T = u + i * e, D = adjustDateDurationRecord(t.A, u), p = adjustDateDurationRecord(t.A, T);
|
|
1249
|
+
if (dateDurationSign(D)) {
|
|
1250
|
+
const e = combineIsoDateAndTimeRecord(calendarDateAdd(0, n.o, D, _), n.p);
|
|
1251
|
+
h = r ? getEpochNanosecondsFor(r, e, G) : getUtcEpochNanoseconds(e);
|
|
1252
|
+
} else h = o;
|
|
1253
|
+
const g = combineIsoDateAndTimeRecord(calendarDateAdd(0, n.o, p, _), n.p);
|
|
1247
1254
|
return {
|
|
1248
|
-
De:
|
|
1249
|
-
pe:
|
|
1250
|
-
he:
|
|
1251
|
-
ge: r ? getEpochNanosecondsFor(r,
|
|
1252
|
-
fe:
|
|
1253
|
-
Ie:
|
|
1255
|
+
De: u,
|
|
1256
|
+
pe: T,
|
|
1257
|
+
he: h,
|
|
1258
|
+
ge: r ? getEpochNanosecondsFor(r, g, G) : getUtcEpochNanoseconds(g),
|
|
1259
|
+
fe: D,
|
|
1260
|
+
Ie: p
|
|
1254
1261
|
};
|
|
1255
1262
|
}
|
|
1256
1263
|
function nudgeToCalendarUnit(e, t, o, n, r, a, i, l, c, s) {
|
|
@@ -1258,74 +1265,73 @@ function nudgeToCalendarUnit(e, t, o, n, r, a, i, l, c, s) {
|
|
|
1258
1265
|
compareEpochNanoseconds(m.he, n) * compareEpochNanoseconds(m.ge, n) > 0 && (m = computeNudgeWindow(e, t, o, r, a, 0, l, c, !0), d = !0);
|
|
1259
1266
|
const u = differenceEpochNanoseconds(m.he, n), T = differenceEpochNanoseconds(m.he, m.ge);
|
|
1260
1267
|
let D = m.fe, p = m.he;
|
|
1261
|
-
return roundNumberToIncrement(m.De + ((e, t, o) => signTimeDuration(e) ?
|
|
1268
|
+
return roundNumberToIncrement(m.De + ((e, t, o) => signTimeDuration(e) ? Ee(e, t) ? Ee(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), {
|
|
1262
1269
|
Oe: {
|
|
1263
|
-
Fe: combineDateAndTimeDuration(D,
|
|
1270
|
+
Fe: combineDateAndTimeDuration(D, ye),
|
|
1264
1271
|
Se: p,
|
|
1265
1272
|
we: d
|
|
1266
1273
|
},
|
|
1267
1274
|
ve: m.De + divideTimeDurationToFloatingPoint(u, 1e9) / divideTimeDurationToFloatingPoint(T, 1e9) * l * e
|
|
1268
1275
|
};
|
|
1269
1276
|
}
|
|
1270
|
-
function roundRelativeDuration(e, t, o, n, r, a, i, l, c,
|
|
1271
|
-
const
|
|
1272
|
-
const c = calendarDateAdd(0, o.o, t.A,
|
|
1273
|
-
let
|
|
1274
|
-
const
|
|
1275
|
-
let
|
|
1276
|
-
return
|
|
1277
|
-
Fe: combineDateAndTimeDuration(adjustDateDurationRecord(t.A, t.A.X +
|
|
1278
|
-
Se:
|
|
1279
|
-
we:
|
|
1277
|
+
function roundRelativeDuration(e, t, o, n, r, a, i, l, c, m) {
|
|
1278
|
+
const u = internalDurationSign(e) || 1, T = isCalendarUnit(c) || r && c === d ? nudgeToCalendarUnit(u, e, t, o, n, r, 0, l, c, m).Oe : r ? ((e, t, o, n, r, a, i, l) => {
|
|
1279
|
+
const c = calendarDateAdd(0, o.o, t.A, _), s = combineIsoDateAndTimeRecord(c, o.p), d = combineIsoDateAndTimeRecord(addDaysToIsoDate(c, e), o.p), m = getEpochNanosecondsFor(n, s, G), u = getEpochNanosecondsFor(n, d, G), T = timeDurationFromEpochNanosecondsDifference(u, m), D = nanosecondsForTimeUnit(i);
|
|
1280
|
+
let p = roundTimeDurationToIncrement(t.p, a * D, l);
|
|
1281
|
+
const h = addTimeDuration(p, negateTimeDuration(T));
|
|
1282
|
+
let g = !1, f = 0;
|
|
1283
|
+
return It(h) !== -e && (g = !0, f = e, p = roundTimeDurationToIncrement(h, a * D, l)), {
|
|
1284
|
+
Fe: combineDateAndTimeDuration(adjustDateDurationRecord(t.A, t.A.X + f), p),
|
|
1285
|
+
Se: addTimeDurationToEpochNanoseconds(u, p),
|
|
1286
|
+
we: g
|
|
1280
1287
|
};
|
|
1281
|
-
})(
|
|
1282
|
-
const i = add24HourDaysToTimeDuration(e.p, e.A.X), l = r ===
|
|
1288
|
+
})(u, e, n, r, 0, l, c, m) : (function(e, t, o, n, r, a) {
|
|
1289
|
+
const i = add24HourDaysToTimeDuration(e.p, e.A.X), l = r === d ? roundTimeDurationByDays(i, n, a) : roundTimeDurationToIncrement(i, nanosecondsForTimeUnit(r) * n, a), c = l[0];
|
|
1283
1290
|
return {
|
|
1284
|
-
Fe: combineDateAndTimeDuration(adjustDateDurationRecord(e.A,
|
|
1291
|
+
Fe: combineDateAndTimeDuration(adjustDateDurationRecord(e.A, isDateUnit(o) ? c : 0), isDateUnit(o) ? addTimeDuration(l, timeDurationFromComponents(24 * -c, 0, 0, 0, 0, 0)) : l),
|
|
1285
1292
|
Se: addTimeDurationToEpochNanoseconds(t, addTimeDuration(l, negateTimeDuration(i))),
|
|
1286
|
-
we: sign(c - i[0]) ===
|
|
1293
|
+
we: sign(c - i[0]) === It(i)
|
|
1287
1294
|
};
|
|
1288
|
-
})(e, o, i, l, c,
|
|
1289
|
-
return
|
|
1295
|
+
})(e, o, i, l, c, m);
|
|
1296
|
+
return T.we && c !== s ? ((e, t, o, n, r, a, i, l) => {
|
|
1290
1297
|
if (l === i) return t;
|
|
1291
1298
|
const c = i;
|
|
1292
|
-
let
|
|
1293
|
-
for (let a = l - 1; a >= c; a--) if (a !==
|
|
1294
|
-
|
|
1295
|
-
const i = combineIsoDateAndTimeRecord(calendarDateAdd(0, n.o,
|
|
1296
|
-
if (
|
|
1297
|
-
t = combineDateAndTimeDuration(
|
|
1299
|
+
let d;
|
|
1300
|
+
for (let a = l - 1; a >= c; a--) if (a !== g || i === s) {
|
|
1301
|
+
d = a === p ? createDateDurationRecord(t.A.te + e, 0, 0, 0) : a === h ? adjustDateDurationRecord(t.A, 0, 0, t.A.oe + e) : adjustDateDurationRecord(t.A, 0, t.A.ee + e);
|
|
1302
|
+
const i = combineIsoDateAndTimeRecord(calendarDateAdd(0, n.o, d, _), n.p);
|
|
1303
|
+
if (It(differenceEpochNanoseconds(r ? getEpochNanosecondsFor(r, i, "compatible") : getUtcEpochNanoseconds(i), o)) === -e) break;
|
|
1304
|
+
t = combineDateAndTimeDuration(d, ye);
|
|
1298
1305
|
}
|
|
1299
1306
|
return t;
|
|
1300
|
-
})(
|
|
1307
|
+
})(u, T.Fe, T.Se, n, r, 0, i, largerOfTwoTemporalUnits(c, d)) : T.Fe;
|
|
1301
1308
|
}
|
|
1302
1309
|
function totalRelativeDuration(e, t, o, n, r, a, i) {
|
|
1303
|
-
return isCalendarUnit(i) || r && i ===
|
|
1310
|
+
return isCalendarUnit(i) || r && i === d ? nudgeToCalendarUnit(internalDurationSign(e) || 1, e, t, o, n, r, 0, 1, i, le).ve : totalTimeDuration(add24HourDaysToTimeDuration(e.p, e.A.X), i);
|
|
1304
1311
|
}
|
|
1305
1312
|
function temporalDurationToString(e, t) {
|
|
1306
|
-
const o = durationSign(e), n = timeDurationFromComponents(0, 0, (e = applySignToDurationSlot(e, o))[
|
|
1313
|
+
const o = durationSign(e), n = timeDurationFromComponents(0, 0, (e = applySignToDurationSlot(e, o))[F], e[S], e[w], e[v]), [, , , r, a, i, l] = balanceTimeDuration(n, T), [c, s, d, m, u, D] = [
|
|
1307
1314
|
"Y",
|
|
1308
1315
|
"M",
|
|
1309
1316
|
"W",
|
|
1310
1317
|
"D",
|
|
1311
1318
|
"H",
|
|
1312
1319
|
"M"
|
|
1313
|
-
].map((t, o) => e[o] ? `${e[o]}${t}` : ""),
|
|
1314
|
-
return `${o < 0 ? "-" : ""}P${c}${s}${d}${m}${
|
|
1320
|
+
].map((t, o) => e[o] ? `${e[o]}${t}` : ""), p = `${u}${D}${It(n) || defaultTemporalLargestUnit(e) >= T || void 0 !== t ? `${toString(r)}${formatFractionalSeconds(1e6 * a + 1e3 * i + l, t)}S` : ""}`;
|
|
1321
|
+
return `${o < 0 ? "-" : ""}P${c}${s}${d}${m}${p && `T${p}`}`;
|
|
1315
1322
|
}
|
|
1316
1323
|
function addDurations(e, t, o) {
|
|
1317
1324
|
const n = applySignToDurationSlot(toTemporalDuration(o), e), r = largerOfTwoTemporalUnits(defaultTemporalLargestUnit(t), defaultTemporalLargestUnit(n));
|
|
1318
1325
|
return isCalendarUnit(r) && throwRangeError(durationWithDateUnit(r)), createTemporalDuration(temporalDurationFromInternal(combineDateAndTimeDuration(zeroDateDuration(), addTimeDuration(toInternalDurationRecordWith24HourDays(t).p, toInternalDurationRecordWith24HourDays(n).p)), r));
|
|
1319
1326
|
}
|
|
1320
1327
|
function getInternalSlotOrThrowForDuration(e) {
|
|
1321
|
-
|
|
1322
|
-
return t || throwTypeError(Te), t;
|
|
1328
|
+
return getInternalSlotOrThrow(ft, e);
|
|
1323
1329
|
}
|
|
1324
1330
|
function applySignToDurationSlot(e, t) {
|
|
1325
1331
|
return createTemporalDurationSlot(e.map((e) => e * t + 0));
|
|
1326
1332
|
}
|
|
1327
1333
|
function validateTimeDurationRange(e) {
|
|
1328
|
-
return ((e) =>
|
|
1334
|
+
return ((e) => Ee(absTimeDuration(e), createTimeDurationFromUnit(2 ** 53, 1e9)) < 0)(e) || throwRangeError(Z), e;
|
|
1329
1335
|
}
|
|
1330
1336
|
function balanceTimeDuration(e, t) {
|
|
1331
1337
|
const o = clamp(t, 3, 9);
|
|
@@ -1337,8 +1343,8 @@ function balanceTimeDuration(e, t) {
|
|
|
1337
1343
|
0,
|
|
1338
1344
|
0,
|
|
1339
1345
|
0
|
|
1340
|
-
].slice(0, o -
|
|
1341
|
-
o >
|
|
1346
|
+
].slice(0, o - f),
|
|
1347
|
+
o > F ? timeDurationToSubsecondsNumber(e, 18 - 3 * o) : divTrunc((r = e, r[0] * n + divTrunc(r[1], 1e9)), P[o - f] / 1e9),
|
|
1342
1348
|
...[
|
|
1343
1349
|
0,
|
|
1344
1350
|
1,
|
|
@@ -1346,7 +1352,7 @@ function balanceTimeDuration(e, t) {
|
|
|
1346
1352
|
3,
|
|
1347
1353
|
4,
|
|
1348
1354
|
5
|
|
1349
|
-
].map((t) => divTrunc(e[1],
|
|
1355
|
+
].map((t) => divTrunc(e[1], P[t + 1]) % (P[t] / P[t + 1]) + 0).slice(o - f)
|
|
1350
1356
|
];
|
|
1351
1357
|
var r;
|
|
1352
1358
|
}
|
|
@@ -1376,34 +1382,34 @@ function mathematicalInLeapYear(e) {
|
|
|
1376
1382
|
return +!(e % (e % 25 ? 4 : 16));
|
|
1377
1383
|
}
|
|
1378
1384
|
function getTemporalOverflowOption(e) {
|
|
1379
|
-
return getOption(e, "overflow", [
|
|
1385
|
+
return getOption(e, "overflow", [_, X], _);
|
|
1380
1386
|
}
|
|
1381
1387
|
function getTemporalDisambiguationOption(e) {
|
|
1382
1388
|
return getOption(e, "disambiguation", [
|
|
1383
|
-
|
|
1389
|
+
G,
|
|
1384
1390
|
"earlier",
|
|
1385
|
-
|
|
1391
|
+
K,
|
|
1386
1392
|
"reject"
|
|
1387
|
-
],
|
|
1393
|
+
], G);
|
|
1388
1394
|
}
|
|
1389
1395
|
function negateRoundingMode(e) {
|
|
1390
|
-
return "ceil" === e ?
|
|
1396
|
+
return "ceil" === e ? ae : "floor" === e ? re : "halfCeil" === e ? se : "halfFloor" === e ? ce : e;
|
|
1391
1397
|
}
|
|
1392
1398
|
function getTemporalOffsetOption(e, t) {
|
|
1393
1399
|
return getOption(e, "offset", [
|
|
1394
|
-
|
|
1400
|
+
Q,
|
|
1395
1401
|
"use",
|
|
1396
1402
|
"ignore",
|
|
1397
|
-
|
|
1403
|
+
ee
|
|
1398
1404
|
], t);
|
|
1399
1405
|
}
|
|
1400
1406
|
function getTemporalShowCalendarNameOption(e) {
|
|
1401
1407
|
return getOption(e, "calendarName", [
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
],
|
|
1408
|
+
Te,
|
|
1409
|
+
De,
|
|
1410
|
+
pe,
|
|
1411
|
+
he
|
|
1412
|
+
], Te);
|
|
1407
1413
|
}
|
|
1408
1414
|
function validateTemporalRoundingIncrement(e, t, o) {
|
|
1409
1415
|
(e > (o ? t : t - 1) || t % e) && throwRangeError(invalidField("roundingIncrement"));
|
|
@@ -1417,7 +1423,7 @@ function getTemporalFractionalSecondDigitsOption(e) {
|
|
|
1417
1423
|
}
|
|
1418
1424
|
function toSecondsStringPrecisionRecord(e, t) {
|
|
1419
1425
|
return e ? {
|
|
1420
|
-
ye: e ===
|
|
1426
|
+
ye: e === u ? J : 3 * (e - 6),
|
|
1421
1427
|
Ee: e,
|
|
1422
1428
|
Pe: 1
|
|
1423
1429
|
} : {
|
|
@@ -1428,21 +1434,21 @@ function toSecondsStringPrecisionRecord(e, t) {
|
|
|
1428
1434
|
}
|
|
1429
1435
|
function getTemporalUnitValuedOption(e, t, o) {
|
|
1430
1436
|
return mapUnlessUndefined(getOption(e, t, [
|
|
1431
|
-
...
|
|
1432
|
-
...
|
|
1437
|
+
...y,
|
|
1438
|
+
...E,
|
|
1433
1439
|
"auto"
|
|
1434
1440
|
], o), (e) => {
|
|
1435
|
-
return "auto" === e ? "auto" : (t = e.replace(/s$/, ""),
|
|
1441
|
+
return "auto" === e ? "auto" : (t = e.replace(/s$/, ""), y.indexOf(t));
|
|
1436
1442
|
var t;
|
|
1437
1443
|
});
|
|
1438
1444
|
}
|
|
1439
1445
|
function validateTemporalUnitValue(e, t, o = []) {
|
|
1440
|
-
void 0 === e || o.includes(e) || ("auto" === e && throwRangeError(disallowedUnit(e)), (e <=
|
|
1446
|
+
void 0 === e || o.includes(e) || ("auto" === e && throwRangeError(disallowedUnit(e)), (e <= d && t === L || e > d && t === V) && throwRangeError(disallowedUnit(e)));
|
|
1441
1447
|
}
|
|
1442
1448
|
function getTemporalRelativeToOption(e) {
|
|
1443
1449
|
const t = e.relativeTo;
|
|
1444
1450
|
if (void 0 === t) return createNullPrototypeObject();
|
|
1445
|
-
let o, n, r, a, i, l = !0, c =
|
|
1451
|
+
let o, n, r, a, i, l = !0, c = te;
|
|
1446
1452
|
if (isObject(t)) {
|
|
1447
1453
|
if (isZonedDateTime(t)) return createNullPrototypeObject({ Re: getInternalSlotOrThrowForZonedDateTime(t) });
|
|
1448
1454
|
if (isPlainDate(t)) return createNullPrototypeObject({ be: getInternalSlotOrThrowForPlainDate(t) });
|
|
@@ -1450,35 +1456,35 @@ function getTemporalRelativeToOption(e) {
|
|
|
1450
1456
|
if (e) return createNullPrototypeObject({ be: getInternalSlotOrThrowForPlainDate(createTemporalDate(e.K.o, e.U)) });
|
|
1451
1457
|
r = getTemporalCalendarIdentifierWithIsoDefault(t);
|
|
1452
1458
|
const l = prepareCalendarFields(r, t, [
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
], []), s = interpretTemporalDateTimeFields(r, l,
|
|
1466
|
-
a = s.o, i = s.p, o = l.timeZone, n = l.offset, c = n ?
|
|
1459
|
+
pt.t,
|
|
1460
|
+
pt.u,
|
|
1461
|
+
pt.P,
|
|
1462
|
+
pt.T,
|
|
1463
|
+
pt.D,
|
|
1464
|
+
pt.I,
|
|
1465
|
+
pt.O,
|
|
1466
|
+
pt.F,
|
|
1467
|
+
pt.S,
|
|
1468
|
+
pt.v,
|
|
1469
|
+
pt.R,
|
|
1470
|
+
pt.Z
|
|
1471
|
+
], []), s = interpretTemporalDateTimeFields(r, l, _);
|
|
1472
|
+
a = s.o, i = s.p, o = l.timeZone, n = l.offset, c = n ? te : ne;
|
|
1467
1473
|
} else {
|
|
1468
1474
|
validateString(t);
|
|
1469
|
-
const e = parseIsoDateTime(t, [
|
|
1470
|
-
n = e.Z.N, e.Z.$ ? (o = toTemporalTimeZoneIdentifier(e.Z.$), c = e.Z.M ?
|
|
1475
|
+
const e = parseIsoDateTime(t, [Qe, et]);
|
|
1476
|
+
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;
|
|
1471
1477
|
}
|
|
1472
|
-
return createNullPrototypeObject(o ? { Re: getInternalSlotOrThrowForZonedDateTime(createTemporalZonedDateTime(interpretISODateTimeOffset(a, i, c, c ===
|
|
1478
|
+
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)) });
|
|
1473
1479
|
}
|
|
1474
1480
|
function largerOfTwoTemporalUnits(e, t) {
|
|
1475
1481
|
return e < t ? e : t;
|
|
1476
1482
|
}
|
|
1477
1483
|
function isCalendarUnit(e) {
|
|
1478
|
-
return e <
|
|
1484
|
+
return e < d;
|
|
1479
1485
|
}
|
|
1480
1486
|
function isDateUnit(e) {
|
|
1481
|
-
return e <=
|
|
1487
|
+
return e <= d;
|
|
1482
1488
|
}
|
|
1483
1489
|
function maximumTemporalDurationRoundingIncrement(e) {
|
|
1484
1490
|
return [
|
|
@@ -1495,22 +1501,22 @@ function formatFractionalSeconds(e, t) {
|
|
|
1495
1501
|
return void 0 === t ? e ? `.${o.replace(/0*$/, "")}` : "" : t ? `.${o.slice(0, t)}` : "";
|
|
1496
1502
|
}
|
|
1497
1503
|
function formatTimeString(e, t, o, n, r) {
|
|
1498
|
-
return `${toZeroPaddedDecimalString(e, 2)}:${toZeroPaddedDecimalString(t, 2)}${r ===
|
|
1504
|
+
return `${toZeroPaddedDecimalString(e, 2)}:${toZeroPaddedDecimalString(t, 2)}${r === J ? "" : `:${toZeroPaddedDecimalString(o, 2)}${formatFractionalSeconds(n, r)}`}`;
|
|
1499
1505
|
}
|
|
1500
1506
|
function roundNumberToIncrement(e, t, o) {
|
|
1501
|
-
return
|
|
1507
|
+
return Ft[o](e / t) * t;
|
|
1502
1508
|
}
|
|
1503
1509
|
function getRoundingModeOption(e, t) {
|
|
1504
1510
|
return getOption(e, "roundingMode", [
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1511
|
+
re,
|
|
1512
|
+
ae,
|
|
1513
|
+
ie,
|
|
1514
|
+
le,
|
|
1515
|
+
ce,
|
|
1516
|
+
se,
|
|
1517
|
+
de,
|
|
1518
|
+
me,
|
|
1519
|
+
ue
|
|
1514
1520
|
], t);
|
|
1515
1521
|
}
|
|
1516
1522
|
function getRoundingIncrementOption(e) {
|
|
@@ -1520,19 +1526,19 @@ function getRoundingIncrementOption(e) {
|
|
|
1520
1526
|
function isoDateToFields(e, t, o) {
|
|
1521
1527
|
const n = calendarIsoToDate(e, t);
|
|
1522
1528
|
return createNullPrototypeObject({
|
|
1523
|
-
[
|
|
1524
|
-
[
|
|
1525
|
-
[
|
|
1529
|
+
[pt.t]: o === q ? void 0 : n.t,
|
|
1530
|
+
[pt.P]: n.P,
|
|
1531
|
+
[pt.T]: o === x ? void 0 : n.T
|
|
1526
1532
|
});
|
|
1527
1533
|
}
|
|
1528
1534
|
function getDifferenceSettings(e, t, o, n, r, a) {
|
|
1529
1535
|
let i = getTemporalUnitValuedOption(t, "largestUnit", void 0) ?? "auto";
|
|
1530
|
-
const l = getRoundingIncrementOption(t), c = getRoundingModeOption(t,
|
|
1531
|
-
return validateTemporalUnitValue(i, o, ["auto"]), n.includes(i) && throwRangeError(disallowedUnit(i)), validateTemporalUnitValue(s, o), n.includes(s) && throwRangeError(disallowedUnit(s)), "auto" === i && (i = largerOfTwoTemporalUnits(a, s)), i > s && throwRangeError(
|
|
1532
|
-
|
|
1536
|
+
const l = getRoundingIncrementOption(t), c = getRoundingModeOption(t, le), s = getTemporalUnitValuedOption(t, "smallestUnit", void 0) ?? r;
|
|
1537
|
+
return validateTemporalUnitValue(i, o, ["auto"]), n.includes(i) && throwRangeError(disallowedUnit(i)), validateTemporalUnitValue(s, o), n.includes(s) && throwRangeError(disallowedUnit(s)), "auto" === i && (i = largerOfTwoTemporalUnits(a, s)), i > s && throwRangeError(U), isDateUnit(s) || validateTemporalRoundingIncrement(l, maximumTemporalDurationRoundingIncrement(s), !1), {
|
|
1538
|
+
H: s,
|
|
1533
1539
|
V: i,
|
|
1534
1540
|
q: -1 === e ? negateRoundingMode(c) : c,
|
|
1535
|
-
|
|
1541
|
+
L: l
|
|
1536
1542
|
};
|
|
1537
1543
|
}
|
|
1538
1544
|
function getUtcEpochNanoseconds(e) {
|
|
@@ -1548,21 +1554,20 @@ function epochDaysToIsoDate(e) {
|
|
|
1548
1554
|
}
|
|
1549
1555
|
function isoDateTimeToFields(e, t) {
|
|
1550
1556
|
return createNullPrototypeObject({
|
|
1551
|
-
...isoDateToFields(e, t.o,
|
|
1552
|
-
[
|
|
1553
|
-
[
|
|
1554
|
-
[
|
|
1555
|
-
[
|
|
1556
|
-
[
|
|
1557
|
-
[
|
|
1557
|
+
...isoDateToFields(e, t.o, V),
|
|
1558
|
+
[pt.D]: t.p.D,
|
|
1559
|
+
[pt.I]: t.p.I,
|
|
1560
|
+
[pt.O]: t.p.O,
|
|
1561
|
+
[pt.F]: t.p.F,
|
|
1562
|
+
[pt.S]: t.p.S,
|
|
1563
|
+
[pt.v]: t.p.v
|
|
1558
1564
|
});
|
|
1559
1565
|
}
|
|
1560
1566
|
function getInternalSlotOrThrowForDateTimeFormat(e) {
|
|
1561
|
-
|
|
1562
|
-
return t || throwTypeError(Te), t;
|
|
1567
|
+
return getInternalSlotOrThrow(vt, e);
|
|
1563
1568
|
}
|
|
1564
1569
|
function formatDateTime(e, t) {
|
|
1565
|
-
const [o, n] = handleDateTimeValue(
|
|
1570
|
+
const [o, n] = handleDateTimeValue(e, t);
|
|
1566
1571
|
return o.format(n);
|
|
1567
1572
|
}
|
|
1568
1573
|
function removeDateTimeFormatOptions(e, t) {
|
|
@@ -1573,19 +1578,19 @@ function dateStyleToMonthStyle(e) {
|
|
|
1573
1578
|
}
|
|
1574
1579
|
function amendOptionsForPlainDate(e) {
|
|
1575
1580
|
const t = createNullPrototypeObject(e);
|
|
1576
|
-
return hasAnyOptions(e,
|
|
1581
|
+
return hasAnyOptions(e, yt) || (hasAnyOptions(e, Et) && throwTypeError(N), t.year = t.month = t.day = "numeric"), removeDateTimeFormatOptions(t, [...Et, "timeZoneName"]), t.timeZone = "UTC", t;
|
|
1577
1582
|
}
|
|
1578
1583
|
function amendOptionsForPlainTime(e) {
|
|
1579
1584
|
const t = createNullPrototypeObject(e);
|
|
1580
|
-
return hasAnyOptions(e,
|
|
1581
|
-
...
|
|
1585
|
+
return hasAnyOptions(e, Et) || (hasAnyOptions(e, yt) && 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, [
|
|
1586
|
+
...yt,
|
|
1582
1587
|
"era",
|
|
1583
1588
|
"timeZoneName"
|
|
1584
1589
|
]), t.timeZone = "UTC", t;
|
|
1585
1590
|
}
|
|
1586
1591
|
function amendOptionsForPlainDateTime(e) {
|
|
1587
1592
|
const t = createNullPrototypeObject(e);
|
|
1588
|
-
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, [...
|
|
1593
|
+
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, [...yt, ...Et]) || (t.year = t.month = t.day = t.hour = t.minute = t.second = "numeric"), removeDateTimeFormatOptions(t, ["timeZoneName"]), t.timeZone = "UTC", t;
|
|
1589
1594
|
}
|
|
1590
1595
|
function amendOptionsForPlainYearMonth(e) {
|
|
1591
1596
|
const t = createNullPrototypeObject(e);
|
|
@@ -1593,8 +1598,8 @@ function amendOptionsForPlainYearMonth(e) {
|
|
|
1593
1598
|
"year",
|
|
1594
1599
|
"month",
|
|
1595
1600
|
"dateStyle"
|
|
1596
|
-
]) || (hasAnyOptions(e, [...
|
|
1597
|
-
...
|
|
1601
|
+
]) || (hasAnyOptions(e, [...yt, ...Et]) && throwTypeError(N), t.year = t.month = "numeric"), removeDateTimeFormatOptions(t, [
|
|
1602
|
+
...Et,
|
|
1598
1603
|
"day",
|
|
1599
1604
|
"weekday",
|
|
1600
1605
|
"timeZoneName"
|
|
@@ -1606,8 +1611,8 @@ function amendOptionsForPlainMonthDay(e) {
|
|
|
1606
1611
|
"month",
|
|
1607
1612
|
"day",
|
|
1608
1613
|
"dateStyle"
|
|
1609
|
-
]) || (hasAnyOptions(e, [...
|
|
1610
|
-
...
|
|
1614
|
+
]) || (hasAnyOptions(e, [...yt, ...Et]) && throwTypeError(N), t.month = t.day = "numeric"), removeDateTimeFormatOptions(t, [
|
|
1615
|
+
...Et,
|
|
1611
1616
|
"era",
|
|
1612
1617
|
"year",
|
|
1613
1618
|
"weekday",
|
|
@@ -1616,27 +1621,27 @@ function amendOptionsForPlainMonthDay(e) {
|
|
|
1616
1621
|
}
|
|
1617
1622
|
function amendOptionsForInstant(e) {
|
|
1618
1623
|
const t = createNullPrototypeObject(e);
|
|
1619
|
-
return hasAnyOptions(e, [...
|
|
1624
|
+
return hasAnyOptions(e, [...yt, ...Et]) || (t.year = t.month = t.day = t.hour = t.minute = t.second = "numeric"), t;
|
|
1620
1625
|
}
|
|
1621
1626
|
function hasAnyOptions(e, t) {
|
|
1622
1627
|
return t.some((t) => void 0 !== e[t]);
|
|
1623
1628
|
}
|
|
1624
|
-
function createDateTimeFormat(e, t = createNullPrototypeObject(), o, n
|
|
1625
|
-
null === t && throwTypeError(
|
|
1626
|
-
const
|
|
1627
|
-
let
|
|
1628
|
-
const
|
|
1629
|
-
return "timeZone" === o && void 0 !== n ? (void 0 !==
|
|
1629
|
+
function createDateTimeFormat(e, t = createNullPrototypeObject(), o, n) {
|
|
1630
|
+
null === t && throwTypeError(N);
|
|
1631
|
+
const r = createNullPrototypeObject();
|
|
1632
|
+
let a = new wt(e, new Proxy({}, { get(e, o) {
|
|
1633
|
+
const a = t[o];
|
|
1634
|
+
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);
|
|
1630
1635
|
} }));
|
|
1631
|
-
return (o ===
|
|
1632
|
-
...
|
|
1633
|
-
...
|
|
1636
|
+
return (o === V && r.timeStyle || o === L && r.dateStyle) && throwTypeError(N), r.calendar = a.resolvedOptions().calendar, void 0 === n || hasAnyOptions(r, [
|
|
1637
|
+
...yt,
|
|
1638
|
+
...Et,
|
|
1634
1639
|
"timeZoneName"
|
|
1635
|
-
]) || (
|
|
1636
|
-
Ze:
|
|
1637
|
-
$e:
|
|
1638
|
-
Ne:
|
|
1639
|
-
})
|
|
1640
|
+
]) || (r.timeZoneName = "short", a = new wt(a.resolvedOptions().locale, r)), createNullPrototypeObject({
|
|
1641
|
+
Ze: a,
|
|
1642
|
+
$e: r,
|
|
1643
|
+
Ne: a.resolvedOptions().locale
|
|
1644
|
+
});
|
|
1640
1645
|
}
|
|
1641
1646
|
function validateSameTemporalType(e, t) {
|
|
1642
1647
|
[
|
|
@@ -1650,27 +1655,28 @@ function validateSameTemporalType(e, t) {
|
|
|
1650
1655
|
].some((o) => o(e) !== o(t)) && throwTypeError("Temporal type mismatch");
|
|
1651
1656
|
}
|
|
1652
1657
|
function toDateTimeFormattable(e) {
|
|
1653
|
-
return ((e) => isObject(e) && (isPlainDate(e) || isPlainTime(e) || isPlainDateTime(e) || isZonedDateTime(e) || isPlainYearMonth(e) || isPlainMonthDay(e) || isInstant(e)))(e) ? e :
|
|
1658
|
+
return ((e) => isObject(e) && (isPlainDate(e) || isPlainTime(e) || isPlainDateTime(e) || isZonedDateTime(e) || isPlainYearMonth(e) || isPlainMonthDay(e) || isInstant(e)))(e) ? e : Se(e);
|
|
1654
1659
|
}
|
|
1655
1660
|
function handleDateTimeValue(e, t) {
|
|
1656
1661
|
const o = getInternalSlotForPlainDate(t), n = getInternalSlotForPlainDateTime(t), r = getInternalSlotForPlainYearMonth(t), a = getInternalSlotForPlainMonthDay(t);
|
|
1657
|
-
return isPlainTime(t) ? [e.Me ||= new
|
|
1662
|
+
return isPlainTime(t) ? [e.Me ||= new wt(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 wt(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 wt(e.Ne, amendOptionsForPlainDateTime(e.$e)), epochMilliseconds(getUtcEpochNanoseconds(n.K))]) : r ? (r.U !== e.$e.calendar && throwRangeError(M), [e.Ce ||= new wt(e.Ne, amendOptionsForPlainYearMonth(e.$e)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(r.o, midnightTimeRecord())))]) : a ? (a.U !== e.$e.calendar && throwRangeError(M), [e.Ye ||= new wt(e.Ne, amendOptionsForPlainMonthDay(e.$e)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(a.o, midnightTimeRecord())))]) : isInstant(t) ? [e.We ||= new wt(e.Ne, amendOptionsForInstant(e.$e)), epochMilliseconds(getInternalSlotOrThrowForInstant(t).Y)] : (isZonedDateTime(t) && throwTypeError($), [e.Ze, t]);
|
|
1658
1663
|
}
|
|
1659
1664
|
function DateTimeFormat(e, t) {
|
|
1660
|
-
return new
|
|
1665
|
+
return new Rt(e, t);
|
|
1661
1666
|
}
|
|
1662
|
-
function createTemporalInstant(e, t = Object.create(
|
|
1663
|
-
return
|
|
1667
|
+
function createTemporalInstant(e, t = Object.create(Mt.prototype)) {
|
|
1668
|
+
return Nt.set(t, { Y: e }), t;
|
|
1664
1669
|
}
|
|
1665
1670
|
function toTemporalInstant$1(e) {
|
|
1666
1671
|
if (isObject(e)) {
|
|
1667
|
-
const t =
|
|
1668
|
-
if (
|
|
1672
|
+
const o = (t = e, Nt.get(t) || getInternalSlotForZonedDateTime(e));
|
|
1673
|
+
if (o) return createTemporalInstant(o.Y);
|
|
1669
1674
|
e = toPrimitive(e);
|
|
1670
1675
|
}
|
|
1676
|
+
var t;
|
|
1671
1677
|
validateString(e);
|
|
1672
|
-
const
|
|
1673
|
-
return createTemporalInstant(validateEpochNanoseconds(getUtcEpochNanoseconds(balanceIsoDateTime(
|
|
1678
|
+
const o = parseIsoDateTime(e, [tt]), n = o.Z.M ? 0 : parseDateTimeUtcOffset(o.Z.N), r = o.p;
|
|
1679
|
+
return createTemporalInstant(validateEpochNanoseconds(getUtcEpochNanoseconds(balanceIsoDateTime(o.t, o.u, o.T, r.D, r.I, r.O, r.F, r.S, r.v - n))));
|
|
1674
1680
|
}
|
|
1675
1681
|
function addInstant(e, t) {
|
|
1676
1682
|
return validateEpochNanoseconds(addTimeDurationToEpochNanoseconds(e, t));
|
|
@@ -1680,42 +1686,38 @@ function differenceInstant(e, t, o, n, r) {
|
|
|
1680
1686
|
}
|
|
1681
1687
|
function roundTemporalInstant(e, t, o, n) {
|
|
1682
1688
|
return (function(e, t, o) {
|
|
1683
|
-
return normalizeEpochNanoseconds(e[0], ((e, t, o) =>
|
|
1689
|
+
return normalizeEpochNanoseconds(e[0], ((e, t, o) => St[o](e / t) * t)(e[1], t, o));
|
|
1684
1690
|
})(e, t * nanosecondsForTimeUnit(o), n);
|
|
1685
1691
|
}
|
|
1686
1692
|
function temporalInstantToString(e, t, o) {
|
|
1687
1693
|
const n = getOffsetNanosecondsFor(t || "UTC", e);
|
|
1688
|
-
return `${isoDateTimeToString(getIsoDateTimeFromOffsetNanoseconds(e, n), "iso8601", o,
|
|
1694
|
+
return `${isoDateTimeToString(getIsoDateTimeFromOffsetNanoseconds(e, n), "iso8601", o, pe)}${t ? formatDateTimeUtcOffsetRounded(n) : "Z"}`;
|
|
1689
1695
|
}
|
|
1690
1696
|
function differenceTemporalInstant(e, t, o, n) {
|
|
1691
|
-
const r = getInternalSlotOrThrowForInstant(toTemporalInstant$1(o)), a = getDifferenceSettings(e, getOptionsObject(n),
|
|
1692
|
-
return createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(differenceInstant(t.Y, r.Y, a.
|
|
1697
|
+
const r = getInternalSlotOrThrowForInstant(toTemporalInstant$1(o)), a = getDifferenceSettings(e, getOptionsObject(n), L, [], D, T);
|
|
1698
|
+
return createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(differenceInstant(t.Y, r.Y, a.L, a.H, a.q), a.V), e));
|
|
1693
1699
|
}
|
|
1694
1700
|
function addDurationToInstant(e, t, o) {
|
|
1695
1701
|
const n = applySignToDurationSlot(toTemporalDuration(o), e);
|
|
1696
1702
|
return isDateUnit(defaultTemporalLargestUnit(n)) && throwRangeError(durationWithDateUnit(defaultTemporalLargestUnit(n))), createTemporalInstant(addInstant(t.Y, toInternalDurationRecordWith24HourDays(n).p));
|
|
1697
1703
|
}
|
|
1698
1704
|
function validateEpochNanoseconds(e) {
|
|
1699
|
-
return ((e) => compareEpochNanoseconds(
|
|
1700
|
-
}
|
|
1701
|
-
function getInternalSlotForInstant(e) {
|
|
1702
|
-
return bt.get(e);
|
|
1705
|
+
return ((e) => compareEpochNanoseconds(we, e) * compareEpochNanoseconds(ve, e) <= 0)(e) || throwRangeError(b), e;
|
|
1703
1706
|
}
|
|
1704
1707
|
function getInternalSlotOrThrowForInstant(e) {
|
|
1705
|
-
|
|
1706
|
-
return t || throwTypeError(Te), t;
|
|
1708
|
+
return getInternalSlotOrThrow(Nt, e);
|
|
1707
1709
|
}
|
|
1708
1710
|
function isInstant(e) {
|
|
1709
|
-
return
|
|
1711
|
+
return Nt.has(e);
|
|
1710
1712
|
}
|
|
1711
1713
|
function clampEpochNanoseconds(e) {
|
|
1712
|
-
return compareEpochNanoseconds(e,
|
|
1714
|
+
return compareEpochNanoseconds(e, ve) > 0 ? ve : compareEpochNanoseconds(e, we) < 0 ? we : e;
|
|
1713
1715
|
}
|
|
1714
1716
|
function systemTimeZoneIdentifier() {
|
|
1715
|
-
return
|
|
1717
|
+
return Yt && Wt + Yt > Date.now() && Ct ? Ct : (Wt = Date.now(), Ct = new wt().resolvedOptions().timeZone);
|
|
1716
1718
|
}
|
|
1717
1719
|
function setSystemTimeZoneIdCacheTtl(e) {
|
|
1718
|
-
|
|
1720
|
+
Yt = e, e || (Ct = void 0, Wt = -Infinity);
|
|
1719
1721
|
}
|
|
1720
1722
|
function systemUtcEpochNanoseconds() {
|
|
1721
1723
|
return createEpochNanosecondsFromEpochMilliseconds(Date.now());
|
|
@@ -1723,7 +1725,7 @@ function systemUtcEpochNanoseconds() {
|
|
|
1723
1725
|
function systemDateTime(e = systemTimeZoneIdentifier()) {
|
|
1724
1726
|
return getIsoDateTimeForZonedDateTimeSlot(createZonedDateTimeSlot(systemUtcEpochNanoseconds(), toTemporalTimeZoneIdentifier(e), "iso8601"));
|
|
1725
1727
|
}
|
|
1726
|
-
const e = 1e6, t = 6e10, o = 36e11, n = 86400, r = 864e5, a = 864e11, i = 146097, l =
|
|
1728
|
+
const e = 1e6, t = 6e10, o = 36e11, n = 86400, r = 864e5, a = 864e11, i = 146097, l = 0, c = 1, s = 2, d = 3, m = 4, u = 5, T = 6, D = 9, p = 0, h = 1, g = 2, f = 3, I = 4, O = 5, F = 6, S = 7, w = 8, v = 9, y = [
|
|
1727
1729
|
"year",
|
|
1728
1730
|
"month",
|
|
1729
1731
|
"week",
|
|
@@ -1734,7 +1736,7 @@ const e = 1e6, t = 6e10, o = 36e11, n = 86400, r = 864e5, a = 864e11, i = 146097
|
|
|
1734
1736
|
"millisecond",
|
|
1735
1737
|
"microsecond",
|
|
1736
1738
|
"nanosecond"
|
|
1737
|
-
],
|
|
1739
|
+
], E = y.map((e) => `${e}s`), P = [
|
|
1738
1740
|
a,
|
|
1739
1741
|
o,
|
|
1740
1742
|
t,
|
|
@@ -1742,8 +1744,27 @@ const e = 1e6, t = 6e10, o = 36e11, n = 86400, r = 864e5, a = 864e11, i = 146097
|
|
|
1742
1744
|
1e6,
|
|
1743
1745
|
1e3,
|
|
1744
1746
|
1
|
|
1745
|
-
], missingField = (e) => `missing field: ${e}`, invalidField = (e) => `invalid field: ${e}`, parseError = (e) => `parse error: ${e}`,
|
|
1746
|
-
var
|
|
1747
|
+
], missingField = (e) => `missing field: ${e}`, invalidField = (e) => `invalid field: ${e}`, parseError = (e) => `parse error: ${e}`, R = "invalid date / time", b = "out-of-bounds date", Z = "out-of-bounds duration", N = "invalid formatting options", M = "calendar mismatch", disallowedUnit = (e) => `disallowed unit: ${"auto" === e ? e : getNameFromUnit(e)}`, invalidNumber = (e) => `invalid number: ${e}`, invalidTimeZone = (e) => `invalid time zone: ${e}`, invalidMonthCode = (e) => `invalid month code:${e}`, durationWithDateUnit = (e) => `duration has a date unit: ${getNameFromUnit(e)}`, U = "invalid `largestUnit` and `smallestUnit` options", j = "mismatch of `month` and `monthCode`", $ = "value is not formattable", notObject = (e) => `not object: ${e}`, C = "empty fields", Y = "can't convert Temporal classes to number", W = "argument is undefined", A = globalThis.Intl.DurationFormat, z = /* @__PURE__ */ new WeakMap();
|
|
1748
|
+
var k = class {
|
|
1749
|
+
static supportedLocalesOf(e, t = void 0) {
|
|
1750
|
+
return A.supportedLocalesOf(e, t);
|
|
1751
|
+
}
|
|
1752
|
+
constructor(e = void 0, t = void 0) {
|
|
1753
|
+
z.set(this, { Ae: new A(e, t) });
|
|
1754
|
+
}
|
|
1755
|
+
format(e) {
|
|
1756
|
+
return getInternalSlotOrThrowForDurationFormat(this).Ae.format(durationRecordToDurationLikeObject(toTemporalDuration(e)));
|
|
1757
|
+
}
|
|
1758
|
+
formatToParts(e) {
|
|
1759
|
+
return getInternalSlotOrThrowForDurationFormat(this).Ae.formatToParts(durationRecordToDurationLikeObject(toTemporalDuration(e)));
|
|
1760
|
+
}
|
|
1761
|
+
resolvedOptions() {
|
|
1762
|
+
return getInternalSlotOrThrowForDurationFormat(this).Ae.resolvedOptions();
|
|
1763
|
+
}
|
|
1764
|
+
};
|
|
1765
|
+
defineStringTag(k.prototype, "Intl.DurationFormat"), renameFunction(k, "DurationFormat");
|
|
1766
|
+
const V = Symbol(), L = Symbol(), H = Symbol(), x = Symbol(), q = Symbol(), B = Symbol(), J = Symbol(), _ = "constrain", X = "reject", G = "compatible", K = "later", Q = "prefer", ee = "reject", te = Symbol(), oe = Symbol(), ne = Symbol(), re = "ceil", ae = "floor", ie = "expand", le = "trunc", ce = "halfCeil", se = "halfFloor", de = "halfExpand", me = "halfTrunc", ue = "halfEven", Te = "auto", De = "always", pe = "never", he = "critical", ge = "auto", fe = "never", Ie = "auto", Oe = "never", Fe = "critical", Se = Math.max, we = createEpochNanosecondsFromEpochMilliseconds(-864e13), ve = createEpochNanosecondsFromEpochMilliseconds(864e13), ye = [0, 0], Ee = compareEpochNanoseconds, Pe = /* @__PURE__ */ new WeakMap();
|
|
1767
|
+
var Re = class {
|
|
1747
1768
|
constructor(e, t, o = "iso8601") {
|
|
1748
1769
|
const n = validateEpochNanoseconds(createEpochNanosecondsFromBigInt(toBigInt(e)));
|
|
1749
1770
|
validateString(t);
|
|
@@ -1846,25 +1867,25 @@ var Ee = class {
|
|
|
1846
1867
|
validatePartialTemporalObject(e);
|
|
1847
1868
|
const n = getOffsetNanosecondsForZonedDateTimeSlot(o), r = getIsoDateTimeForZonedDateTimeSlot(o), a = calendarMergeFields(o.U, createNullPrototypeObject({
|
|
1848
1869
|
...isoDateTimeToFields(o.U, r),
|
|
1849
|
-
[
|
|
1870
|
+
[pt.R]: formatUtcOffsetNanoseconds(n)
|
|
1850
1871
|
}), prepareCalendarFields(o.U, e, [
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
])), i = getOptionsObject(t), l = getTemporalDisambiguationOption(i), c = getTemporalOffsetOption(i,
|
|
1863
|
-
return createTemporalZonedDateTime(interpretISODateTimeOffset(d.o, d.p,
|
|
1872
|
+
pt.t,
|
|
1873
|
+
pt.u,
|
|
1874
|
+
pt.P,
|
|
1875
|
+
pt.T,
|
|
1876
|
+
pt.D,
|
|
1877
|
+
pt.I,
|
|
1878
|
+
pt.O,
|
|
1879
|
+
pt.F,
|
|
1880
|
+
pt.S,
|
|
1881
|
+
pt.v,
|
|
1882
|
+
pt.R
|
|
1883
|
+
])), i = getOptionsObject(t), l = getTemporalDisambiguationOption(i), c = getTemporalOffsetOption(i, Q), s = getTemporalOverflowOption(i), d = interpretTemporalDateTimeFields(o.U, a, s);
|
|
1884
|
+
return createTemporalZonedDateTime(interpretISODateTimeOffset(d.o, d.p, te, parseDateTimeUtcOffset(a[pt.R]), o.Z, l, c, !0), o.Z, o.U);
|
|
1864
1885
|
}
|
|
1865
1886
|
withPlainTime(e = void 0) {
|
|
1866
1887
|
const t = getInternalSlotOrThrowForZonedDateTime(this), o = getIsoDateTimeForZonedDateTimeSlot(t);
|
|
1867
|
-
return createTemporalZonedDateTime(void 0 === e ? getStartOfDay(t.Z, o.o) : getEpochNanosecondsFor(t.Z, combineIsoDateAndTimeRecord(o.o, toTemporalTime(e)),
|
|
1888
|
+
return createTemporalZonedDateTime(void 0 === e ? getStartOfDay(t.Z, o.o) : getEpochNanosecondsFor(t.Z, combineIsoDateAndTimeRecord(o.o, toTemporalTime(e)), G), t.Z, t.U);
|
|
1868
1889
|
}
|
|
1869
1890
|
withTimeZone(e) {
|
|
1870
1891
|
const t = getInternalSlotOrThrowForZonedDateTime(this);
|
|
@@ -1887,39 +1908,39 @@ var Ee = class {
|
|
|
1887
1908
|
return differenceTemporalZonedDateTime(-1, getInternalSlotOrThrowForZonedDateTime(this), e, t);
|
|
1888
1909
|
}
|
|
1889
1910
|
round(e) {
|
|
1890
|
-
const t = getInternalSlotOrThrowForZonedDateTime(this), o = getRoundToOptionsObject(e), n = getRoundingIncrementOption(o), r = getRoundingModeOption(o, "halfExpand"), a = getTemporalUnitValuedOption(o, "smallestUnit",
|
|
1891
|
-
if (validateTemporalUnitValue(a,
|
|
1911
|
+
const t = getInternalSlotOrThrowForZonedDateTime(this), o = getRoundToOptionsObject(e), n = getRoundingIncrementOption(o), r = getRoundingModeOption(o, "halfExpand"), a = getTemporalUnitValuedOption(o, "smallestUnit", B);
|
|
1912
|
+
if (validateTemporalUnitValue(a, L, [d]), validateTemporalRoundingIncrement(n, a === d ? 1 : maximumTemporalDurationRoundingIncrement(a), a === d), a === D && 1 === n) return createTemporalZonedDateTimeFromSlot(t);
|
|
1892
1913
|
const i = getIsoDateTimeForZonedDateTimeSlot(t);
|
|
1893
|
-
if (a ===
|
|
1914
|
+
if (a === d) {
|
|
1894
1915
|
const e = getStartOfDay(t.Z, i.o), o = getStartOfDay(t.Z, addDaysToIsoDate(i.o, 1));
|
|
1895
1916
|
return createTemporalZonedDateTime(addNanosecondsToEpochSeconds(e, roundNumberToIncrement(timeDurationToSubsecondsNumber(differenceEpochNanoseconds(e, 1 !== compareEpochNanoseconds(o, t.Y) ? addNanosecondsToEpochSeconds(o, -1) : t.Y), -9), timeDurationToSubsecondsNumber(differenceEpochNanoseconds(e, o), -9), r)), t.Z, t.U);
|
|
1896
1917
|
}
|
|
1897
|
-
const l = roundIsoDateTime(i, n, a, r),
|
|
1898
|
-
return createTemporalZonedDateTime(interpretISODateTimeOffset(l.o, l.p,
|
|
1918
|
+
const l = roundIsoDateTime(i, n, a, r), c = getOffsetNanosecondsForZonedDateTimeSlot(t);
|
|
1919
|
+
return createTemporalZonedDateTime(interpretISODateTimeOffset(l.o, l.p, te, c, t.Z, G, Q, !0), t.Z, t.U);
|
|
1899
1920
|
}
|
|
1900
1921
|
equals(e) {
|
|
1901
1922
|
const t = getInternalSlotOrThrowForZonedDateTime(this), o = toTemporalZonedDateTime(e);
|
|
1902
1923
|
return !compareEpochNanoseconds(t.Y, o.Y) && timeZoneEquals(t.Z, o.Z) && calendarEquals(t.U, o.U);
|
|
1903
1924
|
}
|
|
1904
1925
|
toString(e = void 0) {
|
|
1905
|
-
const t = getInternalSlotOrThrowForZonedDateTime(this), o = getOptionsObject(e), n = getTemporalShowCalendarNameOption(o), r = getTemporalFractionalSecondDigitsOption(o), a = ((e) => getOption(e, "offset", [
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
],
|
|
1910
|
-
validateTemporalUnitValue(l,
|
|
1911
|
-
const
|
|
1912
|
-
return temporalZonedDateTimeToString(t,
|
|
1926
|
+
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, le), l = getTemporalUnitValuedOption(o, "smallestUnit", void 0), c = ((e) => getOption(e, "timeZoneName", [
|
|
1927
|
+
Ie,
|
|
1928
|
+
Oe,
|
|
1929
|
+
Fe
|
|
1930
|
+
], Ie))(o);
|
|
1931
|
+
validateTemporalUnitValue(l, L), l === m && throwRangeError(invalidField("smallestUnit"));
|
|
1932
|
+
const s = toSecondsStringPrecisionRecord(l, r);
|
|
1933
|
+
return temporalZonedDateTimeToString(t, s.ye, n, c, a, s.Pe, s.Ee, i);
|
|
1913
1934
|
}
|
|
1914
1935
|
toLocaleString(e = void 0, t = void 0) {
|
|
1915
|
-
const o = getInternalSlotOrThrowForZonedDateTime(this), n = createDateTimeFormat(e, t,
|
|
1916
|
-
return "iso8601" === o.U || calendarEquals(o.U,
|
|
1936
|
+
const o = getInternalSlotOrThrowForZonedDateTime(this), n = createDateTimeFormat(e, t, H, o.Z);
|
|
1937
|
+
return "iso8601" === o.U || calendarEquals(o.U, n.$e.calendar) || throwRangeError(M), formatDateTime(n, createTemporalInstant(o.Y));
|
|
1917
1938
|
}
|
|
1918
1939
|
toJSON() {
|
|
1919
|
-
return temporalZonedDateTimeToString(getInternalSlotOrThrowForZonedDateTime(this), void 0,
|
|
1940
|
+
return temporalZonedDateTimeToString(getInternalSlotOrThrowForZonedDateTime(this), void 0, Te, Ie, ge);
|
|
1920
1941
|
}
|
|
1921
1942
|
valueOf() {
|
|
1922
|
-
throwTypeError(
|
|
1943
|
+
throwTypeError(Y);
|
|
1923
1944
|
}
|
|
1924
1945
|
startOfDay() {
|
|
1925
1946
|
const e = getInternalSlotOrThrowForZonedDateTime(this);
|
|
@@ -1927,8 +1948,8 @@ var Ee = class {
|
|
|
1927
1948
|
}
|
|
1928
1949
|
getTimeZoneTransition(e) {
|
|
1929
1950
|
const t = getInternalSlotOrThrowForZonedDateTime(this);
|
|
1930
|
-
void 0 === e && throwTypeError(
|
|
1931
|
-
const o = getOption("string" == typeof e ? { direction: e } : getOptionsObject(e), "direction", ["next", "previous"],
|
|
1951
|
+
void 0 === e && throwTypeError(W);
|
|
1952
|
+
const o = getOption("string" == typeof e ? { direction: e } : getOptionsObject(e), "direction", ["next", "previous"], B), n = ((e, t, o) => {
|
|
1932
1953
|
if ("UTC" === e || isOffsetTimeZoneIdentifier(e)) return null;
|
|
1933
1954
|
const n = -4e9, r = Math.floor((Date.now() + 31536e7) / 1e3), a = clamp(epochSeconds(addNanosecondsToEpochSeconds(t, o > 0 ? 0 : -1)), n, Infinity);
|
|
1934
1955
|
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);
|
|
@@ -1950,9 +1971,9 @@ var Ee = class {
|
|
|
1950
1971
|
return createTemporalDateTime(getIsoDateTimeForZonedDateTimeSlot(e), e.U);
|
|
1951
1972
|
}
|
|
1952
1973
|
};
|
|
1953
|
-
defineStringTag(
|
|
1954
|
-
const
|
|
1955
|
-
var
|
|
1974
|
+
defineStringTag(Re.prototype, "Temporal.ZonedDateTime"), renameFunction(Re, "ZonedDateTime");
|
|
1975
|
+
const be = createNullPrototypeObject(), Ze = createNullPrototypeObject(), Ne = /* @__PURE__ */ new WeakMap();
|
|
1976
|
+
var Me = class {
|
|
1956
1977
|
constructor(e, t, o, n = 0, r = 0, a = 0, i = 0, l = 0, c = 0, s = "iso8601") {
|
|
1957
1978
|
const d = [
|
|
1958
1979
|
e,
|
|
@@ -1968,7 +1989,7 @@ var Ze = class {
|
|
|
1968
1989
|
].map(toIntegerWithTruncation);
|
|
1969
1990
|
validateString(s);
|
|
1970
1991
|
const u = canonicalizeCalendar(s);
|
|
1971
|
-
isValidIsoDate(...d) && isValidTime(...m) || throwRangeError(
|
|
1992
|
+
isValidIsoDate(...d) && isValidTime(...m) || throwRangeError(R), createTemporalDateTime(combineIsoDateAndTimeRecord(createIsoDateRecord(...d), createTimeRecord(...m)), u, this);
|
|
1972
1993
|
}
|
|
1973
1994
|
static from(e, t = void 0) {
|
|
1974
1995
|
return toTemporalDateTime(e, t);
|
|
@@ -2046,16 +2067,16 @@ var Ze = class {
|
|
|
2046
2067
|
const o = getInternalSlotOrThrowForPlainDateTime(this);
|
|
2047
2068
|
validatePartialTemporalObject(e);
|
|
2048
2069
|
const n = calendarMergeFields(o.U, isoDateTimeToFields(o.U, o.K), prepareCalendarFields(o.U, e, [
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2070
|
+
pt.t,
|
|
2071
|
+
pt.u,
|
|
2072
|
+
pt.P,
|
|
2073
|
+
pt.T,
|
|
2074
|
+
pt.D,
|
|
2075
|
+
pt.I,
|
|
2076
|
+
pt.O,
|
|
2077
|
+
pt.F,
|
|
2078
|
+
pt.S,
|
|
2079
|
+
pt.v
|
|
2059
2080
|
]));
|
|
2060
2081
|
return createTemporalDateTime(interpretTemporalDateTimeFields(o.U, n, getTemporalOverflowOption(getOptionsObject(t))), o.U);
|
|
2061
2082
|
}
|
|
@@ -2079,28 +2100,28 @@ var Ze = class {
|
|
|
2079
2100
|
return differenceTemporalPlainDateTime(-1, getInternalSlotOrThrowForPlainDateTime(this), e, t);
|
|
2080
2101
|
}
|
|
2081
2102
|
round(e) {
|
|
2082
|
-
const t = getInternalSlotOrThrowForPlainDateTime(this), o = getRoundToOptionsObject(e), n = getRoundingIncrementOption(o), r = getRoundingModeOption(o, "halfExpand"), a = getTemporalUnitValuedOption(o, "smallestUnit",
|
|
2083
|
-
return validateTemporalUnitValue(a,
|
|
2103
|
+
const t = getInternalSlotOrThrowForPlainDateTime(this), o = getRoundToOptionsObject(e), n = getRoundingIncrementOption(o), r = getRoundingModeOption(o, "halfExpand"), a = getTemporalUnitValuedOption(o, "smallestUnit", B);
|
|
2104
|
+
return validateTemporalUnitValue(a, L, [d]), validateTemporalRoundingIncrement(n, a === d ? 1 : maximumTemporalDurationRoundingIncrement(a), a === d), createTemporalDateTime(roundIsoDateTime(t.K, n, a, r), t.U);
|
|
2084
2105
|
}
|
|
2085
2106
|
equals(e) {
|
|
2086
2107
|
const t = getInternalSlotOrThrowForPlainDateTime(this), o = getInternalSlotOrThrowForPlainDateTime(toTemporalDateTime(e));
|
|
2087
2108
|
return !compareIsoDateTime(t.K, o.K) && calendarEquals(t.U, o.U);
|
|
2088
2109
|
}
|
|
2089
2110
|
toString(e = void 0) {
|
|
2090
|
-
const t = getInternalSlotOrThrowForPlainDateTime(this), o = getOptionsObject(e), n = getTemporalShowCalendarNameOption(o), r = getTemporalFractionalSecondDigitsOption(o), a = getRoundingModeOption(o,
|
|
2091
|
-
validateTemporalUnitValue(i,
|
|
2111
|
+
const t = getInternalSlotOrThrowForPlainDateTime(this), o = getOptionsObject(e), n = getTemporalShowCalendarNameOption(o), r = getTemporalFractionalSecondDigitsOption(o), a = getRoundingModeOption(o, le), i = getTemporalUnitValuedOption(o, "smallestUnit", void 0);
|
|
2112
|
+
validateTemporalUnitValue(i, L), i === m && throwRangeError(invalidField("smallestUnit"));
|
|
2092
2113
|
const l = toSecondsStringPrecisionRecord(i, r);
|
|
2093
2114
|
return isoDateTimeToString(validateIsoDateTime(roundIsoDateTime(t.K, l.Pe, l.Ee, a)), t.U, l.ye, n);
|
|
2094
2115
|
}
|
|
2095
2116
|
toLocaleString(e = void 0, t = void 0) {
|
|
2096
|
-
return getInternalSlotOrThrowForPlainDateTime(this), formatDateTime(createDateTimeFormat(e, t,
|
|
2117
|
+
return getInternalSlotOrThrowForPlainDateTime(this), formatDateTime(createDateTimeFormat(e, t, H), this);
|
|
2097
2118
|
}
|
|
2098
2119
|
toJSON() {
|
|
2099
2120
|
const e = getInternalSlotOrThrowForPlainDateTime(this);
|
|
2100
|
-
return isoDateTimeToString(e.K, e.U, void 0,
|
|
2121
|
+
return isoDateTimeToString(e.K, e.U, void 0, Te);
|
|
2101
2122
|
}
|
|
2102
2123
|
valueOf() {
|
|
2103
|
-
throwTypeError(
|
|
2124
|
+
throwTypeError(Y);
|
|
2104
2125
|
}
|
|
2105
2126
|
toZonedDateTime(e, t = void 0) {
|
|
2106
2127
|
const o = getInternalSlotOrThrowForPlainDateTime(this), n = toTemporalTimeZoneIdentifier(e), r = getTemporalDisambiguationOption(getOptionsObject(t));
|
|
@@ -2114,9 +2135,9 @@ var Ze = class {
|
|
|
2114
2135
|
return createTemporalTime(getInternalSlotOrThrowForPlainDateTime(this).K.p);
|
|
2115
2136
|
}
|
|
2116
2137
|
};
|
|
2117
|
-
defineStringTag(
|
|
2118
|
-
const
|
|
2119
|
-
var
|
|
2138
|
+
defineStringTag(Me.prototype, "Temporal.PlainDateTime"), renameFunction(Me, "PlainDateTime");
|
|
2139
|
+
const Ue = /* @__PURE__ */ new WeakMap();
|
|
2140
|
+
var je = class {
|
|
2120
2141
|
constructor(e = 0, t = 0, o = 0, n = 0, r = 0, a = 0) {
|
|
2121
2142
|
const i = [
|
|
2122
2143
|
e,
|
|
@@ -2126,7 +2147,7 @@ var Me = class {
|
|
|
2126
2147
|
r,
|
|
2127
2148
|
a
|
|
2128
2149
|
].map(toIntegerWithTruncation);
|
|
2129
|
-
isValidTime(...i) || throwRangeError(
|
|
2150
|
+
isValidTime(...i) || throwRangeError(R), createTemporalTime(createTimeRecord(...i), this);
|
|
2130
2151
|
}
|
|
2131
2152
|
static from(e, t = void 0) {
|
|
2132
2153
|
return createTemporalTime(toTemporalTime(e, t));
|
|
@@ -2176,54 +2197,54 @@ var Me = class {
|
|
|
2176
2197
|
return differenceTemporalPlainTime(-1, getInternalSlotOrThrowForPlainTime(this), e, t);
|
|
2177
2198
|
}
|
|
2178
2199
|
round(e) {
|
|
2179
|
-
const t = getInternalSlotOrThrowForPlainTime(this), o = getRoundToOptionsObject(e), n = getRoundingIncrementOption(o), r = getRoundingModeOption(o,
|
|
2180
|
-
return validateTemporalUnitValue(a,
|
|
2200
|
+
const t = getInternalSlotOrThrowForPlainTime(this), o = getRoundToOptionsObject(e), n = getRoundingIncrementOption(o), r = getRoundingModeOption(o, de), a = getTemporalUnitValuedOption(o, "smallestUnit", B);
|
|
2201
|
+
return validateTemporalUnitValue(a, L), validateTemporalRoundingIncrement(n, maximumTemporalDurationRoundingIncrement(a), !1), createTemporalTime(roundTime(t, n, a, r));
|
|
2181
2202
|
}
|
|
2182
2203
|
equals(e) {
|
|
2183
2204
|
return !compareTimeRecord(getInternalSlotOrThrowForPlainTime(this), toTemporalTime(e));
|
|
2184
2205
|
}
|
|
2185
2206
|
toString(e = void 0) {
|
|
2186
|
-
const t = getInternalSlotOrThrowForPlainTime(this), o = getOptionsObject(e), n = getTemporalFractionalSecondDigitsOption(o), r = getRoundingModeOption(o,
|
|
2187
|
-
validateTemporalUnitValue(a,
|
|
2207
|
+
const t = getInternalSlotOrThrowForPlainTime(this), o = getOptionsObject(e), n = getTemporalFractionalSecondDigitsOption(o), r = getRoundingModeOption(o, le), a = getTemporalUnitValuedOption(o, "smallestUnit", void 0);
|
|
2208
|
+
validateTemporalUnitValue(a, L), a === m && throwRangeError(invalidField("smallestUnit"));
|
|
2188
2209
|
const i = toSecondsStringPrecisionRecord(a, n);
|
|
2189
2210
|
return timeRecordToString(roundTime(t, i.Pe, i.Ee, r), i.ye);
|
|
2190
2211
|
}
|
|
2191
2212
|
toLocaleString(e = void 0, t = void 0) {
|
|
2192
|
-
return getInternalSlotOrThrowForPlainTime(this), formatDateTime(createDateTimeFormat(e, t,
|
|
2213
|
+
return getInternalSlotOrThrowForPlainTime(this), formatDateTime(createDateTimeFormat(e, t, L), this);
|
|
2193
2214
|
}
|
|
2194
2215
|
toJSON() {
|
|
2195
2216
|
return timeRecordToString(getInternalSlotOrThrowForPlainTime(this));
|
|
2196
2217
|
}
|
|
2197
2218
|
valueOf() {
|
|
2198
|
-
throwTypeError(
|
|
2219
|
+
throwTypeError(Y);
|
|
2199
2220
|
}
|
|
2200
2221
|
};
|
|
2201
|
-
defineStringTag(
|
|
2202
|
-
const
|
|
2203
|
-
`(?<d>${
|
|
2204
|
-
`(?<y>:?)(?<e>${
|
|
2222
|
+
defineStringTag(je.prototype, "Temporal.PlainTime"), renameFunction(je, "PlainTime");
|
|
2223
|
+
const $e = "\\d{4}|[-+]\\d{6}", Ce = "0[1-9]|1[0-2]", Ye = "0[1-9]|[12]\\d|30|31", We = "[01]\\d|2[0-3]", Ae = "[0-5]\\d", ze = `(?<a>${$e})(?<x>-?)(?<b>${Ce})\\k<x>(?<c>${Ye})`, ke = optionalChain([
|
|
2224
|
+
`(?<d>${We})`,
|
|
2225
|
+
`(?<y>:?)(?<e>${Ae})`,
|
|
2205
2226
|
"\\k<y>(?<f>[0-5]\\d|60)",
|
|
2206
2227
|
"[.,](?<g>\\d{1,9})"
|
|
2207
|
-
]), ze = optionalChain([
|
|
2208
|
-
`([+-])(${Ce})`,
|
|
2209
|
-
`(?<z>:?)(${Ye})`,
|
|
2210
|
-
`\\k<z>(${Ye})`,
|
|
2211
|
-
"[.,](\\d{1,9})"
|
|
2212
2228
|
]), Ve = optionalChain([
|
|
2213
|
-
We
|
|
2214
|
-
`
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2229
|
+
`([+-])(${We})`,
|
|
2230
|
+
`(?<z>:?)(${Ae})`,
|
|
2231
|
+
`\\k<z>(${Ae})`,
|
|
2232
|
+
"[.,](\\d{1,9})"
|
|
2233
|
+
]), Le = optionalChain([
|
|
2234
|
+
ze,
|
|
2235
|
+
`[ tT]${ke}`,
|
|
2236
|
+
`(?<h>${Ve})`
|
|
2237
|
+
]), He = `(?<l>${$e})-?(?<m>${Ce})`, xe = `(?:--)?(?<m>${Ce})-?(?<n>${Ye})`, qe = `(?<h>${Ve})|(?<i>[zZ])`, Be = `([+-])(${We})(?::?(${Ae}))?|${join("[a-zA-Z._][a-zA-Z._+-\\d]*", "\\/")}`, Je = `\\[!?(?<j>${Be})\\]`, _e = join("[a-zA-Z\\d]+", "-"), Xe = `\\[(!)?([a-z_][a-z\\d_-]*)=(${_e})\\]`, Ge = `(?<k>(${Xe})*)`, Ke = RegExp(Xe, "g"), Qe = createRegExp(`${optionalChain([
|
|
2238
|
+
ze,
|
|
2239
|
+
`[ tT]${ke}`,
|
|
2240
|
+
qe
|
|
2241
|
+
])}${Je}${Ge}`), et = createRegExp(`${Le}(?:${Je})?${Ge}`), tt = createRegExp(`${ze}[ tT]${ke}(?:${qe})(?:${Je})?${Ge}`), ot = createRegExp(`(${ze}[ tT]|[tT]?)${ke}(?<h>${Ve})?(?:${Je})?${Ge}`), nt = createRegExp(`(${Le}|${xe})(?:${Je})?${Ge}`), rt = createRegExp(`(${Le}|${He})(?:${Je})?${Ge}`), at = [createRegExp(`${xe}(${Je})?(${Xe})*`), createRegExp(`${He}(${Je})?(${Xe})*`)], it = createRegExp(Be), lt = createRegExp(_e), ct = createRegExp(Ve), st = /* @__PURE__ */ new WeakMap();
|
|
2242
|
+
var dt = class {
|
|
2222
2243
|
constructor(e, t, o = "iso8601", n = 1972) {
|
|
2223
2244
|
const r = toIntegerWithTruncation(e), a = toIntegerWithTruncation(t);
|
|
2224
2245
|
validateString(o);
|
|
2225
2246
|
const i = canonicalizeCalendar(o), l = toIntegerWithTruncation(n);
|
|
2226
|
-
isValidIsoDate(l, r, a) || throwRangeError(
|
|
2247
|
+
isValidIsoDate(l, r, a) || throwRangeError(R), createTemporalMonthDay(createIsoDateRecord(l, r, a), i, this);
|
|
2227
2248
|
}
|
|
2228
2249
|
static from(e, t = void 0) {
|
|
2229
2250
|
return toTemporalMonthDay(e, t);
|
|
@@ -2241,11 +2262,11 @@ var ct = class {
|
|
|
2241
2262
|
}
|
|
2242
2263
|
with(e, t = void 0) {
|
|
2243
2264
|
const o = getInternalSlotOrThrowForPlainMonthDay(this);
|
|
2244
|
-
return validatePartialTemporalObject(e), createTemporalMonthDay(calendarMonthDayFromFields(o.U, calendarMergeFields(o.U, isoDateToFields(o.U, o.o,
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2265
|
+
return validatePartialTemporalObject(e), createTemporalMonthDay(calendarMonthDayFromFields(o.U, calendarMergeFields(o.U, isoDateToFields(o.U, o.o, q), prepareCalendarFields(o.U, e, [
|
|
2266
|
+
pt.t,
|
|
2267
|
+
pt.u,
|
|
2268
|
+
pt.P,
|
|
2269
|
+
pt.T
|
|
2249
2270
|
])), getTemporalOverflowOption(getOptionsObject(t))), o.U);
|
|
2250
2271
|
}
|
|
2251
2272
|
equals(e) {
|
|
@@ -2256,27 +2277,27 @@ var ct = class {
|
|
|
2256
2277
|
return temporalMonthDayToString(getInternalSlotOrThrowForPlainMonthDay(this), getTemporalShowCalendarNameOption(getOptionsObject(e)));
|
|
2257
2278
|
}
|
|
2258
2279
|
toLocaleString(e = void 0, t = void 0) {
|
|
2259
|
-
return getInternalSlotOrThrowForPlainMonthDay(this), formatDateTime(createDateTimeFormat(e, t,
|
|
2280
|
+
return getInternalSlotOrThrowForPlainMonthDay(this), formatDateTime(createDateTimeFormat(e, t, V), this);
|
|
2260
2281
|
}
|
|
2261
2282
|
toJSON() {
|
|
2262
|
-
return temporalMonthDayToString(getInternalSlotOrThrowForPlainMonthDay(this),
|
|
2283
|
+
return temporalMonthDayToString(getInternalSlotOrThrowForPlainMonthDay(this), Te);
|
|
2263
2284
|
}
|
|
2264
2285
|
valueOf() {
|
|
2265
|
-
throwTypeError(
|
|
2286
|
+
throwTypeError(Y);
|
|
2266
2287
|
}
|
|
2267
2288
|
toPlainDate(e) {
|
|
2268
2289
|
const t = getInternalSlotOrThrowForPlainMonthDay(this);
|
|
2269
|
-
return isObject(e) || throwTypeError(notObject(e)), createTemporalDate(calendarDateFromFields(t.U, calendarMergeFields(t.U, isoDateToFields(t.U, t.o,
|
|
2290
|
+
return isObject(e) || throwTypeError(notObject(e)), createTemporalDate(calendarDateFromFields(t.U, calendarMergeFields(t.U, isoDateToFields(t.U, t.o, q), prepareCalendarFields(t.U, e, [pt.t], [])), _), t.U);
|
|
2270
2291
|
}
|
|
2271
2292
|
};
|
|
2272
|
-
defineStringTag(
|
|
2273
|
-
const
|
|
2274
|
-
var
|
|
2293
|
+
defineStringTag(dt.prototype, "Temporal.PlainMonthDay"), renameFunction(dt, "PlainMonthDay");
|
|
2294
|
+
const mt = /* @__PURE__ */ new WeakMap();
|
|
2295
|
+
var ut = class {
|
|
2275
2296
|
constructor(e, t, o = "iso8601", n = 1) {
|
|
2276
2297
|
const r = toIntegerWithTruncation(e), a = toIntegerWithTruncation(t);
|
|
2277
2298
|
validateString(o);
|
|
2278
2299
|
const i = canonicalizeCalendar(o), l = toIntegerWithTruncation(n);
|
|
2279
|
-
isValidIsoDate(r, a, l) || throwRangeError(
|
|
2300
|
+
isValidIsoDate(r, a, l) || throwRangeError(R), createTemporalYearMonth(createIsoDateRecord(r, a, l), i, this);
|
|
2280
2301
|
}
|
|
2281
2302
|
static from(e, t = void 0) {
|
|
2282
2303
|
return toTemporalYearMonth(e, t);
|
|
@@ -2317,10 +2338,10 @@ var dt = class {
|
|
|
2317
2338
|
with(e, t = void 0) {
|
|
2318
2339
|
const o = getInternalSlotOrThrowForPlainYearMonth(this);
|
|
2319
2340
|
validatePartialTemporalObject(e);
|
|
2320
|
-
const n = calendarMergeFields(o.U, isoDateToFields(o.U, o.o,
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2341
|
+
const n = calendarMergeFields(o.U, isoDateToFields(o.U, o.o, x), prepareCalendarFields(o.U, e, [
|
|
2342
|
+
pt.t,
|
|
2343
|
+
pt.u,
|
|
2344
|
+
pt.P
|
|
2324
2345
|
]));
|
|
2325
2346
|
return createTemporalYearMonth(calendarYearMonthFromFields(o.U, n, getTemporalOverflowOption(getOptionsObject(t))), o.U);
|
|
2326
2347
|
}
|
|
@@ -2344,27 +2365,27 @@ var dt = class {
|
|
|
2344
2365
|
return temporalYearMonthToString(getInternalSlotOrThrowForPlainYearMonth(this), getTemporalShowCalendarNameOption(getOptionsObject(e)));
|
|
2345
2366
|
}
|
|
2346
2367
|
toLocaleString(e = void 0, t = void 0) {
|
|
2347
|
-
return getInternalSlotOrThrowForPlainYearMonth(this), formatDateTime(createDateTimeFormat(e, t,
|
|
2368
|
+
return getInternalSlotOrThrowForPlainYearMonth(this), formatDateTime(createDateTimeFormat(e, t, V), this);
|
|
2348
2369
|
}
|
|
2349
2370
|
toJSON() {
|
|
2350
|
-
return temporalYearMonthToString(getInternalSlotOrThrowForPlainYearMonth(this),
|
|
2371
|
+
return temporalYearMonthToString(getInternalSlotOrThrowForPlainYearMonth(this), Te);
|
|
2351
2372
|
}
|
|
2352
2373
|
valueOf() {
|
|
2353
|
-
throwTypeError(
|
|
2374
|
+
throwTypeError(Y);
|
|
2354
2375
|
}
|
|
2355
2376
|
toPlainDate(e) {
|
|
2356
2377
|
const t = getInternalSlotOrThrowForPlainYearMonth(this);
|
|
2357
|
-
return isObject(e) || throwTypeError(notObject(e)), createTemporalDate(calendarDateFromFields(t.U, calendarMergeFields(t.U, isoDateToFields(t.U, t.o,
|
|
2378
|
+
return isObject(e) || throwTypeError(notObject(e)), createTemporalDate(calendarDateFromFields(t.U, calendarMergeFields(t.U, isoDateToFields(t.U, t.o, x), prepareCalendarFields(t.U, e, [pt.T], [])), _), t.U);
|
|
2358
2379
|
}
|
|
2359
2380
|
};
|
|
2360
|
-
defineStringTag(
|
|
2361
|
-
const
|
|
2362
|
-
var
|
|
2381
|
+
defineStringTag(ut.prototype, "Temporal.PlainYearMonth"), renameFunction(ut, "PlainYearMonth");
|
|
2382
|
+
const Tt = /* @__PURE__ */ new WeakMap();
|
|
2383
|
+
var Dt = class {
|
|
2363
2384
|
constructor(e, t, o, n = "iso8601") {
|
|
2364
2385
|
const r = toIntegerWithTruncation(e), a = toIntegerWithTruncation(t), i = toIntegerWithTruncation(o);
|
|
2365
2386
|
validateString(n);
|
|
2366
2387
|
const l = canonicalizeCalendar(n);
|
|
2367
|
-
isValidIsoDate(r, a, i) || throwRangeError(
|
|
2388
|
+
isValidIsoDate(r, a, i) || throwRangeError(R), createTemporalDate(createIsoDateRecord(r, a, i), l, this);
|
|
2368
2389
|
}
|
|
2369
2390
|
static from(e, t = void 0) {
|
|
2370
2391
|
return toTemporalDate(e, t);
|
|
@@ -2422,11 +2443,11 @@ var ut = class {
|
|
|
2422
2443
|
}
|
|
2423
2444
|
toPlainYearMonth() {
|
|
2424
2445
|
const e = getInternalSlotOrThrowForPlainDate(this);
|
|
2425
|
-
return createTemporalYearMonth(calendarYearMonthFromFields(e.U, isoDateToFields(e.U, e.o,
|
|
2446
|
+
return createTemporalYearMonth(calendarYearMonthFromFields(e.U, isoDateToFields(e.U, e.o, V), _), e.U);
|
|
2426
2447
|
}
|
|
2427
2448
|
toPlainMonthDay() {
|
|
2428
2449
|
const e = getInternalSlotOrThrowForPlainDate(this);
|
|
2429
|
-
return createTemporalMonthDay(calendarMonthDayFromFields(e.U, isoDateToFields(e.U, e.o,
|
|
2450
|
+
return createTemporalMonthDay(calendarMonthDayFromFields(e.U, isoDateToFields(e.U, e.o, V), _), e.U);
|
|
2430
2451
|
}
|
|
2431
2452
|
add(e, t = void 0) {
|
|
2432
2453
|
return addDurationToDate(1, getInternalSlotOrThrowForPlainDate(this), e, t);
|
|
@@ -2437,11 +2458,11 @@ var ut = class {
|
|
|
2437
2458
|
with(e, t = void 0) {
|
|
2438
2459
|
const o = getInternalSlotOrThrowForPlainDate(this);
|
|
2439
2460
|
validatePartialTemporalObject(e);
|
|
2440
|
-
const n = calendarMergeFields(o.U, isoDateToFields(o.U, o.o,
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2461
|
+
const n = calendarMergeFields(o.U, isoDateToFields(o.U, o.o, V), prepareCalendarFields(o.U, e, [
|
|
2462
|
+
pt.t,
|
|
2463
|
+
pt.u,
|
|
2464
|
+
pt.P,
|
|
2465
|
+
pt.T
|
|
2445
2466
|
])), r = getTemporalOverflowOption(getOptionsObject(t));
|
|
2446
2467
|
return createTemporalDate(calendarDateFromFields(o.U, n, r), o.U);
|
|
2447
2468
|
}
|
|
@@ -2469,23 +2490,23 @@ var ut = class {
|
|
|
2469
2490
|
const t = e.timeZone;
|
|
2470
2491
|
void 0 === t ? n = toTemporalTimeZoneIdentifier(e) : (n = toTemporalTimeZoneIdentifier(t), o = e.plainTime);
|
|
2471
2492
|
} else n = toTemporalTimeZoneIdentifier(e);
|
|
2472
|
-
return createTemporalZonedDateTime(void 0 === o ? getStartOfDay(n, t.o) : getEpochNanosecondsFor(n, validateIsoDateTime(combineIsoDateAndTimeRecord(t.o, toTemporalTime(o))),
|
|
2493
|
+
return createTemporalZonedDateTime(void 0 === o ? getStartOfDay(n, t.o) : getEpochNanosecondsFor(n, validateIsoDateTime(combineIsoDateAndTimeRecord(t.o, toTemporalTime(o))), G), n, t.U);
|
|
2473
2494
|
}
|
|
2474
2495
|
toString(e = void 0) {
|
|
2475
2496
|
return temporalDateToString(getInternalSlotOrThrowForPlainDate(this), getTemporalShowCalendarNameOption(getOptionsObject(e)));
|
|
2476
2497
|
}
|
|
2477
2498
|
toLocaleString(e = void 0, t = void 0) {
|
|
2478
|
-
return getInternalSlotOrThrowForPlainDate(this), formatDateTime(createDateTimeFormat(e, t,
|
|
2499
|
+
return getInternalSlotOrThrowForPlainDate(this), formatDateTime(createDateTimeFormat(e, t, V), this);
|
|
2479
2500
|
}
|
|
2480
2501
|
toJSON() {
|
|
2481
|
-
return temporalDateToString(getInternalSlotOrThrowForPlainDate(this),
|
|
2502
|
+
return temporalDateToString(getInternalSlotOrThrowForPlainDate(this), Te);
|
|
2482
2503
|
}
|
|
2483
2504
|
valueOf() {
|
|
2484
|
-
throwTypeError(
|
|
2505
|
+
throwTypeError(Y);
|
|
2485
2506
|
}
|
|
2486
2507
|
};
|
|
2487
|
-
defineStringTag(
|
|
2488
|
-
const
|
|
2508
|
+
defineStringTag(Dt.prototype, "Temporal.PlainDate"), renameFunction(Dt, "PlainDate");
|
|
2509
|
+
const pt = {
|
|
2489
2510
|
ne: "era",
|
|
2490
2511
|
re: "eraYear",
|
|
2491
2512
|
t: "year",
|
|
@@ -2500,41 +2521,41 @@ const Tt = {
|
|
|
2500
2521
|
v: "nanosecond",
|
|
2501
2522
|
R: "offset",
|
|
2502
2523
|
Z: "timeZone"
|
|
2503
|
-
},
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
],
|
|
2519
|
-
[
|
|
2520
|
-
[
|
|
2521
|
-
[
|
|
2522
|
-
[
|
|
2523
|
-
[
|
|
2524
|
-
[
|
|
2525
|
-
[
|
|
2526
|
-
[
|
|
2527
|
-
[
|
|
2528
|
-
[
|
|
2529
|
-
[
|
|
2530
|
-
[
|
|
2531
|
-
[
|
|
2524
|
+
}, ht = [
|
|
2525
|
+
pt.ne,
|
|
2526
|
+
pt.re,
|
|
2527
|
+
pt.t,
|
|
2528
|
+
pt.u,
|
|
2529
|
+
pt.P,
|
|
2530
|
+
pt.T,
|
|
2531
|
+
pt.D,
|
|
2532
|
+
pt.I,
|
|
2533
|
+
pt.O,
|
|
2534
|
+
pt.F,
|
|
2535
|
+
pt.S,
|
|
2536
|
+
pt.v,
|
|
2537
|
+
pt.R,
|
|
2538
|
+
pt.Z
|
|
2539
|
+
], gt = {
|
|
2540
|
+
[pt.ne]: [toString],
|
|
2541
|
+
[pt.re]: [toIntegerWithTruncation],
|
|
2542
|
+
[pt.t]: [toIntegerWithTruncation],
|
|
2543
|
+
[pt.u]: [toPositiveIntegerWithTruncation],
|
|
2544
|
+
[pt.P]: [(e) => createMonthCode(...parseMonthCode(e))],
|
|
2545
|
+
[pt.T]: [toPositiveIntegerWithTruncation],
|
|
2546
|
+
[pt.D]: [toIntegerWithTruncation, 0],
|
|
2547
|
+
[pt.I]: [toIntegerWithTruncation, 0],
|
|
2548
|
+
[pt.O]: [toIntegerWithTruncation, 0],
|
|
2549
|
+
[pt.F]: [toIntegerWithTruncation, 0],
|
|
2550
|
+
[pt.S]: [toIntegerWithTruncation, 0],
|
|
2551
|
+
[pt.v]: [toIntegerWithTruncation, 0],
|
|
2552
|
+
[pt.R]: [(e) => {
|
|
2532
2553
|
const t = toPrimitive(e);
|
|
2533
2554
|
return validateString(t), parseDateTimeUtcOffset(t), t;
|
|
2534
2555
|
}],
|
|
2535
|
-
[
|
|
2536
|
-
},
|
|
2537
|
-
var
|
|
2556
|
+
[pt.Z]: [toTemporalTimeZoneIdentifier]
|
|
2557
|
+
}, ft = /* @__PURE__ */ new WeakMap(), It = signTimeDuration;
|
|
2558
|
+
var Ot = class {
|
|
2538
2559
|
constructor(e = 0, t = 0, o = 0, n = 0, r = 0, a = 0, i = 0, l = 0, c = 0, s = 0) {
|
|
2539
2560
|
createTemporalDuration(createTemporalDurationSlot([
|
|
2540
2561
|
e,
|
|
@@ -2557,37 +2578,37 @@ var ft = class {
|
|
|
2557
2578
|
if (!n.some((e, t) => r[t] !== e)) return 0;
|
|
2558
2579
|
const i = defaultTemporalLargestUnit(n), l = defaultTemporalLargestUnit(r), c = toInternalDurationRecord(n), s = toInternalDurationRecord(r);
|
|
2559
2580
|
let d, m;
|
|
2560
|
-
return a.Re && (isDateUnit(i) || isDateUnit(l)) ? compareEpochNanoseconds(addZonedDateTime(a.Re, c,
|
|
2581
|
+
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]), Ee(add24HourDaysToTimeDuration(c.p, d), add24HourDaysToTimeDuration(s.p, m)));
|
|
2561
2582
|
}
|
|
2562
2583
|
get years() {
|
|
2563
|
-
return getInternalSlotOrThrowForDuration(this)[
|
|
2584
|
+
return getInternalSlotOrThrowForDuration(this)[p];
|
|
2564
2585
|
}
|
|
2565
2586
|
get months() {
|
|
2566
|
-
return getInternalSlotOrThrowForDuration(this)[
|
|
2587
|
+
return getInternalSlotOrThrowForDuration(this)[h];
|
|
2567
2588
|
}
|
|
2568
2589
|
get weeks() {
|
|
2569
|
-
return getInternalSlotOrThrowForDuration(this)[
|
|
2590
|
+
return getInternalSlotOrThrowForDuration(this)[g];
|
|
2570
2591
|
}
|
|
2571
2592
|
get days() {
|
|
2572
|
-
return getInternalSlotOrThrowForDuration(this)[
|
|
2593
|
+
return getInternalSlotOrThrowForDuration(this)[f];
|
|
2573
2594
|
}
|
|
2574
2595
|
get hours() {
|
|
2575
|
-
return getInternalSlotOrThrowForDuration(this)[
|
|
2596
|
+
return getInternalSlotOrThrowForDuration(this)[I];
|
|
2576
2597
|
}
|
|
2577
2598
|
get minutes() {
|
|
2578
|
-
return getInternalSlotOrThrowForDuration(this)[
|
|
2599
|
+
return getInternalSlotOrThrowForDuration(this)[O];
|
|
2579
2600
|
}
|
|
2580
2601
|
get seconds() {
|
|
2581
|
-
return getInternalSlotOrThrowForDuration(this)[
|
|
2602
|
+
return getInternalSlotOrThrowForDuration(this)[F];
|
|
2582
2603
|
}
|
|
2583
2604
|
get milliseconds() {
|
|
2584
|
-
return getInternalSlotOrThrowForDuration(this)[
|
|
2605
|
+
return getInternalSlotOrThrowForDuration(this)[S];
|
|
2585
2606
|
}
|
|
2586
2607
|
get microseconds() {
|
|
2587
|
-
return getInternalSlotOrThrowForDuration(this)[
|
|
2608
|
+
return getInternalSlotOrThrowForDuration(this)[w];
|
|
2588
2609
|
}
|
|
2589
2610
|
get nanoseconds() {
|
|
2590
|
-
return getInternalSlotOrThrowForDuration(this)[
|
|
2611
|
+
return getInternalSlotOrThrowForDuration(this)[v];
|
|
2591
2612
|
}
|
|
2592
2613
|
get sign() {
|
|
2593
2614
|
return durationSign(getInternalSlotOrThrowForDuration(this));
|
|
@@ -2614,81 +2635,78 @@ var ft = class {
|
|
|
2614
2635
|
round(e) {
|
|
2615
2636
|
const t = getInternalSlotOrThrowForDuration(this), o = getRoundToOptionsObject(e);
|
|
2616
2637
|
let n = getTemporalUnitValuedOption(o, "largestUnit", void 0);
|
|
2617
|
-
const r = getTemporalRelativeToOption(o), a = getRoundingIncrementOption(o), i = getRoundingModeOption(o,
|
|
2638
|
+
const r = getTemporalRelativeToOption(o), a = getRoundingIncrementOption(o), i = getRoundingModeOption(o, de);
|
|
2618
2639
|
let l = getTemporalUnitValuedOption(o, "smallestUnit", void 0);
|
|
2619
|
-
validateTemporalUnitValue(l,
|
|
2640
|
+
validateTemporalUnitValue(l, H);
|
|
2620
2641
|
const c = void 0 !== l;
|
|
2621
|
-
l ??=
|
|
2622
|
-
const
|
|
2623
|
-
if (void 0 !== n && "auto" !== n || (n =
|
|
2642
|
+
l ??= D;
|
|
2643
|
+
const s = defaultTemporalLargestUnit(t), u = largerOfTwoTemporalUnits(s, l), T = void 0 !== n;
|
|
2644
|
+
if (void 0 !== n && "auto" !== n || (n = u), (!c && !T || 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));
|
|
2624
2645
|
if (r.be) {
|
|
2625
2646
|
const e = toInternalDurationRecordWith24HourDays(t), o = addTime(midnightTimeRecord(), e.p);
|
|
2626
|
-
return createTemporalDuration(temporalDurationFromInternal(differencePlainDateTimeWithRounding(combineIsoDateAndTimeRecord(r.be.o, midnightTimeRecord()), combineIsoDateAndTimeRecord(calendarDateAdd(r.be.U, r.be.o, adjustDateDurationRecord(e.A, o.X),
|
|
2647
|
+
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));
|
|
2627
2648
|
}
|
|
2628
|
-
(isCalendarUnit(
|
|
2629
|
-
const
|
|
2630
|
-
return createTemporalDuration(temporalDurationFromInternal(l ===
|
|
2649
|
+
(isCalendarUnit(s) || isCalendarUnit(n)) && throwRangeError(missingField("relativeTo"));
|
|
2650
|
+
const p = toInternalDurationRecordWith24HourDays(t);
|
|
2651
|
+
return createTemporalDuration(temporalDurationFromInternal(l === d ? combineDateAndTimeDuration(createDateDurationRecord(0, 0, 0, roundTimeDurationByDays(p.p, a, i)[0]), ye) : combineDateAndTimeDuration(zeroDateDuration(), roundTimeDuration(p.p, a, l, i)), n));
|
|
2631
2652
|
}
|
|
2632
2653
|
total(e) {
|
|
2633
2654
|
const t = getInternalSlotOrThrowForDuration(this);
|
|
2634
|
-
void 0 === e && throwTypeError(
|
|
2635
|
-
const o = "string" == typeof e ? createNullPrototypeObject({ unit: e }) : getOptionsObject(e), n = getTemporalRelativeToOption(o), r = getTemporalUnitValuedOption(o, "unit",
|
|
2636
|
-
if (validateTemporalUnitValue(r,
|
|
2655
|
+
void 0 === e && throwTypeError(W);
|
|
2656
|
+
const o = "string" == typeof e ? createNullPrototypeObject({ unit: e }) : getOptionsObject(e), n = getTemporalRelativeToOption(o), r = getTemporalUnitValuedOption(o, "unit", B);
|
|
2657
|
+
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);
|
|
2637
2658
|
if (n.be) {
|
|
2638
2659
|
const e = toInternalDurationRecordWith24HourDays(t), o = addTime(midnightTimeRecord(), e.p);
|
|
2639
|
-
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),
|
|
2660
|
+
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);
|
|
2640
2661
|
}
|
|
2641
2662
|
return (isCalendarUnit(defaultTemporalLargestUnit(t)) || isCalendarUnit(r)) && throwRangeError(missingField("relativeTo")), totalTimeDuration(toInternalDurationRecordWith24HourDays(t).p, r);
|
|
2642
2663
|
}
|
|
2643
2664
|
toString(e = void 0) {
|
|
2644
|
-
const t = getInternalSlotOrThrowForDuration(this), o = getOptionsObject(e), n = getTemporalFractionalSecondDigitsOption(o), r = getRoundingModeOption(o,
|
|
2645
|
-
validateTemporalUnitValue(a,
|
|
2665
|
+
const t = getInternalSlotOrThrowForDuration(this), o = getOptionsObject(e), n = getTemporalFractionalSecondDigitsOption(o), r = getRoundingModeOption(o, le), a = getTemporalUnitValuedOption(o, "smallestUnit", void 0);
|
|
2666
|
+
validateTemporalUnitValue(a, L), a !== m && a !== u || throwRangeError(disallowedUnit(a));
|
|
2646
2667
|
const i = toSecondsStringPrecisionRecord(a, n);
|
|
2647
|
-
if (i.Ee ===
|
|
2668
|
+
if (i.Ee === D && 1 === i.Pe) return temporalDurationToString(t, i.ye);
|
|
2648
2669
|
const l = toInternalDurationRecord(t);
|
|
2649
|
-
return temporalDurationToString(temporalDurationFromInternal(combineDateAndTimeDuration(l.A, roundTimeDuration(l.p, i.Pe, i.Ee, r)), largerOfTwoTemporalUnits(defaultTemporalLargestUnit(t),
|
|
2670
|
+
return temporalDurationToString(temporalDurationFromInternal(combineDateAndTimeDuration(l.A, roundTimeDuration(l.p, i.Pe, i.Ee, r)), largerOfTwoTemporalUnits(defaultTemporalLargestUnit(t), T)), i.ye);
|
|
2650
2671
|
}
|
|
2651
2672
|
toJSON() {
|
|
2652
2673
|
return temporalDurationToString(getInternalSlotOrThrowForDuration(this));
|
|
2653
2674
|
}
|
|
2654
2675
|
toLocaleString(e = void 0, t = void 0) {
|
|
2655
|
-
|
|
2656
|
-
return ie.map((e, t) => {
|
|
2657
|
-
n[e] = o[t];
|
|
2658
|
-
}), new Intl.DurationFormat(e, t).format(n);
|
|
2676
|
+
return new A(e, t).format(durationRecordToDurationLikeObject(getInternalSlotOrThrowForDuration(this)));
|
|
2659
2677
|
}
|
|
2660
2678
|
valueOf() {
|
|
2661
|
-
throwTypeError(
|
|
2679
|
+
throwTypeError(Y);
|
|
2662
2680
|
}
|
|
2663
2681
|
};
|
|
2664
|
-
defineStringTag(
|
|
2665
|
-
const
|
|
2666
|
-
[
|
|
2667
|
-
[
|
|
2668
|
-
[
|
|
2669
|
-
[
|
|
2670
|
-
[
|
|
2671
|
-
[
|
|
2672
|
-
[
|
|
2673
|
-
[
|
|
2674
|
-
[
|
|
2675
|
-
},
|
|
2676
|
-
[
|
|
2677
|
-
[
|
|
2678
|
-
[
|
|
2679
|
-
[
|
|
2680
|
-
[
|
|
2681
|
-
[
|
|
2682
|
-
[
|
|
2683
|
-
[
|
|
2684
|
-
[
|
|
2685
|
-
},
|
|
2682
|
+
defineStringTag(Ot.prototype, "Temporal.Duration"), renameFunction(Ot, "Duration");
|
|
2683
|
+
const Ft = {
|
|
2684
|
+
[re]: Math.ceil,
|
|
2685
|
+
[ae]: Math.floor,
|
|
2686
|
+
[ie]: roundExpand,
|
|
2687
|
+
[le]: Math.trunc,
|
|
2688
|
+
[ce]: roundHalfCeil,
|
|
2689
|
+
[se]: roundHalfFloor,
|
|
2690
|
+
[de]: (e) => (isIntegerAndHalf(e) ? roundExpand(e) : Math.round(e)) + 0,
|
|
2691
|
+
[me]: (e) => (isIntegerAndHalf(e) ? Math.trunc(e) : Math.round(e)) + 0,
|
|
2692
|
+
[ue]: roundHalfEven
|
|
2693
|
+
}, St = {
|
|
2694
|
+
[re]: Math.ceil,
|
|
2695
|
+
[ae]: Math.floor,
|
|
2696
|
+
[ie]: Math.ceil,
|
|
2697
|
+
[le]: Math.floor,
|
|
2698
|
+
[ce]: roundHalfCeil,
|
|
2699
|
+
[se]: roundHalfFloor,
|
|
2700
|
+
[de]: roundHalfCeil,
|
|
2701
|
+
[me]: roundHalfFloor,
|
|
2702
|
+
[ue]: roundHalfEven
|
|
2703
|
+
}, wt = globalThis.Intl.DateTimeFormat, vt = /* @__PURE__ */ new WeakMap(), yt = [
|
|
2686
2704
|
"year",
|
|
2687
2705
|
"month",
|
|
2688
2706
|
"day",
|
|
2689
2707
|
"weekday",
|
|
2690
2708
|
"dateStyle"
|
|
2691
|
-
],
|
|
2709
|
+
], Et = [
|
|
2692
2710
|
"hour",
|
|
2693
2711
|
"minute",
|
|
2694
2712
|
"second",
|
|
@@ -2696,49 +2714,47 @@ const It = {
|
|
|
2696
2714
|
"dayPeriod",
|
|
2697
2715
|
"timeStyle"
|
|
2698
2716
|
];
|
|
2699
|
-
var
|
|
2700
|
-
|
|
2701
|
-
return formatDateTime(this, e);
|
|
2717
|
+
var Pt = class {
|
|
2718
|
+
ke(e) {
|
|
2719
|
+
return formatDateTime(getInternalSlotOrThrowForDateTimeFormat(this), e);
|
|
2702
2720
|
}
|
|
2703
|
-
},
|
|
2721
|
+
}, Rt = class {
|
|
2704
2722
|
constructor(e, t) {
|
|
2705
|
-
createDateTimeFormat(e, t,
|
|
2723
|
+
vt.set(this, createDateTimeFormat(e, t, H, void 0));
|
|
2706
2724
|
}
|
|
2707
2725
|
get format() {
|
|
2708
|
-
return Object.defineProperty(getInternalSlotOrThrowForDateTimeFormat(this).ze ||=
|
|
2726
|
+
return Object.defineProperty(getInternalSlotOrThrowForDateTimeFormat(this).ze ||= Pt.prototype.ke.bind(this), "name", { value: "" });
|
|
2709
2727
|
}
|
|
2710
2728
|
formatToParts(e) {
|
|
2711
2729
|
return ((e, t) => {
|
|
2712
|
-
const [o, n] = handleDateTimeValue(
|
|
2730
|
+
const [o, n] = handleDateTimeValue(e, t);
|
|
2713
2731
|
return o.formatToParts(n);
|
|
2714
|
-
})(this, e);
|
|
2732
|
+
})(getInternalSlotOrThrowForDateTimeFormat(this), e);
|
|
2715
2733
|
}
|
|
2716
2734
|
formatRange(e, t) {
|
|
2717
|
-
return void 0 !== e && void 0 !== t || throwTypeError(
|
|
2718
|
-
const n = getInternalSlotOrThrowForDateTimeFormat(e);
|
|
2735
|
+
return void 0 !== e && void 0 !== t || throwTypeError($), ((e, t, o) => {
|
|
2719
2736
|
validateSameTemporalType(t, o);
|
|
2720
|
-
const [
|
|
2721
|
-
return
|
|
2722
|
-
})(this, toDateTimeFormattable(e), toDateTimeFormattable(t));
|
|
2737
|
+
const [n, r] = handleDateTimeValue(e, t);
|
|
2738
|
+
return n.formatRange(r, handleDateTimeValue(e, o)[1]);
|
|
2739
|
+
})(getInternalSlotOrThrowForDateTimeFormat(this), toDateTimeFormattable(e), toDateTimeFormattable(t));
|
|
2723
2740
|
}
|
|
2724
2741
|
formatRangeToParts(e, t) {
|
|
2725
|
-
return void 0 !== e && void 0 !== t || throwTypeError(
|
|
2726
|
-
const n = getInternalSlotOrThrowForDateTimeFormat(e);
|
|
2742
|
+
return void 0 !== e && void 0 !== t || throwTypeError($), ((e, t, o) => {
|
|
2727
2743
|
validateSameTemporalType(t, o);
|
|
2728
|
-
const [
|
|
2729
|
-
return
|
|
2730
|
-
})(this, toDateTimeFormattable(e), toDateTimeFormattable(t));
|
|
2744
|
+
const [n, r] = handleDateTimeValue(e, t);
|
|
2745
|
+
return n.formatRangeToParts(r, handleDateTimeValue(e, o)[1]);
|
|
2746
|
+
})(getInternalSlotOrThrowForDateTimeFormat(this), toDateTimeFormattable(e), toDateTimeFormattable(t));
|
|
2731
2747
|
}
|
|
2732
2748
|
resolvedOptions() {
|
|
2733
2749
|
return getInternalSlotOrThrowForDateTimeFormat(this).Ze.resolvedOptions();
|
|
2734
2750
|
}
|
|
2735
2751
|
};
|
|
2736
|
-
const
|
|
2737
|
-
|
|
2738
|
-
for (const e of ["formatRange", "formatRangeToParts"])
|
|
2739
|
-
Object.defineProperties(DateTimeFormat,
|
|
2740
|
-
const
|
|
2741
|
-
var
|
|
2752
|
+
const bt = Object.getOwnPropertyDescriptors(wt), Zt = Rt.prototype;
|
|
2753
|
+
bt.prototype.value = Zt;
|
|
2754
|
+
for (const e of ["formatRange", "formatRangeToParts"]) wt.prototype[e] || delete Zt[e];
|
|
2755
|
+
Object.defineProperties(DateTimeFormat, bt), DateTimeFormat.prototype.constructor = DateTimeFormat, defineStringTag(DateTimeFormat.prototype, "Intl.DateTimeFormat");
|
|
2756
|
+
const Nt = /* @__PURE__ */ new WeakMap();
|
|
2757
|
+
var Mt = class {
|
|
2742
2758
|
constructor(e) {
|
|
2743
2759
|
createTemporalInstant(validateEpochNanoseconds(createEpochNanosecondsFromBigInt(toBigInt(e))), this);
|
|
2744
2760
|
}
|
|
@@ -2773,43 +2789,41 @@ var Zt = class {
|
|
|
2773
2789
|
return differenceTemporalInstant(-1, getInternalSlotOrThrowForInstant(this), e, t);
|
|
2774
2790
|
}
|
|
2775
2791
|
round(e) {
|
|
2776
|
-
const t = getInternalSlotOrThrowForInstant(this), o = getRoundToOptionsObject(e), n = getRoundingIncrementOption(o), r = getRoundingModeOption(o,
|
|
2777
|
-
return validateTemporalUnitValue(i,
|
|
2792
|
+
const t = getInternalSlotOrThrowForInstant(this), o = getRoundToOptionsObject(e), n = getRoundingIncrementOption(o), r = getRoundingModeOption(o, de), i = getTemporalUnitValuedOption(o, "smallestUnit", B);
|
|
2793
|
+
return validateTemporalUnitValue(i, L), validateTemporalRoundingIncrement(n, a / nanosecondsForTimeUnit(i), !0), createTemporalInstant(roundTemporalInstant(t.Y, n, i, r));
|
|
2778
2794
|
}
|
|
2779
2795
|
equals(e) {
|
|
2780
2796
|
return !compareEpochNanoseconds(getInternalSlotOrThrowForInstant(this).Y, getInternalSlotOrThrowForInstant(toTemporalInstant$1(e)).Y);
|
|
2781
2797
|
}
|
|
2782
2798
|
toString(e = void 0) {
|
|
2783
|
-
const t = getInternalSlotOrThrowForInstant(this), o = getOptionsObject(e), n = getTemporalFractionalSecondDigitsOption(o), r = getRoundingModeOption(o,
|
|
2784
|
-
validateTemporalUnitValue(a,
|
|
2785
|
-
const l = mapUnlessUndefined(i, toTemporalTimeZoneIdentifier),
|
|
2786
|
-
return temporalInstantToString(roundTemporalInstant(t.Y,
|
|
2799
|
+
const t = getInternalSlotOrThrowForInstant(this), o = getOptionsObject(e), n = getTemporalFractionalSecondDigitsOption(o), r = getRoundingModeOption(o, le), a = getTemporalUnitValuedOption(o, "smallestUnit", void 0), i = o.timeZone;
|
|
2800
|
+
validateTemporalUnitValue(a, L), a === m && throwRangeError(invalidField("smallestUnit"));
|
|
2801
|
+
const l = mapUnlessUndefined(i, toTemporalTimeZoneIdentifier), c = toSecondsStringPrecisionRecord(a, n);
|
|
2802
|
+
return temporalInstantToString(roundTemporalInstant(t.Y, c.Pe, c.Ee, r), l, c.ye);
|
|
2787
2803
|
}
|
|
2788
2804
|
toLocaleString(e = void 0, t = void 0) {
|
|
2789
|
-
return getInternalSlotOrThrowForInstant(this), formatDateTime(createDateTimeFormat(e, t,
|
|
2805
|
+
return getInternalSlotOrThrowForInstant(this), formatDateTime(createDateTimeFormat(e, t, H), this);
|
|
2790
2806
|
}
|
|
2791
2807
|
toJSON() {
|
|
2792
2808
|
return temporalInstantToString(getInternalSlotOrThrowForInstant(this).Y);
|
|
2793
2809
|
}
|
|
2794
2810
|
valueOf() {
|
|
2795
|
-
throwTypeError(
|
|
2811
|
+
throwTypeError(Y);
|
|
2796
2812
|
}
|
|
2797
2813
|
toZonedDateTimeISO(e) {
|
|
2798
2814
|
return createTemporalZonedDateTime(getInternalSlotOrThrowForInstant(this).Y, toTemporalTimeZoneIdentifier(e), "iso8601");
|
|
2799
2815
|
}
|
|
2800
2816
|
};
|
|
2801
|
-
defineStringTag(
|
|
2802
|
-
const
|
|
2817
|
+
defineStringTag(Mt.prototype, "Temporal.Instant"), renameFunction(Mt, "Instant");
|
|
2818
|
+
const Ut = class {
|
|
2803
2819
|
toTemporalInstant() {
|
|
2804
2820
|
const e = Date.prototype.valueOf.call(this);
|
|
2805
2821
|
return e != e && throwRangeError("invalid date"), createTemporalInstant(createEpochNanosecondsFromEpochMilliseconds(e));
|
|
2806
2822
|
}
|
|
2807
|
-
}.prototype.toTemporalInstant,
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
let jt, $t = 0, Ct = -Infinity;
|
|
2812
|
-
const Yt = {
|
|
2823
|
+
}.prototype.toTemporalInstant, jt = {}, $t = Object.getOwnPropertyDescriptors(globalThis.Intl);
|
|
2824
|
+
$t.DateTimeFormat.value = DateTimeFormat, $t.DurationFormat && ($t.DurationFormat.value = k), Object.defineProperties(jt, $t);
|
|
2825
|
+
let Ct, Yt = 0, Wt = -Infinity;
|
|
2826
|
+
const At = {
|
|
2813
2827
|
timeZoneId: () => systemTimeZoneIdentifier(),
|
|
2814
2828
|
instant: () => createTemporalInstant(systemUtcEpochNanoseconds()),
|
|
2815
2829
|
plainDateTimeISO: (e = void 0) => createTemporalDateTime(systemDateTime(e), "iso8601"),
|
|
@@ -2817,17 +2831,17 @@ const Yt = {
|
|
|
2817
2831
|
plainDateISO: (e = void 0) => createTemporalDate(systemDateTime(e).o, "iso8601"),
|
|
2818
2832
|
plainTimeISO: (e = void 0) => createTemporalTime(systemDateTime(e).p)
|
|
2819
2833
|
};
|
|
2820
|
-
defineStringTag(
|
|
2821
|
-
const
|
|
2822
|
-
Instant:
|
|
2823
|
-
PlainDateTime:
|
|
2824
|
-
PlainDate:
|
|
2825
|
-
PlainTime:
|
|
2826
|
-
PlainYearMonth:
|
|
2827
|
-
PlainMonthDay:
|
|
2828
|
-
Duration:
|
|
2829
|
-
ZonedDateTime:
|
|
2830
|
-
Now:
|
|
2834
|
+
defineStringTag(At, "Temporal.Now"), makePropertiesNonEnumerable(At);
|
|
2835
|
+
const zt = {
|
|
2836
|
+
Instant: Mt,
|
|
2837
|
+
PlainDateTime: Me,
|
|
2838
|
+
PlainDate: Dt,
|
|
2839
|
+
PlainTime: je,
|
|
2840
|
+
PlainYearMonth: ut,
|
|
2841
|
+
PlainMonthDay: dt,
|
|
2842
|
+
Duration: Ot,
|
|
2843
|
+
ZonedDateTime: Re,
|
|
2844
|
+
Now: At
|
|
2831
2845
|
};
|
|
2832
|
-
defineStringTag(
|
|
2833
|
-
export { defineNonEnumerableProperty as a,
|
|
2846
|
+
defineStringTag(zt, "Temporal"), makePropertiesNonEnumerable(zt);
|
|
2847
|
+
export { defineNonEnumerableProperty as a, Ut as i, setSystemTimeZoneIdCacheTtl as n, jt as r, zt as t };
|