@hebcal/core 5.2.2 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +1423 -1366
- package/dist/bundle.min.js +2 -2
- package/dist/index.cjs +1112 -1070
- package/dist/index.mjs +1112 -1070
- package/package.json +8 -8
- package/po/he.po +3 -0
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v5.
|
|
1
|
+
/*! @hebcal/core v5.3.0 */
|
|
2
2
|
/** @private */
|
|
3
3
|
const lengths = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
4
4
|
/** @private */
|
|
@@ -2026,18 +2026,18 @@ class HebrewDateEvent extends Event {
|
|
|
2026
2026
|
}
|
|
2027
2027
|
}
|
|
2028
2028
|
|
|
2029
|
-
function clampEntity(e, n, t, o, r) {
|
|
2030
|
-
const i = clampNumber(n, t, o);
|
|
2031
|
-
if (r && n !== i) {
|
|
2032
|
-
throw new RangeError(numberOutOfRange(e, n, t, o));
|
|
2033
|
-
}
|
|
2034
|
-
return i;
|
|
2035
|
-
}
|
|
2036
|
-
|
|
2037
2029
|
function clampProp(e, n, t, o, r) {
|
|
2038
2030
|
return clampEntity(n, getDefinedProp(e, n), t, o, r);
|
|
2039
2031
|
}
|
|
2040
2032
|
|
|
2033
|
+
function clampEntity(e, n, t, o, r, i) {
|
|
2034
|
+
const a = clampNumber(n, t, o);
|
|
2035
|
+
if (r && n !== a) {
|
|
2036
|
+
throw new RangeError(numberOutOfRange(e, n, t, o, i));
|
|
2037
|
+
}
|
|
2038
|
+
return a;
|
|
2039
|
+
}
|
|
2040
|
+
|
|
2041
2041
|
function getDefinedProp(e, n) {
|
|
2042
2042
|
const t = e[n];
|
|
2043
2043
|
if (void 0 === t) {
|
|
@@ -2050,7 +2050,7 @@ function isObjectLike(e) {
|
|
|
2050
2050
|
return null !== e && /object|function/.test(typeof e);
|
|
2051
2051
|
}
|
|
2052
2052
|
|
|
2053
|
-
function
|
|
2053
|
+
function memoize(e, n = Map) {
|
|
2054
2054
|
const t = new n;
|
|
2055
2055
|
return (n, ...o) => {
|
|
2056
2056
|
if (t.has(n)) {
|
|
@@ -2174,10 +2174,6 @@ function bindArgs(e, ...n) {
|
|
|
2174
2174
|
return (...t) => e(...n, ...t);
|
|
2175
2175
|
}
|
|
2176
2176
|
|
|
2177
|
-
function identity(e) {
|
|
2178
|
-
return e;
|
|
2179
|
-
}
|
|
2180
|
-
|
|
2181
2177
|
function capitalize(e) {
|
|
2182
2178
|
return e[0].toUpperCase() + e.substring(1);
|
|
2183
2179
|
}
|
|
@@ -2222,82 +2218,82 @@ function hasHalf(e) {
|
|
|
2222
2218
|
return .5 === Math.abs(e % 1);
|
|
2223
2219
|
}
|
|
2224
2220
|
|
|
2225
|
-
function
|
|
2221
|
+
function givenFieldsToBigNano(e, n, t) {
|
|
2226
2222
|
let o = 0, r = 0;
|
|
2227
2223
|
for (let i = 0; i <= n; i++) {
|
|
2228
|
-
const n = e[t[i]], a =
|
|
2224
|
+
const n = e[t[i]], a = j[i], s = W / a, [c, u] = divModTrunc(n, s);
|
|
2229
2225
|
o += u * a, r += c;
|
|
2230
2226
|
}
|
|
2231
|
-
const [i, a] = divModTrunc(o,
|
|
2227
|
+
const [i, a] = divModTrunc(o, W);
|
|
2232
2228
|
return [ r + i, a ];
|
|
2233
2229
|
}
|
|
2234
2230
|
|
|
2235
2231
|
function nanoToGivenFields(e, n, t) {
|
|
2236
2232
|
const o = {};
|
|
2237
2233
|
for (let r = n; r >= 0; r--) {
|
|
2238
|
-
const n =
|
|
2234
|
+
const n = j[r];
|
|
2239
2235
|
o[t[r]] = divTrunc(e, n), e = modTrunc(e, n);
|
|
2240
2236
|
}
|
|
2241
2237
|
return o;
|
|
2242
2238
|
}
|
|
2243
2239
|
|
|
2244
2240
|
function getRequiredYearMonthFields(e) {
|
|
2245
|
-
return e ===
|
|
2241
|
+
return e === ce ? Q : [];
|
|
2246
2242
|
}
|
|
2247
2243
|
|
|
2248
2244
|
function getRequiredMonthDayFields(e) {
|
|
2249
|
-
return e ===
|
|
2245
|
+
return e === ce ? ne : [];
|
|
2250
2246
|
}
|
|
2251
2247
|
|
|
2252
2248
|
function getRequiredDateFields(e) {
|
|
2253
|
-
return e ===
|
|
2249
|
+
return e === ce ? [ "year", "day" ] : [];
|
|
2254
2250
|
}
|
|
2255
2251
|
|
|
2256
|
-
function
|
|
2257
|
-
let [t, o] = divModTrunc(n,
|
|
2252
|
+
function createBigNano(e, n) {
|
|
2253
|
+
let [t, o] = divModTrunc(n, W), r = e + t;
|
|
2258
2254
|
const i = Math.sign(r);
|
|
2259
|
-
return i && i === -Math.sign(o) && (r -= i, o += i *
|
|
2255
|
+
return i && i === -Math.sign(o) && (r -= i, o += i * W), [ r, o ];
|
|
2260
2256
|
}
|
|
2261
2257
|
|
|
2262
|
-
function
|
|
2263
|
-
return
|
|
2258
|
+
function addBigNanoAndNumber(e, n) {
|
|
2259
|
+
return createBigNano(e[0], e[1] + n);
|
|
2264
2260
|
}
|
|
2265
2261
|
|
|
2266
|
-
function
|
|
2267
|
-
return
|
|
2262
|
+
function addBigNanos(e, n, t = 1) {
|
|
2263
|
+
return createBigNano(e[0] + n[0] * t, e[1] + n[1] * t);
|
|
2268
2264
|
}
|
|
2269
2265
|
|
|
2270
|
-
function
|
|
2271
|
-
return
|
|
2266
|
+
function diffBigNanos(e, n) {
|
|
2267
|
+
return addBigNanos(n, e, -1);
|
|
2272
2268
|
}
|
|
2273
2269
|
|
|
2274
|
-
function
|
|
2270
|
+
function compareBigNanos(e, n) {
|
|
2275
2271
|
return compareNumbers(e[0], n[0]) || compareNumbers(e[1], n[1]);
|
|
2276
2272
|
}
|
|
2277
2273
|
|
|
2278
|
-
function
|
|
2279
|
-
const t = BigInt(
|
|
2274
|
+
function bigIntToBigNano(e, n = 1) {
|
|
2275
|
+
const t = BigInt(W / n);
|
|
2280
2276
|
return [ Number(e / t), Number(e % t) * n ];
|
|
2281
2277
|
}
|
|
2282
2278
|
|
|
2283
|
-
function
|
|
2284
|
-
const t =
|
|
2279
|
+
function numberToBigNano(e, n = 1) {
|
|
2280
|
+
const t = W / n, [o, r] = divModTrunc(e, t);
|
|
2285
2281
|
return [ o, r * n ];
|
|
2286
2282
|
}
|
|
2287
2283
|
|
|
2288
|
-
function
|
|
2289
|
-
const [t, o] = e, r = Math.floor(o / n), i =
|
|
2284
|
+
function bigNanoToBigInt(e, n = 1) {
|
|
2285
|
+
const [t, o] = e, r = Math.floor(o / n), i = W / n;
|
|
2290
2286
|
return BigInt(t) * BigInt(i) + BigInt(r);
|
|
2291
2287
|
}
|
|
2292
2288
|
|
|
2293
|
-
function
|
|
2294
|
-
const [o, r] =
|
|
2295
|
-
return o + (t ?
|
|
2289
|
+
function bigNanoToNumber(e, n = 1, t) {
|
|
2290
|
+
const [o, r] = e, [i, a] = divModTrunc(r, n);
|
|
2291
|
+
return o * (W / n) + (i + (t ? a / n : 0));
|
|
2296
2292
|
}
|
|
2297
2293
|
|
|
2298
|
-
function
|
|
2299
|
-
const [
|
|
2300
|
-
return [
|
|
2294
|
+
function divModBigNano(e, n, t = divModFloor) {
|
|
2295
|
+
const [o, r] = e, [i, a] = t(r, n);
|
|
2296
|
+
return [ o * (W / n) + i, a ];
|
|
2301
2297
|
}
|
|
2302
2298
|
|
|
2303
2299
|
function hashIntlFormatParts(e, n) {
|
|
@@ -2309,20 +2305,20 @@ function hashIntlFormatParts(e, n) {
|
|
|
2309
2305
|
}
|
|
2310
2306
|
|
|
2311
2307
|
function checkIsoYearMonthInBounds(e) {
|
|
2312
|
-
return clampProp(e, "isoYear",
|
|
2308
|
+
return clampProp(e, "isoYear", Ze, Re, 1), e.isoYear === Ze ? clampProp(e, "isoMonth", 4, 12, 1) : e.isoYear === Re && clampProp(e, "isoMonth", 1, 9, 1),
|
|
2313
2309
|
e;
|
|
2314
2310
|
}
|
|
2315
2311
|
|
|
2316
2312
|
function checkIsoDateInBounds(e) {
|
|
2317
2313
|
return checkIsoDateTimeInBounds({
|
|
2318
2314
|
...e,
|
|
2319
|
-
...
|
|
2315
|
+
...be,
|
|
2320
2316
|
isoHour: 12
|
|
2321
2317
|
}), e;
|
|
2322
2318
|
}
|
|
2323
2319
|
|
|
2324
2320
|
function checkIsoDateTimeInBounds(e) {
|
|
2325
|
-
const n = clampProp(e, "isoYear",
|
|
2321
|
+
const n = clampProp(e, "isoYear", Ze, Re, 1), t = n === Ze ? 1 : n === Re ? -1 : 0;
|
|
2326
2322
|
return t && checkEpochNanoInBounds(isoToEpochNano({
|
|
2327
2323
|
...e,
|
|
2328
2324
|
isoDay: e.isoDay + t,
|
|
@@ -2331,27 +2327,31 @@ function checkIsoDateTimeInBounds(e) {
|
|
|
2331
2327
|
}
|
|
2332
2328
|
|
|
2333
2329
|
function checkEpochNanoInBounds(e) {
|
|
2334
|
-
if (!e || -1 ===
|
|
2335
|
-
throw new RangeError(
|
|
2330
|
+
if (!e || -1 === compareBigNanos(e, Ce) || 1 === compareBigNanos(e, Ye)) {
|
|
2331
|
+
throw new RangeError(N);
|
|
2336
2332
|
}
|
|
2337
2333
|
return e;
|
|
2338
2334
|
}
|
|
2339
2335
|
|
|
2340
2336
|
function isoTimeFieldsToNano(e) {
|
|
2341
|
-
return
|
|
2337
|
+
return givenFieldsToBigNano(e, 5, ye)[1];
|
|
2342
2338
|
}
|
|
2343
2339
|
|
|
2344
2340
|
function nanoToIsoTimeAndDay(e) {
|
|
2345
|
-
const [n, t] = divModFloor(e,
|
|
2346
|
-
return [ nanoToGivenFields(t, 5,
|
|
2341
|
+
const [n, t] = divModFloor(e, W);
|
|
2342
|
+
return [ nanoToGivenFields(t, 5, ye), n ];
|
|
2347
2343
|
}
|
|
2348
2344
|
|
|
2349
2345
|
function epochNanoToSec(e) {
|
|
2350
|
-
return
|
|
2346
|
+
return epochNanoToSecMod(e)[0];
|
|
2347
|
+
}
|
|
2348
|
+
|
|
2349
|
+
function epochNanoToSecMod(e) {
|
|
2350
|
+
return divModBigNano(e, A);
|
|
2351
2351
|
}
|
|
2352
2352
|
|
|
2353
2353
|
function epochNanoToMilli(e) {
|
|
2354
|
-
return
|
|
2354
|
+
return divModBigNano(e, q)[0];
|
|
2355
2355
|
}
|
|
2356
2356
|
|
|
2357
2357
|
function isoToEpochMilli(e) {
|
|
@@ -2361,8 +2361,8 @@ function isoToEpochMilli(e) {
|
|
|
2361
2361
|
function isoToEpochNano(e) {
|
|
2362
2362
|
const n = isoToEpochMilli(e);
|
|
2363
2363
|
if (void 0 !== n) {
|
|
2364
|
-
const [t, o] = divModTrunc(n,
|
|
2365
|
-
return [ t, o *
|
|
2364
|
+
const [t, o] = divModTrunc(n, R);
|
|
2365
|
+
return [ t, o * q + (e.isoMicrosecond || 0) * z + (e.isoNanosecond || 0) ];
|
|
2366
2366
|
}
|
|
2367
2367
|
}
|
|
2368
2368
|
|
|
@@ -2376,39 +2376,39 @@ function isoToEpochNanoWithOffset(e, n) {
|
|
|
2376
2376
|
}
|
|
2377
2377
|
|
|
2378
2378
|
function isoArgsToEpochSec(...e) {
|
|
2379
|
-
return isoArgsToEpochMilli(...e) /
|
|
2379
|
+
return isoArgsToEpochMilli(...e) / Z;
|
|
2380
2380
|
}
|
|
2381
2381
|
|
|
2382
2382
|
function isoArgsToEpochMilli(...e) {
|
|
2383
2383
|
const [n, t] = isoToLegacyDate(...e), o = n.getTime();
|
|
2384
2384
|
if (!isNaN(o)) {
|
|
2385
|
-
return o - t *
|
|
2385
|
+
return o - t * R;
|
|
2386
2386
|
}
|
|
2387
2387
|
}
|
|
2388
2388
|
|
|
2389
2389
|
function isoToLegacyDate(e, n = 1, t = 1, o = 0, r = 0, i = 0, a = 0) {
|
|
2390
|
-
const s = e ===
|
|
2390
|
+
const s = e === Ze ? 1 : e === Re ? -1 : 0, c = new Date;
|
|
2391
2391
|
return c.setUTCHours(o, r, i, a), c.setUTCFullYear(e, n - 1, t + s), [ c, s ];
|
|
2392
2392
|
}
|
|
2393
2393
|
|
|
2394
2394
|
function epochNanoToIso(e, n) {
|
|
2395
|
-
let [t, o] =
|
|
2396
|
-
o < 0 && (o +=
|
|
2397
|
-
const [r, i] = divModFloor(o,
|
|
2395
|
+
let [t, o] = addBigNanoAndNumber(e, n);
|
|
2396
|
+
o < 0 && (o += W, t -= 1);
|
|
2397
|
+
const [r, i] = divModFloor(o, q), [a, s] = divModFloor(i, z);
|
|
2398
2398
|
return {
|
|
2399
|
-
...epochMilliToIso(t *
|
|
2399
|
+
...epochMilliToIso(t * R + r),
|
|
2400
2400
|
isoMicrosecond: a,
|
|
2401
2401
|
isoNanosecond: s
|
|
2402
2402
|
};
|
|
2403
2403
|
}
|
|
2404
2404
|
|
|
2405
2405
|
function epochMilliToIso(e) {
|
|
2406
|
-
const n = e
|
|
2407
|
-
return zipProps(
|
|
2406
|
+
const n = Math.ceil(Math.max(0, Math.abs(e) - ke) / R) * Math.sign(e), t = new Date(e - n * R);
|
|
2407
|
+
return zipProps(Pe, [ t.getUTCFullYear(), t.getUTCMonth() + 1, t.getUTCDate() + n, t.getUTCHours(), t.getUTCMinutes(), t.getUTCSeconds(), t.getUTCMilliseconds() ]);
|
|
2408
2408
|
}
|
|
2409
2409
|
|
|
2410
2410
|
function computeIsoMonthsInYear() {
|
|
2411
|
-
return
|
|
2411
|
+
return Ae;
|
|
2412
2412
|
}
|
|
2413
2413
|
|
|
2414
2414
|
function computeIsoDaysInMonth(e, n) {
|
|
@@ -2434,9 +2434,14 @@ function computeIsoInLeapYear(e) {
|
|
|
2434
2434
|
}
|
|
2435
2435
|
|
|
2436
2436
|
function computeIsoDayOfYear(e) {
|
|
2437
|
-
return diffEpochMilliByDay(isoToEpochMilli(
|
|
2437
|
+
return diffEpochMilliByDay(isoToEpochMilli((e => ({
|
|
2438
|
+
...e,
|
|
2439
|
+
isoMonth: 1,
|
|
2440
|
+
isoDay: 1,
|
|
2441
|
+
...be
|
|
2442
|
+
}))(e)), isoToEpochMilli({
|
|
2438
2443
|
...e,
|
|
2439
|
-
...
|
|
2444
|
+
...be
|
|
2440
2445
|
})) + 1;
|
|
2441
2446
|
}
|
|
2442
2447
|
|
|
@@ -2445,30 +2450,16 @@ function computeIsoDayOfWeek(e) {
|
|
|
2445
2450
|
return modFloor(n.getUTCDay() - t, 7) || 7;
|
|
2446
2451
|
}
|
|
2447
2452
|
|
|
2448
|
-
function computeIsoWeekParts(e) {
|
|
2449
|
-
const n = computeIsoDayOfYear(e), t = computeIsoDayOfWeek(e), o = computeIsoDayOfWeek(isoDateYearStart(e)), r = Math.floor((n - t + 10) / Ze), {isoYear: i} = e;
|
|
2450
|
-
return r < 1 ? [ i - 1, 5 === o || 6 === o && computeIsoInLeapYear(i - 1) ? 53 : 52 ] : 53 === r && computeIsoDaysInYear(i) - n < 4 - t ? [ i + 1, 1 ] : [ i, r ];
|
|
2451
|
-
}
|
|
2452
|
-
|
|
2453
|
-
function isoDateYearStart(e) {
|
|
2454
|
-
return {
|
|
2455
|
-
...e,
|
|
2456
|
-
isoMonth: 1,
|
|
2457
|
-
isoDay: 1,
|
|
2458
|
-
...ve
|
|
2459
|
-
};
|
|
2460
|
-
}
|
|
2461
|
-
|
|
2462
2453
|
function computeGregoryEraParts({isoYear: e}) {
|
|
2463
2454
|
return e < 1 ? [ "bce", 1 - e ] : [ "ce", e ];
|
|
2464
2455
|
}
|
|
2465
2456
|
|
|
2466
2457
|
function computeJapaneseEraParts(e) {
|
|
2467
2458
|
const n = isoToEpochMilli(e);
|
|
2468
|
-
if (n <
|
|
2459
|
+
if (n < Le) {
|
|
2469
2460
|
return computeGregoryEraParts(e);
|
|
2470
2461
|
}
|
|
2471
|
-
const t = hashIntlFormatParts(
|
|
2462
|
+
const t = hashIntlFormatParts(Kn(le), n), {era: o, eraYear: r} = parseIntlYear(t, le);
|
|
2472
2463
|
return [ o, r ];
|
|
2473
2464
|
}
|
|
2474
2465
|
|
|
@@ -2481,7 +2472,7 @@ function checkIsoDateFields(e) {
|
|
|
2481
2472
|
}
|
|
2482
2473
|
|
|
2483
2474
|
function isIsoDateFieldsValid(e) {
|
|
2484
|
-
return allPropsEqual(
|
|
2475
|
+
return allPropsEqual(ve, e, constrainIsoDateFields(e));
|
|
2485
2476
|
}
|
|
2486
2477
|
|
|
2487
2478
|
function constrainIsoDateFields(e, n) {
|
|
@@ -2494,45 +2485,61 @@ function constrainIsoDateFields(e, n) {
|
|
|
2494
2485
|
}
|
|
2495
2486
|
|
|
2496
2487
|
function constrainIsoTimeFields(e, n) {
|
|
2497
|
-
return zipProps(
|
|
2488
|
+
return zipProps(ye, [ clampProp(e, "isoHour", 0, 23, n), clampProp(e, "isoMinute", 0, 59, n), clampProp(e, "isoSecond", 0, 59, n), clampProp(e, "isoMillisecond", 0, 999, n), clampProp(e, "isoMicrosecond", 0, 999, n), clampProp(e, "isoNanosecond", 0, 999, n) ]);
|
|
2498
2489
|
}
|
|
2499
2490
|
|
|
2500
|
-
function
|
|
2501
|
-
if (
|
|
2502
|
-
|
|
2491
|
+
function requireStringOrUndefined(e) {
|
|
2492
|
+
if (void 0 !== e) {
|
|
2493
|
+
return We(e);
|
|
2503
2494
|
}
|
|
2504
|
-
return e;
|
|
2505
2495
|
}
|
|
2506
2496
|
|
|
2507
|
-
function
|
|
2508
|
-
if (
|
|
2509
|
-
|
|
2497
|
+
function requirePositiveIntegerOrUndefined(e) {
|
|
2498
|
+
if (void 0 !== e) {
|
|
2499
|
+
return requirePositiveInteger(e);
|
|
2510
2500
|
}
|
|
2511
|
-
return n;
|
|
2512
2501
|
}
|
|
2513
2502
|
|
|
2514
|
-
function
|
|
2515
|
-
if (void 0 !== e
|
|
2516
|
-
|
|
2503
|
+
function requireIntegerOrUndefined(e) {
|
|
2504
|
+
if (void 0 !== e) {
|
|
2505
|
+
return requireInteger(e);
|
|
2517
2506
|
}
|
|
2518
|
-
return e;
|
|
2519
2507
|
}
|
|
2520
2508
|
|
|
2521
|
-
function
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2509
|
+
function requirePositiveInteger(e) {
|
|
2510
|
+
return requireNumberIsPositive(requireInteger(e));
|
|
2511
|
+
}
|
|
2512
|
+
|
|
2513
|
+
function requireInteger(e) {
|
|
2514
|
+
return requireNumberIsInteger($e(e));
|
|
2515
|
+
}
|
|
2516
|
+
|
|
2517
|
+
function requireNonNullish(e) {
|
|
2518
|
+
if (null == e) {
|
|
2519
|
+
throw new TypeError("Cannot be null or undefined");
|
|
2526
2520
|
}
|
|
2527
2521
|
return e;
|
|
2528
2522
|
}
|
|
2529
2523
|
|
|
2530
|
-
function
|
|
2531
|
-
|
|
2524
|
+
function requirePropDefined(e, n) {
|
|
2525
|
+
if (null == n) {
|
|
2526
|
+
throw new RangeError(missingField(e));
|
|
2527
|
+
}
|
|
2528
|
+
return n;
|
|
2532
2529
|
}
|
|
2533
2530
|
|
|
2534
|
-
function
|
|
2535
|
-
|
|
2531
|
+
function requireObjectLike(e) {
|
|
2532
|
+
if (!isObjectLike(e)) {
|
|
2533
|
+
throw new TypeError(n);
|
|
2534
|
+
}
|
|
2535
|
+
return e;
|
|
2536
|
+
}
|
|
2537
|
+
|
|
2538
|
+
function requireType(e, n, t = e) {
|
|
2539
|
+
if (typeof n !== e) {
|
|
2540
|
+
throw new TypeError(invalidEntity(t, n));
|
|
2541
|
+
}
|
|
2542
|
+
return n;
|
|
2536
2543
|
}
|
|
2537
2544
|
|
|
2538
2545
|
function requireNumberIsInteger(e, n = "number") {
|
|
@@ -2549,20 +2556,6 @@ function requireNumberIsPositive(e, n = "number") {
|
|
|
2549
2556
|
return e;
|
|
2550
2557
|
}
|
|
2551
2558
|
|
|
2552
|
-
function requireNonNullish(e) {
|
|
2553
|
-
if (null == e) {
|
|
2554
|
-
throw new TypeError("Cannot be null or undefined");
|
|
2555
|
-
}
|
|
2556
|
-
return e;
|
|
2557
|
-
}
|
|
2558
|
-
|
|
2559
|
-
function requirePropDefined(e, n) {
|
|
2560
|
-
if (null == n) {
|
|
2561
|
-
throw new RangeError(missingField(e));
|
|
2562
|
-
}
|
|
2563
|
-
return n;
|
|
2564
|
-
}
|
|
2565
|
-
|
|
2566
2559
|
function toString(n) {
|
|
2567
2560
|
if ("symbol" == typeof n) {
|
|
2568
2561
|
throw new TypeError(e);
|
|
@@ -2571,7 +2564,7 @@ function toString(n) {
|
|
|
2571
2564
|
}
|
|
2572
2565
|
|
|
2573
2566
|
function toStringViaPrimitive(e, n) {
|
|
2574
|
-
return isObjectLike(e) ? String(e) :
|
|
2567
|
+
return isObjectLike(e) ? String(e) : We(e, n);
|
|
2575
2568
|
}
|
|
2576
2569
|
|
|
2577
2570
|
function toBigInt(e) {
|
|
@@ -2607,40 +2600,40 @@ function toPositiveInteger(e, n) {
|
|
|
2607
2600
|
}
|
|
2608
2601
|
|
|
2609
2602
|
function refineOverflowOptions(e) {
|
|
2610
|
-
return void 0 === e ? 0 :
|
|
2603
|
+
return void 0 === e ? 0 : un(requireObjectLike(e));
|
|
2611
2604
|
}
|
|
2612
2605
|
|
|
2613
2606
|
function refineZonedFieldOptions(e, n = 0) {
|
|
2614
2607
|
e = normalizeOptions(e);
|
|
2615
|
-
const t =
|
|
2616
|
-
return [
|
|
2608
|
+
const t = ln(e), o = fn(e, n);
|
|
2609
|
+
return [ un(e), o, t ];
|
|
2617
2610
|
}
|
|
2618
2611
|
|
|
2619
2612
|
function refineEpochDisambigOptions(e) {
|
|
2620
|
-
return
|
|
2613
|
+
return ln(normalizeOptions(e));
|
|
2621
2614
|
}
|
|
2622
2615
|
|
|
2623
2616
|
function refineCalendarDiffOptions(e) {
|
|
2624
|
-
return e = normalizeOptions(e),
|
|
2617
|
+
return e = normalizeOptions(e), sn(e, 9, 6, 1);
|
|
2625
2618
|
}
|
|
2626
2619
|
|
|
2627
2620
|
function refineDiffOptions(e, n, t, o = 9, r = 0, i = 4) {
|
|
2628
2621
|
n = normalizeOptions(n);
|
|
2629
|
-
let a =
|
|
2630
|
-
const u =
|
|
2622
|
+
let a = sn(n, o, r), s = parseRoundingIncInteger(n), c = hn(n, i);
|
|
2623
|
+
const u = an(n, o, r, 1);
|
|
2631
2624
|
return null == a ? a = Math.max(t, u) : checkLargestSmallestUnit(a, u), s = refineRoundingInc(s, u, 1),
|
|
2632
2625
|
e && (c = (e => e < 4 ? (e + 2) % 4 : e)(c)), [ a, u, s, c ];
|
|
2633
2626
|
}
|
|
2634
2627
|
|
|
2635
2628
|
function refineRoundOptions(e, n = 6, t) {
|
|
2636
|
-
let o = parseRoundingIncInteger(e = normalizeUnitNameOptions(e,
|
|
2637
|
-
const r =
|
|
2638
|
-
let i =
|
|
2639
|
-
return i = requirePropDefined(
|
|
2629
|
+
let o = parseRoundingIncInteger(e = normalizeUnitNameOptions(e, He));
|
|
2630
|
+
const r = hn(e, 7);
|
|
2631
|
+
let i = an(e, n);
|
|
2632
|
+
return i = requirePropDefined(He, i), o = refineRoundingInc(o, i, void 0, t), [ i, o, r ];
|
|
2640
2633
|
}
|
|
2641
2634
|
|
|
2642
2635
|
function refineDateDisplayOptions(e) {
|
|
2643
|
-
return
|
|
2636
|
+
return dn(normalizeOptions(e));
|
|
2644
2637
|
}
|
|
2645
2638
|
|
|
2646
2639
|
function refineTimeDisplayOptions(e, n) {
|
|
@@ -2649,41 +2642,41 @@ function refineTimeDisplayOptions(e, n) {
|
|
|
2649
2642
|
|
|
2650
2643
|
function refineTimeDisplayTuple(e, n = 4) {
|
|
2651
2644
|
const t = refineSubsecDigits(e);
|
|
2652
|
-
return [
|
|
2645
|
+
return [ hn(e, 4), ...refineSmallestUnitAndSubsecDigits(an(e, n), t) ];
|
|
2653
2646
|
}
|
|
2654
2647
|
|
|
2655
2648
|
function refineSmallestUnitAndSubsecDigits(e, n) {
|
|
2656
|
-
return null != e ? [
|
|
2649
|
+
return null != e ? [ j[e], e < 4 ? 9 - 3 * e : -1 ] : [ void 0 === n ? 1 : 10 ** (9 - n), n ];
|
|
2657
2650
|
}
|
|
2658
2651
|
|
|
2659
2652
|
function parseRoundingIncInteger(e) {
|
|
2660
|
-
const n = e[
|
|
2661
|
-
return void 0 === n ? 1 : toInteger(n,
|
|
2653
|
+
const n = e[Ve];
|
|
2654
|
+
return void 0 === n ? 1 : toInteger(n, Ve);
|
|
2662
2655
|
}
|
|
2663
2656
|
|
|
2664
2657
|
function refineRoundingInc(e, n, t, o) {
|
|
2665
|
-
const r = o ?
|
|
2658
|
+
const r = o ? W : j[n + 1];
|
|
2666
2659
|
if (r) {
|
|
2667
|
-
const t =
|
|
2668
|
-
if (r % ((e = clampEntity(
|
|
2669
|
-
throw new RangeError(invalidEntity(
|
|
2660
|
+
const t = j[n];
|
|
2661
|
+
if (r % ((e = clampEntity(Ve, e, 1, r / t - (o ? 0 : 1), 1)) * t)) {
|
|
2662
|
+
throw new RangeError(invalidEntity(Ve, e));
|
|
2670
2663
|
}
|
|
2671
2664
|
} else {
|
|
2672
|
-
e = clampEntity(
|
|
2665
|
+
e = clampEntity(Ve, e, 1, t ? 10 ** 9 : 1, 1);
|
|
2673
2666
|
}
|
|
2674
2667
|
return e;
|
|
2675
2668
|
}
|
|
2676
2669
|
|
|
2677
2670
|
function refineSubsecDigits(e) {
|
|
2678
|
-
let n = e[
|
|
2671
|
+
let n = e[_e];
|
|
2679
2672
|
if (void 0 !== n) {
|
|
2680
2673
|
if ("number" != typeof n) {
|
|
2681
2674
|
if ("auto" === toString(n)) {
|
|
2682
2675
|
return;
|
|
2683
2676
|
}
|
|
2684
|
-
throw new RangeError(invalidEntity(
|
|
2677
|
+
throw new RangeError(invalidEntity(_e, n));
|
|
2685
2678
|
}
|
|
2686
|
-
n = clampEntity(
|
|
2679
|
+
n = clampEntity(_e, Math.floor(n), 0, 9, 1);
|
|
2687
2680
|
}
|
|
2688
2681
|
return n;
|
|
2689
2682
|
}
|
|
@@ -2709,7 +2702,7 @@ function copyOptions(e) {
|
|
|
2709
2702
|
|
|
2710
2703
|
function overrideOverflowOptions(e, n) {
|
|
2711
2704
|
return e && Object.assign(Object.create(null), e, {
|
|
2712
|
-
overflow:
|
|
2705
|
+
overflow: Qe[n]
|
|
2713
2706
|
});
|
|
2714
2707
|
}
|
|
2715
2708
|
|
|
@@ -2722,10 +2715,10 @@ function refineUnitOption(e, n, t = 9, o = 0, r) {
|
|
|
2722
2715
|
return r ? o : null;
|
|
2723
2716
|
}
|
|
2724
2717
|
let a = Y[i];
|
|
2725
|
-
if (void 0 === a && (a =
|
|
2726
|
-
throw new RangeError(
|
|
2718
|
+
if (void 0 === a && (a = Ie[i]), void 0 === a) {
|
|
2719
|
+
throw new RangeError(invalidChoice(e, i, Y));
|
|
2727
2720
|
}
|
|
2728
|
-
return clampEntity(e, a, o, t, 1), a;
|
|
2721
|
+
return clampEntity(e, a, o, t, 1, C), a;
|
|
2729
2722
|
}
|
|
2730
2723
|
|
|
2731
2724
|
function refineChoiceOption(e, n, t, o = 0) {
|
|
@@ -2735,27 +2728,27 @@ function refineChoiceOption(e, n, t, o = 0) {
|
|
|
2735
2728
|
}
|
|
2736
2729
|
const i = toString(r), a = n[i];
|
|
2737
2730
|
if (void 0 === a) {
|
|
2738
|
-
throw new RangeError(
|
|
2731
|
+
throw new RangeError(invalidChoice(e, i, n));
|
|
2739
2732
|
}
|
|
2740
2733
|
return a;
|
|
2741
2734
|
}
|
|
2742
2735
|
|
|
2743
2736
|
function checkLargestSmallestUnit(e, n) {
|
|
2744
2737
|
if (n > e) {
|
|
2745
|
-
throw new RangeError(
|
|
2738
|
+
throw new RangeError(F);
|
|
2746
2739
|
}
|
|
2747
2740
|
}
|
|
2748
2741
|
|
|
2749
2742
|
function createInstantSlots(e) {
|
|
2750
2743
|
return {
|
|
2751
|
-
branding:
|
|
2744
|
+
branding: yn,
|
|
2752
2745
|
epochNanoseconds: e
|
|
2753
2746
|
};
|
|
2754
2747
|
}
|
|
2755
2748
|
|
|
2756
2749
|
function createZonedDateTimeSlots(e, n, t) {
|
|
2757
2750
|
return {
|
|
2758
|
-
branding:
|
|
2751
|
+
branding: Nn,
|
|
2759
2752
|
calendar: t,
|
|
2760
2753
|
timeZone: n,
|
|
2761
2754
|
epochNanoseconds: e
|
|
@@ -2764,47 +2757,48 @@ function createZonedDateTimeSlots(e, n, t) {
|
|
|
2764
2757
|
|
|
2765
2758
|
function createPlainDateTimeSlots(e, n = e.calendar) {
|
|
2766
2759
|
return {
|
|
2767
|
-
branding:
|
|
2760
|
+
branding: In,
|
|
2768
2761
|
calendar: n,
|
|
2769
|
-
...pluckProps(
|
|
2762
|
+
...pluckProps(Fe, e)
|
|
2770
2763
|
};
|
|
2771
2764
|
}
|
|
2772
2765
|
|
|
2773
2766
|
function createPlainDateSlots(e, n = e.calendar) {
|
|
2774
2767
|
return {
|
|
2775
|
-
branding:
|
|
2768
|
+
branding: Dn,
|
|
2776
2769
|
calendar: n,
|
|
2777
|
-
...pluckProps(
|
|
2770
|
+
...pluckProps(Ee, e)
|
|
2778
2771
|
};
|
|
2779
2772
|
}
|
|
2780
2773
|
|
|
2781
2774
|
function createPlainYearMonthSlots(e, n = e.calendar) {
|
|
2782
2775
|
return {
|
|
2783
|
-
branding:
|
|
2776
|
+
branding: Tn,
|
|
2784
2777
|
calendar: n,
|
|
2785
|
-
...pluckProps(
|
|
2778
|
+
...pluckProps(Ee, e)
|
|
2786
2779
|
};
|
|
2787
2780
|
}
|
|
2788
2781
|
|
|
2789
2782
|
function createPlainMonthDaySlots(e, n = e.calendar) {
|
|
2790
2783
|
return {
|
|
2791
|
-
branding:
|
|
2784
|
+
branding: gn,
|
|
2792
2785
|
calendar: n,
|
|
2793
|
-
...pluckProps(
|
|
2786
|
+
...pluckProps(Ee, e)
|
|
2794
2787
|
};
|
|
2795
2788
|
}
|
|
2796
2789
|
|
|
2797
2790
|
function createPlainTimeSlots(e) {
|
|
2798
2791
|
return {
|
|
2799
|
-
branding:
|
|
2800
|
-
...pluckProps(
|
|
2792
|
+
branding: Mn,
|
|
2793
|
+
...pluckProps(Se, e)
|
|
2801
2794
|
};
|
|
2802
2795
|
}
|
|
2803
2796
|
|
|
2804
2797
|
function createDurationSlots(e) {
|
|
2805
2798
|
return {
|
|
2806
|
-
branding:
|
|
2807
|
-
|
|
2799
|
+
branding: vn,
|
|
2800
|
+
sign: computeDurationSign(e),
|
|
2801
|
+
...pluckProps(he, e)
|
|
2808
2802
|
};
|
|
2809
2803
|
}
|
|
2810
2804
|
|
|
@@ -2817,63 +2811,75 @@ function getEpochMilliseconds(e) {
|
|
|
2817
2811
|
}
|
|
2818
2812
|
|
|
2819
2813
|
function getEpochMicroseconds(e) {
|
|
2820
|
-
return
|
|
2814
|
+
return bigNanoToBigInt(e.epochNanoseconds, z);
|
|
2821
2815
|
}
|
|
2822
2816
|
|
|
2823
2817
|
function getEpochNanoseconds(e) {
|
|
2824
|
-
return
|
|
2818
|
+
return bigNanoToBigInt(e.epochNanoseconds);
|
|
2825
2819
|
}
|
|
2826
2820
|
|
|
2827
2821
|
function getId(e) {
|
|
2828
|
-
return "string" == typeof e ? e :
|
|
2822
|
+
return "string" == typeof e ? e : We(e.id);
|
|
2829
2823
|
}
|
|
2830
2824
|
|
|
2831
2825
|
function isIdLikeEqual(e, n) {
|
|
2832
2826
|
return e === n || getId(e) === getId(n);
|
|
2833
2827
|
}
|
|
2834
2828
|
|
|
2829
|
+
function createRelativeSystem(e, n, t) {
|
|
2830
|
+
const o = e(t.calendar);
|
|
2831
|
+
return t.epochNanoseconds ? [ t, o, n(t.timeZone) ] : [ {
|
|
2832
|
+
...t,
|
|
2833
|
+
...be
|
|
2834
|
+
}, o ];
|
|
2835
|
+
}
|
|
2836
|
+
|
|
2837
|
+
function relativeMarkerToEpochNano(e, n) {
|
|
2838
|
+
return n ? e.epochNanoseconds : isoToEpochNano(e);
|
|
2839
|
+
}
|
|
2840
|
+
|
|
2835
2841
|
function totalDuration(e, n, t, o, r) {
|
|
2836
2842
|
const i = getLargestDurationUnit(o), [a, s] = ((e, n) => {
|
|
2837
|
-
const t = n((e = normalizeUnitNameOptions(e,
|
|
2838
|
-
let o =
|
|
2839
|
-
return o = requirePropDefined(
|
|
2843
|
+
const t = n((e = normalizeUnitNameOptions(e, Ge))[Je]);
|
|
2844
|
+
let o = cn(e);
|
|
2845
|
+
return o = requirePropDefined(Ge, o), [ o, t ];
|
|
2840
2846
|
})(r, e), c = Math.max(a, i);
|
|
2841
2847
|
if (c < 6 || 6 === c && (!s || !s.epochNanoseconds)) {
|
|
2842
|
-
return ((e, n) =>
|
|
2848
|
+
return ((e, n) => totalBigNano(durationFieldsToBigNano(e), n))(o, a);
|
|
2843
2849
|
}
|
|
2844
2850
|
if (!s) {
|
|
2845
|
-
throw new RangeError(
|
|
2851
|
+
throw new RangeError(P);
|
|
2846
2852
|
}
|
|
2847
|
-
const u =
|
|
2853
|
+
const u = createRelativeSystem(n, t, s);
|
|
2848
2854
|
return ((e, n, t, o, r, i) => {
|
|
2849
|
-
const a =
|
|
2850
|
-
return e[
|
|
2855
|
+
const a = computeDurationSign(e), [s, c] = clampRelativeDuration(clearDurationFields(e, t - 1), t, a, o, r, i), u = computeEpochNanoFrac(s, c, n);
|
|
2856
|
+
return e[pe[t]] + u * a;
|
|
2851
2857
|
})(...spanDuration(o, void 0, a, ...u), a, ...u);
|
|
2852
2858
|
}
|
|
2853
2859
|
|
|
2854
|
-
function
|
|
2855
|
-
return
|
|
2860
|
+
function totalBigNano(e, n) {
|
|
2861
|
+
return bigNanoToNumber(e, j[n], 1);
|
|
2856
2862
|
}
|
|
2857
2863
|
|
|
2858
2864
|
function clampRelativeDuration(e, n, t, o, r, i) {
|
|
2859
2865
|
const a = {
|
|
2860
|
-
...
|
|
2861
|
-
[
|
|
2862
|
-
}, s =
|
|
2863
|
-
return [
|
|
2866
|
+
...Me,
|
|
2867
|
+
[pe[n]]: t
|
|
2868
|
+
}, s = moveRelativeMarker(e, o, r, i), c = moveRelativeMarker(a, s, r, i);
|
|
2869
|
+
return [ relativeMarkerToEpochNano(s, i), relativeMarkerToEpochNano(c, i) ];
|
|
2864
2870
|
}
|
|
2865
2871
|
|
|
2866
2872
|
function computeEpochNanoFrac(e, n, t) {
|
|
2867
|
-
const o =
|
|
2873
|
+
const o = bigNanoToNumber(diffBigNanos(e, n));
|
|
2868
2874
|
if (!o) {
|
|
2869
|
-
throw new RangeError(
|
|
2875
|
+
throw new RangeError(m);
|
|
2870
2876
|
}
|
|
2871
|
-
return
|
|
2877
|
+
return bigNanoToNumber(diffBigNanos(e, t)) / o;
|
|
2872
2878
|
}
|
|
2873
2879
|
|
|
2874
2880
|
function roundInstant(e, n) {
|
|
2875
2881
|
const [t, o, r] = refineRoundOptions(n, 5, 1);
|
|
2876
|
-
return createInstantSlots(
|
|
2882
|
+
return createInstantSlots(roundBigNano(e.epochNanoseconds, t, o, r, 1));
|
|
2877
2883
|
}
|
|
2878
2884
|
|
|
2879
2885
|
function roundZonedDateTime(e, n, t) {
|
|
@@ -2904,13 +2910,13 @@ function roundPlainTime(e, n) {
|
|
|
2904
2910
|
function roundDateTime(e, n, t, o, r) {
|
|
2905
2911
|
return 6 === n ? ((e, n, t) => {
|
|
2906
2912
|
if (n) {
|
|
2907
|
-
const o =
|
|
2913
|
+
const o = computeTimeInDay(n, e);
|
|
2908
2914
|
return checkIsoDateTimeInBounds({
|
|
2909
2915
|
...moveByIsoDays(e, roundByInc(isoTimeFieldsToNano(e), o, t) / o),
|
|
2910
|
-
...
|
|
2916
|
+
...be
|
|
2911
2917
|
});
|
|
2912
2918
|
}
|
|
2913
|
-
return roundDateTimeToNano(e,
|
|
2919
|
+
return roundDateTimeToNano(e, W, t);
|
|
2914
2920
|
})(e, r, o) : roundDateTimeToNano(e, computeNanoInc(n, t), o);
|
|
2915
2921
|
}
|
|
2916
2922
|
|
|
@@ -2927,25 +2933,25 @@ function roundTimeToNano(e, n, t) {
|
|
|
2927
2933
|
}
|
|
2928
2934
|
|
|
2929
2935
|
function balanceDayTimeDuration(e, n, t, o, r) {
|
|
2930
|
-
return nanoToDurationDayTimeFields(
|
|
2936
|
+
return nanoToDurationDayTimeFields(roundBigNano(durationFieldsToBigNano(e), t, o, r), n);
|
|
2931
2937
|
}
|
|
2932
2938
|
|
|
2933
2939
|
function balanceDayTimeDurationByInc(e, n, t, o) {
|
|
2934
|
-
return nanoToDurationDayTimeFields(
|
|
2940
|
+
return nanoToDurationDayTimeFields(roundBigNanoByInc(durationFieldsToBigNano(e, n), t, o), n);
|
|
2935
2941
|
}
|
|
2936
2942
|
|
|
2937
2943
|
function roundRelativeDuration(e, n, t, o, r, i, a, s, c) {
|
|
2938
|
-
const u =
|
|
2944
|
+
const u = o > 6 ? nudgeRelativeDuration : c && o < 6 ? nudgeRelativeDurationTime : nudgeDurationDayTime;
|
|
2939
2945
|
let [l, f, d] = u(e, n, t, o, r, i, a, s, c);
|
|
2940
2946
|
return d && (l = ((e, n, t, o, r, i, a) => {
|
|
2941
|
-
const s =
|
|
2947
|
+
const s = computeDurationSign(e);
|
|
2942
2948
|
for (let c = o + 1; c <= t; c++) {
|
|
2943
2949
|
if (7 === c && 7 !== t) {
|
|
2944
2950
|
continue;
|
|
2945
2951
|
}
|
|
2946
2952
|
const o = clearDurationFields(e, c - 1);
|
|
2947
|
-
o[
|
|
2948
|
-
const u =
|
|
2953
|
+
o[pe[c]] += s;
|
|
2954
|
+
const u = bigNanoToNumber(diffBigNanos(relativeMarkerToEpochNano(moveRelativeMarker(o, r, i, a), a), n));
|
|
2949
2955
|
if (u && Math.sign(u) !== s) {
|
|
2950
2956
|
break;
|
|
2951
2957
|
}
|
|
@@ -2956,60 +2962,60 @@ function roundRelativeDuration(e, n, t, o, r, i, a, s, c) {
|
|
|
2956
2962
|
}
|
|
2957
2963
|
|
|
2958
2964
|
function computeNanoInc(e, n) {
|
|
2959
|
-
return
|
|
2965
|
+
return j[e] * n;
|
|
2960
2966
|
}
|
|
2961
2967
|
|
|
2962
2968
|
function roundByInc(e, n, t) {
|
|
2963
|
-
return ((e, n) =>
|
|
2969
|
+
return ((e, n) => Pn[n](e))(e / n, t) * n;
|
|
2964
2970
|
}
|
|
2965
2971
|
|
|
2966
2972
|
function roundToMinute(e) {
|
|
2967
|
-
return roundByInc(e,
|
|
2973
|
+
return roundByInc(e, L, 7);
|
|
2968
2974
|
}
|
|
2969
2975
|
|
|
2970
|
-
function
|
|
2971
|
-
return 6 === n ? [ roundByInc(
|
|
2976
|
+
function roundBigNano(e, n, t, o, r) {
|
|
2977
|
+
return 6 === n ? [ roundByInc(totalBigNano(e, 6), t, o), 0 ] : roundBigNanoByInc(e, computeNanoInc(n, t), o, r);
|
|
2972
2978
|
}
|
|
2973
2979
|
|
|
2974
|
-
function
|
|
2980
|
+
function roundBigNanoByInc(e, n, t, o) {
|
|
2975
2981
|
let [r, i] = e;
|
|
2976
|
-
o && i < 0 && (i +=
|
|
2977
|
-
const [a, s] = divModFloor(roundByInc(i, n, t),
|
|
2978
|
-
return
|
|
2982
|
+
o && i < 0 && (i += W, r -= 1);
|
|
2983
|
+
const [a, s] = divModFloor(roundByInc(i, n, t), W);
|
|
2984
|
+
return createBigNano(r + a, s);
|
|
2979
2985
|
}
|
|
2980
2986
|
|
|
2981
2987
|
function nudgeDurationDayTime(e, n, t, o, r, i) {
|
|
2982
|
-
const a =
|
|
2988
|
+
const a = computeDurationSign(e), s = durationFieldsToBigNano(e), c = roundBigNano(s, o, r, i), u = diffBigNanos(s, c), l = Math.sign(c[0] - s[0]) === a, f = nanoToDurationDayTimeFields(c, Math.min(t, 6));
|
|
2983
2989
|
return [ {
|
|
2984
2990
|
...e,
|
|
2985
2991
|
...f
|
|
2986
|
-
},
|
|
2992
|
+
}, addBigNanos(n, u), l ];
|
|
2987
2993
|
}
|
|
2988
2994
|
|
|
2989
2995
|
function nudgeRelativeDurationTime(e, n, t, o, r, i, a, s, c) {
|
|
2990
|
-
const u =
|
|
2991
|
-
let [l, f] =
|
|
2996
|
+
const u = computeDurationSign(e);
|
|
2997
|
+
let [l, f] = givenFieldsToBigNano(e, 5, pe);
|
|
2992
2998
|
const d = computeNanoInc(o, r);
|
|
2993
2999
|
let m = roundByInc(f, d, i);
|
|
2994
3000
|
const [p, h] = clampRelativeDuration({
|
|
2995
3001
|
...e,
|
|
2996
|
-
...
|
|
2997
|
-
}, 6, u, a, s, c), T = m -
|
|
2998
|
-
T && Math.sign(T) !== u ? n =
|
|
2999
|
-
n =
|
|
3000
|
-
const
|
|
3002
|
+
...Ne
|
|
3003
|
+
}, 6, u, a, s, c), T = m - bigNanoToNumber(diffBigNanos(p, h));
|
|
3004
|
+
T && Math.sign(T) !== u ? n = addBigNanoAndNumber(p, m) : (l += u, m = roundByInc(T, d, i),
|
|
3005
|
+
n = addBigNanoAndNumber(h, m));
|
|
3006
|
+
const g = nanoToDurationTimeFields(m);
|
|
3001
3007
|
return [ {
|
|
3002
3008
|
...e,
|
|
3003
|
-
...
|
|
3009
|
+
...g,
|
|
3004
3010
|
days: e.days + l
|
|
3005
3011
|
}, n, Boolean(l) ];
|
|
3006
3012
|
}
|
|
3007
3013
|
|
|
3008
3014
|
function nudgeRelativeDuration(e, n, t, o, r, i, a, s, c) {
|
|
3009
|
-
const u =
|
|
3015
|
+
const u = computeDurationSign(e), l = pe[o], f = clearDurationFields(e, o - 1), d = divTrunc(e[l], r) * r;
|
|
3010
3016
|
f[l] = d;
|
|
3011
|
-
const [m, p] = clampRelativeDuration(f, o, r * u, a, s, c), h = d + computeEpochNanoFrac(m, p, n) * u * r, T = roundByInc(h, r, i),
|
|
3012
|
-
return f[l] = T, [ f,
|
|
3017
|
+
const [m, p] = clampRelativeDuration(f, o, r * u, a, s, c), h = d + computeEpochNanoFrac(m, p, n) * u * r, T = roundByInc(h, r, i), g = Math.sign(T - h) === u;
|
|
3018
|
+
return f[l] = T, [ f, g ? p : m, g ];
|
|
3013
3019
|
}
|
|
3014
3020
|
|
|
3015
3021
|
function formatInstantIso(e, n, t, o) {
|
|
@@ -3018,27 +3024,27 @@ function formatInstantIso(e, n, t, o) {
|
|
|
3018
3024
|
return [ e.timeZone, ...n ];
|
|
3019
3025
|
})(o), c = void 0 !== r;
|
|
3020
3026
|
return ((e, n, t, o, r, i) => {
|
|
3021
|
-
t =
|
|
3027
|
+
t = roundBigNanoByInc(t, r, o, 1);
|
|
3022
3028
|
const a = n.getOffsetNanosecondsFor(t);
|
|
3023
3029
|
return formatIsoDateTimeFields(epochNanoToIso(t, a), i) + (e ? formatOffsetNano(roundToMinute(a)) : "Z");
|
|
3024
|
-
})(c, n(c ? e(r) :
|
|
3030
|
+
})(c, n(c ? e(r) : En), t.epochNanoseconds, i, a, s);
|
|
3025
3031
|
}
|
|
3026
3032
|
|
|
3027
3033
|
function formatZonedDateTimeIso(e, n, t) {
|
|
3028
3034
|
return ((e, n, t, o, r, i, a, s, c, u) => {
|
|
3029
|
-
o =
|
|
3035
|
+
o = roundBigNanoByInc(o, c, s, 1);
|
|
3030
3036
|
const l = e(t).getOffsetNanosecondsFor(o);
|
|
3031
3037
|
return formatIsoDateTimeFields(epochNanoToIso(o, l), u) + formatOffsetNano(roundToMinute(l), a) + ((e, n) => 1 !== n ? "[" + (2 === n ? "!" : "") + getId(e) + "]" : "")(t, i) + formatCalendar(n, r);
|
|
3032
3038
|
})(e, n.calendar, n.timeZone, n.epochNanoseconds, ...(e => {
|
|
3033
3039
|
e = normalizeOptions(e);
|
|
3034
|
-
const n =
|
|
3035
|
-
return [ n,
|
|
3040
|
+
const n = dn(e), t = refineSubsecDigits(e), o = pn(e), r = hn(e, 4), i = an(e, 4);
|
|
3041
|
+
return [ n, mn(e), o, r, ...refineSmallestUnitAndSubsecDigits(i, t) ];
|
|
3036
3042
|
})(t));
|
|
3037
3043
|
}
|
|
3038
3044
|
|
|
3039
3045
|
function formatPlainDateTimeIso(e, n) {
|
|
3040
3046
|
return ((e, n, t, o, r, i) => formatIsoDateTimeFields(roundDateTimeToNano(n, r, o), i) + formatCalendar(e, t))(e.calendar, e, ...(e => (e = normalizeOptions(e),
|
|
3041
|
-
[
|
|
3047
|
+
[ dn(e), ...refineTimeDisplayTuple(e) ]))(n));
|
|
3042
3048
|
}
|
|
3043
3049
|
|
|
3044
3050
|
function formatPlainDateIso(e, n) {
|
|
@@ -3064,23 +3070,25 @@ function formatDurationIso(e, n) {
|
|
|
3064
3070
|
...e,
|
|
3065
3071
|
...balanceDayTimeDurationByInc(e, Math.min(getLargestDurationUnit(e), 6), o, t)
|
|
3066
3072
|
}), ((e, n) => {
|
|
3067
|
-
const t =
|
|
3073
|
+
const {sign: t} = e, o = -1 === t ? negateDurationFields(e) : e, {hours: r, minutes: i} = o, [a, s] = divModBigNano(givenFieldsToBigNano(o, 3, pe), A, divModTrunc);
|
|
3074
|
+
checkDurationTimeUnit(a);
|
|
3075
|
+
const c = formatSubsecNano(s, n), u = n >= 0 || !t || c;
|
|
3068
3076
|
return (t < 0 ? "-" : "") + "P" + formatDurationFragments({
|
|
3069
|
-
Y:
|
|
3070
|
-
M:
|
|
3071
|
-
W:
|
|
3072
|
-
D:
|
|
3077
|
+
Y: formatDurationNumber(o.years),
|
|
3078
|
+
M: formatDurationNumber(o.months),
|
|
3079
|
+
W: formatDurationNumber(o.weeks),
|
|
3080
|
+
D: formatDurationNumber(o.days)
|
|
3073
3081
|
}) + (r || i || a || u ? "T" + formatDurationFragments({
|
|
3074
|
-
H:
|
|
3075
|
-
M:
|
|
3076
|
-
S:
|
|
3082
|
+
H: formatDurationNumber(r),
|
|
3083
|
+
M: formatDurationNumber(i),
|
|
3084
|
+
S: formatDurationNumber(a, u) + c
|
|
3077
3085
|
}) : "");
|
|
3078
3086
|
})(e, r);
|
|
3079
3087
|
}
|
|
3080
3088
|
|
|
3081
3089
|
function formatDateLikeIso(e, n, t, o) {
|
|
3082
|
-
const r = getId(e), i = o > 1 || 0 === o && r !==
|
|
3083
|
-
return 1 === o ? r ===
|
|
3090
|
+
const r = getId(e), i = o > 1 || 0 === o && r !== ce;
|
|
3091
|
+
return 1 === o ? r === ce ? n(t) : formatIsoDateFields(t) : i ? formatIsoDateFields(t) + formatCalendarId(r, 2 === o) : n(t);
|
|
3084
3092
|
}
|
|
3085
3093
|
|
|
3086
3094
|
function formatDurationFragments(e) {
|
|
@@ -3097,21 +3105,21 @@ function formatIsoDateTimeFields(e, n) {
|
|
|
3097
3105
|
}
|
|
3098
3106
|
|
|
3099
3107
|
function formatIsoDateFields(e) {
|
|
3100
|
-
return formatIsoYearMonthFields(e) + "-" +
|
|
3108
|
+
return formatIsoYearMonthFields(e) + "-" + k(e.isoDay);
|
|
3101
3109
|
}
|
|
3102
3110
|
|
|
3103
3111
|
function formatIsoYearMonthFields(e) {
|
|
3104
3112
|
const {isoYear: n} = e;
|
|
3105
|
-
return (n < 0 || n > 9999 ? getSignStr(n) + padNumber(6, Math.abs(n)) : padNumber(4, n)) + "-" +
|
|
3113
|
+
return (n < 0 || n > 9999 ? getSignStr(n) + padNumber(6, Math.abs(n)) : padNumber(4, n)) + "-" + k(e.isoMonth);
|
|
3106
3114
|
}
|
|
3107
3115
|
|
|
3108
3116
|
function formatIsoMonthDayFields(e) {
|
|
3109
|
-
return
|
|
3117
|
+
return k(e.isoMonth) + "-" + k(e.isoDay);
|
|
3110
3118
|
}
|
|
3111
3119
|
|
|
3112
3120
|
function formatIsoTimeFields(e, n) {
|
|
3113
|
-
const t = [
|
|
3114
|
-
return -1 !== n && t.push(
|
|
3121
|
+
const t = [ k(e.isoHour), k(e.isoMinute) ];
|
|
3122
|
+
return -1 !== n && t.push(k(e.isoSecond) + ((e, n, t, o) => formatSubsecNano(e * q + n * z + t, o))(e.isoMillisecond, e.isoMicrosecond, e.isoNanosecond, n)),
|
|
3115
3123
|
t.join(":");
|
|
3116
3124
|
}
|
|
3117
3125
|
|
|
@@ -3119,14 +3127,14 @@ function formatOffsetNano(e, n = 0) {
|
|
|
3119
3127
|
if (1 === n) {
|
|
3120
3128
|
return "";
|
|
3121
3129
|
}
|
|
3122
|
-
const [t, o] = divModFloor(Math.abs(e),
|
|
3123
|
-
return getSignStr(e) +
|
|
3130
|
+
const [t, o] = divModFloor(Math.abs(e), U), [r, i] = divModFloor(o, L), [a, s] = divModFloor(i, A);
|
|
3131
|
+
return getSignStr(e) + k(t) + ":" + k(r) + (a || s ? ":" + k(a) + formatSubsecNano(s) : "");
|
|
3124
3132
|
}
|
|
3125
3133
|
|
|
3126
3134
|
function formatCalendar(e, n) {
|
|
3127
3135
|
if (1 !== n) {
|
|
3128
3136
|
const t = getId(e);
|
|
3129
|
-
if (n > 1 || 0 === n && t !==
|
|
3137
|
+
if (n > 1 || 0 === n && t !== ce) {
|
|
3130
3138
|
return formatCalendarId(t, 2 === n);
|
|
3131
3139
|
}
|
|
3132
3140
|
}
|
|
@@ -3139,23 +3147,19 @@ function formatCalendarId(e, n) {
|
|
|
3139
3147
|
|
|
3140
3148
|
function formatSubsecNano(e, n) {
|
|
3141
3149
|
let t = padNumber(9, e);
|
|
3142
|
-
return t = void 0 === n ? t.replace(
|
|
3150
|
+
return t = void 0 === n ? t.replace(On, "") : t.slice(0, n), t ? "." + t : "";
|
|
3143
3151
|
}
|
|
3144
3152
|
|
|
3145
3153
|
function getSignStr(e) {
|
|
3146
3154
|
return e < 0 ? "-" : "+";
|
|
3147
3155
|
}
|
|
3148
3156
|
|
|
3149
|
-
function
|
|
3157
|
+
function formatDurationNumber(e, n) {
|
|
3150
3158
|
return e || n ? e.toLocaleString("fullwide", {
|
|
3151
3159
|
useGrouping: 0
|
|
3152
3160
|
}) : "";
|
|
3153
3161
|
}
|
|
3154
3162
|
|
|
3155
|
-
function zonedEpochNanoToIso(e, n) {
|
|
3156
|
-
return epochNanoToIso(n, e.getOffsetNanosecondsFor(n));
|
|
3157
|
-
}
|
|
3158
|
-
|
|
3159
3163
|
function _zonedEpochSlotsToIso(e, n) {
|
|
3160
3164
|
const {epochNanoseconds: t} = e, o = (n.getOffsetNanosecondsFor ? n : n(e.timeZone)).getOffsetNanosecondsFor(t), r = epochNanoToIso(t, o);
|
|
3161
3165
|
return {
|
|
@@ -3166,10 +3170,10 @@ function _zonedEpochSlotsToIso(e, n) {
|
|
|
3166
3170
|
}
|
|
3167
3171
|
|
|
3168
3172
|
function buildZonedIsoFields(e, n) {
|
|
3169
|
-
const t =
|
|
3173
|
+
const t = wn(n, e);
|
|
3170
3174
|
return {
|
|
3171
3175
|
calendar: n.calendar,
|
|
3172
|
-
...pluckProps(
|
|
3176
|
+
...pluckProps(Fe, t),
|
|
3173
3177
|
offset: formatOffsetNano(t.offsetNanoseconds),
|
|
3174
3178
|
timeZone: n.timeZone
|
|
3175
3179
|
};
|
|
@@ -3185,7 +3189,7 @@ function getMatchingInstantFor(e, n, t, o = 0, r = 0, i, a) {
|
|
|
3185
3189
|
const r = isoToEpochNano(n);
|
|
3186
3190
|
o && (t = roundToMinute(t));
|
|
3187
3191
|
for (const n of e) {
|
|
3188
|
-
let e =
|
|
3192
|
+
let e = bigNanoToNumber(diffBigNanos(n, r));
|
|
3189
3193
|
if (o && (e = roundToMinute(e)), e === t) {
|
|
3190
3194
|
return n;
|
|
3191
3195
|
}
|
|
@@ -3206,14 +3210,14 @@ function getSingleInstantFor(e, n, t = 0, o = e.getPossibleInstantsFor(n)) {
|
|
|
3206
3210
|
return o[0];
|
|
3207
3211
|
}
|
|
3208
3212
|
if (1 === t) {
|
|
3209
|
-
throw new RangeError(
|
|
3213
|
+
throw new RangeError(M);
|
|
3210
3214
|
}
|
|
3211
3215
|
if (o.length) {
|
|
3212
3216
|
return o[3 === t ? 1 : 0];
|
|
3213
3217
|
}
|
|
3214
3218
|
const r = isoToEpochNano(n), i = ((e, n) => {
|
|
3215
|
-
const t = e.getOffsetNanosecondsFor(
|
|
3216
|
-
return e.getOffsetNanosecondsFor(
|
|
3219
|
+
const t = e.getOffsetNanosecondsFor(addBigNanoAndNumber(n, -W));
|
|
3220
|
+
return validateTimeZoneGap(e.getOffsetNanosecondsFor(addBigNanoAndNumber(n, W)) - t);
|
|
3217
3221
|
})(e, r), a = i * (2 === t ? -1 : 1);
|
|
3218
3222
|
return (o = e.getPossibleInstantsFor(epochNanoToIso(r, a)))[2 === t ? 0 : o.length - 1];
|
|
3219
3223
|
}
|
|
@@ -3222,52 +3226,59 @@ function computeStartOfDay(e, n) {
|
|
|
3222
3226
|
let {epochNanoseconds: t, timeZone: o, calendar: r} = n;
|
|
3223
3227
|
const i = e(o);
|
|
3224
3228
|
return t = getMatchingInstantFor(i, {
|
|
3225
|
-
...
|
|
3226
|
-
...
|
|
3229
|
+
...wn(n, i),
|
|
3230
|
+
...be
|
|
3227
3231
|
}, void 0, 0, 0, 1), createZonedDateTimeSlots(t, o, r);
|
|
3228
3232
|
}
|
|
3229
3233
|
|
|
3230
3234
|
function computeHoursInDay(e, n) {
|
|
3231
3235
|
const t = e(n.timeZone);
|
|
3232
|
-
return
|
|
3236
|
+
return computeTimeInDay(t, wn(n, t), U);
|
|
3233
3237
|
}
|
|
3234
3238
|
|
|
3235
|
-
function
|
|
3239
|
+
function computeTimeInDay(e, n, t) {
|
|
3236
3240
|
n = {
|
|
3237
3241
|
...n,
|
|
3238
|
-
...
|
|
3242
|
+
...be
|
|
3239
3243
|
};
|
|
3240
|
-
const
|
|
3244
|
+
const o = bigNanoToNumber(diffBigNanos(getSingleInstantFor(e, {
|
|
3241
3245
|
...n,
|
|
3242
|
-
...
|
|
3246
|
+
...be
|
|
3243
3247
|
}), getSingleInstantFor(e, {
|
|
3244
3248
|
...moveByIsoDays(n, 1),
|
|
3245
|
-
...
|
|
3246
|
-
})));
|
|
3247
|
-
if (
|
|
3248
|
-
throw new RangeError(
|
|
3249
|
+
...be
|
|
3250
|
+
})), t, 1);
|
|
3251
|
+
if (o <= 0) {
|
|
3252
|
+
throw new RangeError(m);
|
|
3249
3253
|
}
|
|
3250
|
-
return
|
|
3254
|
+
return o;
|
|
3251
3255
|
}
|
|
3252
3256
|
|
|
3253
3257
|
function validateTimeZoneOffset(e) {
|
|
3254
|
-
if (Math.abs(e) >=
|
|
3258
|
+
if (Math.abs(e) >= W) {
|
|
3259
|
+
throw new RangeError(g);
|
|
3260
|
+
}
|
|
3261
|
+
return e;
|
|
3262
|
+
}
|
|
3263
|
+
|
|
3264
|
+
function validateTimeZoneGap(e) {
|
|
3265
|
+
if (e > W) {
|
|
3255
3266
|
throw new RangeError(D$1);
|
|
3256
3267
|
}
|
|
3257
3268
|
return e;
|
|
3258
3269
|
}
|
|
3259
3270
|
|
|
3260
3271
|
function moveInstant(e, n, t) {
|
|
3261
|
-
return createInstantSlots(checkEpochNanoInBounds(
|
|
3272
|
+
return createInstantSlots(checkEpochNanoInBounds(addBigNanos(n.epochNanoseconds, (e => {
|
|
3262
3273
|
if (durationHasDateParts(e)) {
|
|
3263
|
-
throw new RangeError(
|
|
3274
|
+
throw new RangeError(E);
|
|
3264
3275
|
}
|
|
3265
|
-
return
|
|
3276
|
+
return durationFieldsToBigNano(e, 5);
|
|
3266
3277
|
})(e ? negateDurationFields(t) : t))));
|
|
3267
3278
|
}
|
|
3268
3279
|
|
|
3269
3280
|
function moveZonedDateTime(e, n, t, o, r, i = Object.create(null)) {
|
|
3270
|
-
const a = n(o.timeZone), s =
|
|
3281
|
+
const a = n(o.timeZone), s = moveZonedEpochSlots(e(o.calendar), a, o, t ? negateDurationFields(r) : r, i);
|
|
3271
3282
|
return {
|
|
3272
3283
|
...o,
|
|
3273
3284
|
epochNanoseconds: s
|
|
@@ -3275,24 +3286,20 @@ function moveZonedDateTime(e, n, t, o, r, i = Object.create(null)) {
|
|
|
3275
3286
|
}
|
|
3276
3287
|
|
|
3277
3288
|
function movePlainDateTime(e, n, t, o, r = Object.create(null)) {
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
...moveDateTime(e(t.calendar), t, n ? negateDurationFields(o) : o, r)
|
|
3281
|
-
});
|
|
3289
|
+
const {calendar: i} = t;
|
|
3290
|
+
return createPlainDateTimeSlots(moveDateTime(e(i), t, n ? negateDurationFields(o) : o, r), i);
|
|
3282
3291
|
}
|
|
3283
3292
|
|
|
3284
3293
|
function movePlainDate(e, n, t, o, r) {
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
...moveDateEfficient(e(t.calendar), t, n ? negateDurationFields(o) : o, r)
|
|
3288
|
-
};
|
|
3294
|
+
const {calendar: i} = t;
|
|
3295
|
+
return createPlainDateSlots(moveDateEfficient(e(i), t, n ? negateDurationFields(o) : o, r), i);
|
|
3289
3296
|
}
|
|
3290
3297
|
|
|
3291
3298
|
function movePlainYearMonth(e, n, t, o, r = Object.create(null)) {
|
|
3292
3299
|
const i = t.calendar, a = e(i);
|
|
3293
3300
|
let s = moveToMonthStart(a, t);
|
|
3294
|
-
n && (o = negateDuration(o)),
|
|
3295
|
-
...
|
|
3301
|
+
n && (o = negateDuration(o)), o.sign < 0 && (s = a.dateAdd(s, {
|
|
3302
|
+
...Me,
|
|
3296
3303
|
months: 1
|
|
3297
3304
|
}), s = moveByIsoDays(s, -1));
|
|
3298
3305
|
const c = a.dateAdd(s, o, r);
|
|
@@ -3303,22 +3310,29 @@ function movePlainTime(e, n, t) {
|
|
|
3303
3310
|
return createPlainTimeSlots(moveTime(n, e ? negateDurationFields(t) : t)[0]);
|
|
3304
3311
|
}
|
|
3305
3312
|
|
|
3306
|
-
function
|
|
3307
|
-
|
|
3313
|
+
function moveRelativeMarker(e, n, t, o) {
|
|
3314
|
+
return o ? {
|
|
3315
|
+
epochNanoseconds: moveZonedEpochSlots(t, o, n, e)
|
|
3316
|
+
} : moveDateTime(t, n, e);
|
|
3317
|
+
}
|
|
3318
|
+
|
|
3319
|
+
function moveZonedEpochSlots(e, n, t, o, r) {
|
|
3320
|
+
const i = durationFieldsToBigNano(o, 5);
|
|
3321
|
+
let a = t.epochNanoseconds;
|
|
3308
3322
|
if (durationHasDateParts(o)) {
|
|
3309
|
-
const
|
|
3310
|
-
|
|
3311
|
-
...moveDateEfficient(e,
|
|
3323
|
+
const s = wn(t, n);
|
|
3324
|
+
a = addBigNanos(getSingleInstantFor(n, {
|
|
3325
|
+
...moveDateEfficient(e, s, {
|
|
3312
3326
|
...o,
|
|
3313
|
-
...
|
|
3327
|
+
...Ne
|
|
3314
3328
|
}, r),
|
|
3315
|
-
...pluckProps(
|
|
3316
|
-
calendar:
|
|
3329
|
+
...pluckProps(ye, s),
|
|
3330
|
+
calendar: ce
|
|
3317
3331
|
}), i);
|
|
3318
3332
|
} else {
|
|
3319
|
-
|
|
3333
|
+
a = addBigNanos(a, i), refineOverflowOptions(r);
|
|
3320
3334
|
}
|
|
3321
|
-
return checkEpochNanoInBounds(
|
|
3335
|
+
return checkEpochNanoInBounds(a);
|
|
3322
3336
|
}
|
|
3323
3337
|
|
|
3324
3338
|
function moveDateTime(e, n, t, o) {
|
|
@@ -3326,7 +3340,7 @@ function moveDateTime(e, n, t, o) {
|
|
|
3326
3340
|
return checkIsoDateTimeInBounds({
|
|
3327
3341
|
...moveDateEfficient(e, n, {
|
|
3328
3342
|
...t,
|
|
3329
|
-
...
|
|
3343
|
+
...Ne,
|
|
3330
3344
|
days: t.days + i
|
|
3331
3345
|
}, o),
|
|
3332
3346
|
...r
|
|
@@ -3338,7 +3352,7 @@ function moveDateEfficient(e, n, t, o) {
|
|
|
3338
3352
|
return e.dateAdd(n, t, o);
|
|
3339
3353
|
}
|
|
3340
3354
|
refineOverflowOptions(o);
|
|
3341
|
-
const r = t.days +
|
|
3355
|
+
const r = t.days + givenFieldsToBigNano(t, 5, pe)[0];
|
|
3342
3356
|
return r ? checkIsoDateInBounds(moveByIsoDays(n, r)) : n;
|
|
3343
3357
|
}
|
|
3344
3358
|
|
|
@@ -3347,87 +3361,87 @@ function moveToMonthStart(e, n) {
|
|
|
3347
3361
|
}
|
|
3348
3362
|
|
|
3349
3363
|
function moveTime(e, n) {
|
|
3350
|
-
const [t, o] =
|
|
3364
|
+
const [t, o] = givenFieldsToBigNano(n, 5, pe), [r, i] = nanoToIsoTimeAndDay(isoTimeFieldsToNano(e) + o);
|
|
3351
3365
|
return [ r, t + i ];
|
|
3352
3366
|
}
|
|
3353
3367
|
|
|
3354
3368
|
function moveByIsoDays(e, n) {
|
|
3355
|
-
return n && (e = epochMilliToIso(isoToEpochMilli(e) + n *
|
|
3369
|
+
return n && (e = epochMilliToIso(isoToEpochMilli(e) + n * R)), e;
|
|
3356
3370
|
}
|
|
3357
3371
|
|
|
3358
|
-
function
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
},
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
function spanDuration(e, n, t, o, r, i, a) {
|
|
3371
|
-
let s = i(o, e);
|
|
3372
|
-
return n && (s = i(s, n)), [ a(o, s, t), r(s) ];
|
|
3372
|
+
function spanDuration(e, n, t, o, r, i) {
|
|
3373
|
+
let a = moveRelativeMarker(e, o, r, i);
|
|
3374
|
+
n && (a = moveRelativeMarker(n, a, r, i));
|
|
3375
|
+
const s = ((e, n, t, o, r) => r ? ((e, n, t, o, r) => {
|
|
3376
|
+
const i = compareBigNanos(o.epochNanoseconds, t.epochNanoseconds);
|
|
3377
|
+
return i ? r < 6 ? diffEpochNanoExact(t.epochNanoseconds, o.epochNanoseconds, r) : diffZonedEpochNanoViaCalendar(e, n, i, t, o, r, void 0) : Me;
|
|
3378
|
+
})(o, r, n, t, e) : ((e, n, t, o) => {
|
|
3379
|
+
const r = isoToEpochNano(n), i = isoToEpochNano(t), a = compareBigNanos(i, r);
|
|
3380
|
+
return a ? o <= 6 ? diffEpochNanoExact(r, i, o) : diffDateTimesViaCalendar(e, a, n, t, o, void 0) : Me;
|
|
3381
|
+
})(o, n, t, e))(t, o, a, r, i);
|
|
3382
|
+
return [ s, relativeMarkerToEpochNano(a, i) ];
|
|
3373
3383
|
}
|
|
3374
3384
|
|
|
3375
3385
|
function addDurations(e, n, t, o, r, i, a) {
|
|
3376
3386
|
const s = e(normalizeOptions(a).relativeTo), c = Math.max(getLargestDurationUnit(r), getLargestDurationUnit(i));
|
|
3377
3387
|
if (c < 6 || 6 === c && (!s || !s.epochNanoseconds)) {
|
|
3378
|
-
return createDurationSlots(((e, n, t, o) => {
|
|
3379
|
-
const r =
|
|
3388
|
+
return createDurationSlots(checkDurationUnits(((e, n, t, o) => {
|
|
3389
|
+
const r = addBigNanos(durationFieldsToBigNano(e), durationFieldsToBigNano(n), o ? -1 : 1);
|
|
3380
3390
|
if (!Number.isFinite(r[0])) {
|
|
3381
|
-
throw new RangeError(
|
|
3391
|
+
throw new RangeError(N);
|
|
3382
3392
|
}
|
|
3383
3393
|
return {
|
|
3384
|
-
...
|
|
3394
|
+
...Me,
|
|
3385
3395
|
...nanoToDurationDayTimeFields(r, t)
|
|
3386
3396
|
};
|
|
3387
|
-
})(r, i, c, o));
|
|
3397
|
+
})(r, i, c, o)));
|
|
3388
3398
|
}
|
|
3389
3399
|
if (!s) {
|
|
3390
|
-
throw new RangeError(
|
|
3400
|
+
throw new RangeError(P);
|
|
3391
3401
|
}
|
|
3392
|
-
return o && (i = negateDurationFields(i)), createDurationSlots(spanDuration(r, i, c, ...
|
|
3402
|
+
return o && (i = negateDurationFields(i)), createDurationSlots(spanDuration(r, i, c, ...createRelativeSystem(n, t, s))[0]);
|
|
3393
3403
|
}
|
|
3394
3404
|
|
|
3395
3405
|
function roundDuration(e, n, t, o, r) {
|
|
3396
3406
|
const i = getLargestDurationUnit(o), [a, s, c, u, l] = ((e, n, t) => {
|
|
3397
|
-
e = normalizeUnitNameOptions(e,
|
|
3398
|
-
let o =
|
|
3399
|
-
const r = t(e[
|
|
3407
|
+
e = normalizeUnitNameOptions(e, He);
|
|
3408
|
+
let o = sn(e);
|
|
3409
|
+
const r = t(e[Je]);
|
|
3400
3410
|
let i = parseRoundingIncInteger(e);
|
|
3401
|
-
const a =
|
|
3402
|
-
let s =
|
|
3411
|
+
const a = hn(e, 7);
|
|
3412
|
+
let s = an(e);
|
|
3403
3413
|
if (void 0 === o && void 0 === s) {
|
|
3404
|
-
throw new RangeError(
|
|
3414
|
+
throw new RangeError(S);
|
|
3405
3415
|
}
|
|
3406
3416
|
return null == s && (s = 0), null == o && (o = Math.max(s, n)), checkLargestSmallestUnit(o, s),
|
|
3407
3417
|
i = refineRoundingInc(i, s, 1), [ o, s, i, a, r ];
|
|
3408
3418
|
})(r, i, e), f = Math.max(i, a);
|
|
3409
3419
|
if (f < 6 || 6 === f && (!l || !l.epochNanoseconds)) {
|
|
3410
|
-
return createDurationSlots(((e, n, t, o, r) => ({
|
|
3411
|
-
...
|
|
3420
|
+
return createDurationSlots(checkDurationUnits(((e, n, t, o, r) => ({
|
|
3421
|
+
...Me,
|
|
3412
3422
|
...balanceDayTimeDuration(e, n, t, o, r)
|
|
3413
|
-
}))(o, a, s, c, u));
|
|
3423
|
+
}))(o, a, s, c, u)));
|
|
3414
3424
|
}
|
|
3415
3425
|
if (!l) {
|
|
3416
|
-
throw new RangeError(
|
|
3426
|
+
throw new RangeError(P);
|
|
3417
3427
|
}
|
|
3418
|
-
const d =
|
|
3419
|
-
let
|
|
3420
|
-
o.weeks && 7 === s && (
|
|
3428
|
+
const d = createRelativeSystem(n, t, l);
|
|
3429
|
+
let p = 0;
|
|
3430
|
+
o.weeks && 7 === s && (p = o.weeks, o = {
|
|
3421
3431
|
...o,
|
|
3422
3432
|
weeks: 0
|
|
3423
3433
|
});
|
|
3424
3434
|
let [h, T] = spanDuration(o, void 0, a, ...d);
|
|
3425
|
-
const
|
|
3426
|
-
if (
|
|
3427
|
-
throw new RangeError(
|
|
3435
|
+
const g = o.sign, D = computeDurationSign(h);
|
|
3436
|
+
if (g && D && g !== D) {
|
|
3437
|
+
throw new RangeError(m);
|
|
3428
3438
|
}
|
|
3429
|
-
return !
|
|
3430
|
-
h.weeks +=
|
|
3439
|
+
return !D || 0 === s && 1 === c || (h = roundRelativeDuration(h, T, a, s, c, u, ...d)),
|
|
3440
|
+
h.weeks += p, createDurationSlots(h);
|
|
3441
|
+
}
|
|
3442
|
+
|
|
3443
|
+
function absDuration(e) {
|
|
3444
|
+
return -1 === e.sign ? negateDuration(e) : e;
|
|
3431
3445
|
}
|
|
3432
3446
|
|
|
3433
3447
|
function negateDuration(e) {
|
|
@@ -3436,28 +3450,23 @@ function negateDuration(e) {
|
|
|
3436
3450
|
|
|
3437
3451
|
function negateDurationFields(e) {
|
|
3438
3452
|
const n = {};
|
|
3439
|
-
for (const t of
|
|
3453
|
+
for (const t of pe) {
|
|
3440
3454
|
n[t] = -1 * e[t] || 0;
|
|
3441
3455
|
}
|
|
3442
3456
|
return n;
|
|
3443
3457
|
}
|
|
3444
3458
|
|
|
3445
|
-
function
|
|
3446
|
-
return
|
|
3447
|
-
var n;
|
|
3448
|
-
}
|
|
3449
|
-
|
|
3450
|
-
function queryDurationBlank(e) {
|
|
3451
|
-
return !Sn(e);
|
|
3459
|
+
function getDurationBlank(e) {
|
|
3460
|
+
return !e.sign;
|
|
3452
3461
|
}
|
|
3453
3462
|
|
|
3454
|
-
function computeDurationSign(e, n =
|
|
3463
|
+
function computeDurationSign(e, n = pe) {
|
|
3455
3464
|
let t = 0;
|
|
3456
3465
|
for (const o of n) {
|
|
3457
3466
|
const n = Math.sign(e[o]);
|
|
3458
3467
|
if (n) {
|
|
3459
3468
|
if (t && t !== n) {
|
|
3460
|
-
throw new RangeError(
|
|
3469
|
+
throw new RangeError(v);
|
|
3461
3470
|
}
|
|
3462
3471
|
t = n;
|
|
3463
3472
|
}
|
|
@@ -3465,24 +3474,33 @@ function computeDurationSign(e, n = de) {
|
|
|
3465
3474
|
return t;
|
|
3466
3475
|
}
|
|
3467
3476
|
|
|
3468
|
-
function
|
|
3469
|
-
|
|
3477
|
+
function checkDurationUnits(e) {
|
|
3478
|
+
for (const n of De) {
|
|
3479
|
+
clampEntity(n, e[n], -Bn, Bn, 1);
|
|
3480
|
+
}
|
|
3481
|
+
return checkDurationTimeUnit(bigNanoToNumber(durationFieldsToBigNano(e), A)), e;
|
|
3470
3482
|
}
|
|
3471
3483
|
|
|
3472
|
-
function
|
|
3473
|
-
|
|
3484
|
+
function checkDurationTimeUnit(e) {
|
|
3485
|
+
if (!Number.isSafeInteger(e)) {
|
|
3486
|
+
throw new RangeError(y);
|
|
3487
|
+
}
|
|
3488
|
+
}
|
|
3489
|
+
|
|
3490
|
+
function durationFieldsToBigNano(e, n = 6) {
|
|
3491
|
+
return givenFieldsToBigNano(e, n, pe);
|
|
3474
3492
|
}
|
|
3475
3493
|
|
|
3476
3494
|
function nanoToDurationDayTimeFields(e, n = 6) {
|
|
3477
|
-
const [t, o] = e, r = nanoToGivenFields(o, n,
|
|
3478
|
-
if (r[
|
|
3479
|
-
throw new RangeError(
|
|
3495
|
+
const [t, o] = e, r = nanoToGivenFields(o, n, pe);
|
|
3496
|
+
if (r[pe[n]] += t * (W / j[n]), !Number.isFinite(r[pe[n]])) {
|
|
3497
|
+
throw new RangeError(N);
|
|
3480
3498
|
}
|
|
3481
3499
|
return r;
|
|
3482
3500
|
}
|
|
3483
3501
|
|
|
3484
3502
|
function nanoToDurationTimeFields(e, n = 5) {
|
|
3485
|
-
return nanoToGivenFields(e, n,
|
|
3503
|
+
return nanoToGivenFields(e, n, pe);
|
|
3486
3504
|
}
|
|
3487
3505
|
|
|
3488
3506
|
function clearDurationFields(e, n) {
|
|
@@ -3490,18 +3508,18 @@ function clearDurationFields(e, n) {
|
|
|
3490
3508
|
...e
|
|
3491
3509
|
};
|
|
3492
3510
|
for (let e = 0; e <= n; e++) {
|
|
3493
|
-
t[
|
|
3511
|
+
t[pe[e]] = 0;
|
|
3494
3512
|
}
|
|
3495
3513
|
return t;
|
|
3496
3514
|
}
|
|
3497
3515
|
|
|
3498
3516
|
function durationHasDateParts(e) {
|
|
3499
|
-
return Boolean(computeDurationSign(e,
|
|
3517
|
+
return Boolean(computeDurationSign(e, ge));
|
|
3500
3518
|
}
|
|
3501
3519
|
|
|
3502
3520
|
function getLargestDurationUnit(e) {
|
|
3503
3521
|
let n = 9;
|
|
3504
|
-
for (;n > 0 && !e[
|
|
3522
|
+
for (;n > 0 && !e[pe[n]]; n--) {}
|
|
3505
3523
|
return n;
|
|
3506
3524
|
}
|
|
3507
3525
|
|
|
@@ -3510,8 +3528,8 @@ function createSplitTuple(e, n) {
|
|
|
3510
3528
|
}
|
|
3511
3529
|
|
|
3512
3530
|
function computePeriod(e) {
|
|
3513
|
-
const n = Math.floor(e /
|
|
3514
|
-
return [ n, n +
|
|
3531
|
+
const n = Math.floor(e / Sn) * Sn;
|
|
3532
|
+
return [ n, n + Sn ];
|
|
3515
3533
|
}
|
|
3516
3534
|
|
|
3517
3535
|
function parseInstant(e) {
|
|
@@ -3531,8 +3549,8 @@ function parseInstant(e) {
|
|
|
3531
3549
|
return n.timeZone && parseOffsetNanoMaybe(n.timeZone, 1), createInstantSlots(isoToEpochNanoWithOffset(checkIsoDateTimeFields(n), t));
|
|
3532
3550
|
}
|
|
3533
3551
|
|
|
3534
|
-
function
|
|
3535
|
-
const n = parseDateTimeLike(
|
|
3552
|
+
function parseRelativeToSlots(e) {
|
|
3553
|
+
const n = parseDateTimeLike(We(e));
|
|
3536
3554
|
if (!n) {
|
|
3537
3555
|
throw new RangeError(failedParse(e));
|
|
3538
3556
|
}
|
|
@@ -3546,7 +3564,7 @@ function parseZonedOrPlainDateTime(e) {
|
|
|
3546
3564
|
}
|
|
3547
3565
|
|
|
3548
3566
|
function parseZonedDateTime(e, n) {
|
|
3549
|
-
const t = parseDateTimeLike(
|
|
3567
|
+
const t = parseDateTimeLike(We(e));
|
|
3550
3568
|
if (!t || !t.timeZone) {
|
|
3551
3569
|
throw new RangeError(failedParse(e));
|
|
3552
3570
|
}
|
|
@@ -3563,7 +3581,7 @@ function parseOffsetNano(e) {
|
|
|
3563
3581
|
}
|
|
3564
3582
|
|
|
3565
3583
|
function parsePlainDateTime(e) {
|
|
3566
|
-
const n = parseDateTimeLike(
|
|
3584
|
+
const n = parseDateTimeLike(We(e));
|
|
3567
3585
|
if (!n || n.o) {
|
|
3568
3586
|
throw new RangeError(failedParse(e));
|
|
3569
3587
|
}
|
|
@@ -3571,7 +3589,7 @@ function parsePlainDateTime(e) {
|
|
|
3571
3589
|
}
|
|
3572
3590
|
|
|
3573
3591
|
function parsePlainDate(e) {
|
|
3574
|
-
const n = parseDateTimeLike(
|
|
3592
|
+
const n = parseDateTimeLike(We(e));
|
|
3575
3593
|
if (!n || n.o) {
|
|
3576
3594
|
throw new RangeError(failedParse(e));
|
|
3577
3595
|
}
|
|
@@ -3579,7 +3597,7 @@ function parsePlainDate(e) {
|
|
|
3579
3597
|
}
|
|
3580
3598
|
|
|
3581
3599
|
function parsePlainYearMonth(e, n) {
|
|
3582
|
-
const t = parseYearMonthOnly(
|
|
3600
|
+
const t = parseYearMonthOnly(We(n));
|
|
3583
3601
|
if (t) {
|
|
3584
3602
|
return requireIsoCalendar(t), createPlainYearMonthSlots(checkIsoYearMonthInBounds(checkIsoDateFields(t)));
|
|
3585
3603
|
}
|
|
@@ -3591,13 +3609,13 @@ function parsePlainYearMonth(e, n) {
|
|
|
3591
3609
|
}
|
|
3592
3610
|
|
|
3593
3611
|
function requireIsoCalendar(e) {
|
|
3594
|
-
if (e.calendar !==
|
|
3612
|
+
if (e.calendar !== ce) {
|
|
3595
3613
|
throw new RangeError(invalidSubstring(e.calendar));
|
|
3596
3614
|
}
|
|
3597
3615
|
}
|
|
3598
3616
|
|
|
3599
3617
|
function parsePlainMonthDay(e, n) {
|
|
3600
|
-
const t = parseMonthDayOnly(
|
|
3618
|
+
const t = parseMonthDayOnly(We(n));
|
|
3601
3619
|
if (t) {
|
|
3602
3620
|
return requireIsoCalendar(t), createPlainMonthDaySlots(checkIsoDateFields(t));
|
|
3603
3621
|
}
|
|
@@ -3607,9 +3625,9 @@ function parsePlainMonthDay(e, n) {
|
|
|
3607
3625
|
|
|
3608
3626
|
function parsePlainTime(e) {
|
|
3609
3627
|
let n, t = (e => {
|
|
3610
|
-
const n =
|
|
3628
|
+
const n = $n.exec(e);
|
|
3611
3629
|
return n ? (organizeAnnotationParts(n[10]), organizeTimeParts(n)) : void 0;
|
|
3612
|
-
})(
|
|
3630
|
+
})(We(e));
|
|
3613
3631
|
if (!t) {
|
|
3614
3632
|
if (t = parseDateTimeLike(e), !t) {
|
|
3615
3633
|
throw new RangeError(failedParse(e));
|
|
@@ -3633,12 +3651,12 @@ function parsePlainTime(e) {
|
|
|
3633
3651
|
|
|
3634
3652
|
function parseDuration(e) {
|
|
3635
3653
|
const n = (e => {
|
|
3636
|
-
const n =
|
|
3654
|
+
const n = Gn.exec(e);
|
|
3637
3655
|
return n ? (e => {
|
|
3638
|
-
function parseUnit(e,
|
|
3656
|
+
function parseUnit(e, r, i) {
|
|
3639
3657
|
let a = 0, s = 0;
|
|
3640
|
-
if (i && ([a,
|
|
3641
|
-
if (
|
|
3658
|
+
if (i && ([a, o] = divModFloor(o, j[i])), void 0 !== e) {
|
|
3659
|
+
if (t) {
|
|
3642
3660
|
throw new RangeError(invalidSubstring(e));
|
|
3643
3661
|
}
|
|
3644
3662
|
s = (e => {
|
|
@@ -3647,24 +3665,24 @@ function parseDuration(e) {
|
|
|
3647
3665
|
throw new RangeError(invalidSubstring(e));
|
|
3648
3666
|
}
|
|
3649
3667
|
return n;
|
|
3650
|
-
})(e), n = 1,
|
|
3668
|
+
})(e), n = 1, r && (o = parseSubsecNano(r) * (j[i] / A), t = 1);
|
|
3651
3669
|
}
|
|
3652
3670
|
return a + s;
|
|
3653
3671
|
}
|
|
3654
|
-
let n = 0,
|
|
3655
|
-
...zipProps(
|
|
3656
|
-
...nanoToGivenFields(
|
|
3672
|
+
let n = 0, t = 0, o = 0, r = {
|
|
3673
|
+
...zipProps(pe, [ parseUnit(e[2]), parseUnit(e[3]), parseUnit(e[4]), parseUnit(e[5]), parseUnit(e[6], e[7], 5), parseUnit(e[8], e[9], 4), parseUnit(e[10], e[11], 3) ]),
|
|
3674
|
+
...nanoToGivenFields(o, 2, pe)
|
|
3657
3675
|
};
|
|
3658
3676
|
if (!n) {
|
|
3659
|
-
throw new RangeError(
|
|
3677
|
+
throw new RangeError(noValidFields(pe));
|
|
3660
3678
|
}
|
|
3661
|
-
return parseSign(e[1]) < 0 && (
|
|
3679
|
+
return parseSign(e[1]) < 0 && (r = negateDurationFields(r)), r;
|
|
3662
3680
|
})(n) : void 0;
|
|
3663
|
-
})(
|
|
3681
|
+
})(We(e));
|
|
3664
3682
|
if (!n) {
|
|
3665
3683
|
throw new RangeError(failedParse(e));
|
|
3666
3684
|
}
|
|
3667
|
-
return createDurationSlots(n);
|
|
3685
|
+
return createDurationSlots(checkDurationUnits(n));
|
|
3668
3686
|
}
|
|
3669
3687
|
|
|
3670
3688
|
function parseCalendarId(e) {
|
|
@@ -3674,11 +3692,11 @@ function parseCalendarId(e) {
|
|
|
3674
3692
|
|
|
3675
3693
|
function parseTimeZoneId(e) {
|
|
3676
3694
|
const n = parseDateTimeLike(e);
|
|
3677
|
-
return n && (n.timeZone || n.o &&
|
|
3695
|
+
return n && (n.timeZone || n.o && En || n.offset) || e;
|
|
3678
3696
|
}
|
|
3679
3697
|
|
|
3680
3698
|
function finalizeZonedDateTime(e, n, t = 0, o = 0) {
|
|
3681
|
-
const r = resolveTimeZoneId(e.timeZone), i =
|
|
3699
|
+
const r = resolveTimeZoneId(e.timeZone), i = kn(r);
|
|
3682
3700
|
return createZonedDateTimeSlots(getMatchingInstantFor(i, checkIsoDateTimeFields(e), n, t, o, !i.h, e.o), r, resolveCalendarId(e.calendar));
|
|
3683
3701
|
}
|
|
3684
3702
|
|
|
@@ -3698,7 +3716,7 @@ function resolveSlotsCalendar(e) {
|
|
|
3698
3716
|
}
|
|
3699
3717
|
|
|
3700
3718
|
function parseDateTimeLike(e) {
|
|
3701
|
-
const n =
|
|
3719
|
+
const n = jn.exec(e);
|
|
3702
3720
|
return n ? (e => {
|
|
3703
3721
|
const n = e[10], t = "Z" === (n || "").toUpperCase();
|
|
3704
3722
|
return {
|
|
@@ -3715,7 +3733,7 @@ function parseDateTimeLike(e) {
|
|
|
3715
3733
|
}
|
|
3716
3734
|
|
|
3717
3735
|
function parseYearMonthOnly(e) {
|
|
3718
|
-
const n =
|
|
3736
|
+
const n = Un.exec(e);
|
|
3719
3737
|
return n ? (e => ({
|
|
3720
3738
|
isoYear: organizeIsoYearParts(e),
|
|
3721
3739
|
isoMonth: parseInt(e[4]),
|
|
@@ -3725,9 +3743,9 @@ function parseYearMonthOnly(e) {
|
|
|
3725
3743
|
}
|
|
3726
3744
|
|
|
3727
3745
|
function parseMonthDayOnly(e) {
|
|
3728
|
-
const n =
|
|
3746
|
+
const n = Wn.exec(e);
|
|
3729
3747
|
return n ? (e => ({
|
|
3730
|
-
isoYear:
|
|
3748
|
+
isoYear: qe,
|
|
3731
3749
|
isoMonth: parseInt(e[1]),
|
|
3732
3750
|
isoDay: parseInt(e[2]),
|
|
3733
3751
|
...organizeAnnotationParts(e[3])
|
|
@@ -3735,13 +3753,13 @@ function parseMonthDayOnly(e) {
|
|
|
3735
3753
|
}
|
|
3736
3754
|
|
|
3737
3755
|
function parseOffsetNanoMaybe(e, n) {
|
|
3738
|
-
const t =
|
|
3756
|
+
const t = xn.exec(e);
|
|
3739
3757
|
return t ? ((e, n) => {
|
|
3740
3758
|
const t = e[4] || e[5];
|
|
3741
3759
|
if (n && t) {
|
|
3742
3760
|
throw new RangeError(invalidSubstring(t));
|
|
3743
3761
|
}
|
|
3744
|
-
return validateTimeZoneOffset((parseInt0(e[2]) *
|
|
3762
|
+
return validateTimeZoneOffset((parseInt0(e[2]) * U + parseInt0(e[3]) * L + parseInt0(e[4]) * A + parseSubsecNano(e[5] || "")) * parseSign(e[1]));
|
|
3745
3763
|
})(t, n) : void 0;
|
|
3746
3764
|
}
|
|
3747
3765
|
|
|
@@ -3766,7 +3784,7 @@ function organizeTimeParts(e) {
|
|
|
3766
3784
|
function organizeAnnotationParts(e) {
|
|
3767
3785
|
let n, t;
|
|
3768
3786
|
const o = [];
|
|
3769
|
-
if (e.replace(
|
|
3787
|
+
if (e.replace(Hn, ((e, r, i) => {
|
|
3770
3788
|
const a = Boolean(r), [s, c] = i.split("=").reverse();
|
|
3771
3789
|
if (c) {
|
|
3772
3790
|
if ("u-ca" === c) {
|
|
@@ -3786,7 +3804,7 @@ function organizeAnnotationParts(e) {
|
|
|
3786
3804
|
}
|
|
3787
3805
|
return {
|
|
3788
3806
|
timeZone: t,
|
|
3789
|
-
calendar: o[0] ||
|
|
3807
|
+
calendar: o[0] || ce
|
|
3790
3808
|
};
|
|
3791
3809
|
}
|
|
3792
3810
|
|
|
@@ -3808,40 +3826,45 @@ function parseInt0(e) {
|
|
|
3808
3826
|
|
|
3809
3827
|
function resolveTimeZoneId(e) {
|
|
3810
3828
|
const n = getTimeZoneEssence(e);
|
|
3811
|
-
return "number" == typeof n ? formatOffsetNano(n) : n ? (e =>
|
|
3829
|
+
return "number" == typeof n ? formatOffsetNano(n) : n ? (e => {
|
|
3830
|
+
if (_n.test(e)) {
|
|
3831
|
+
throw new RangeError(T);
|
|
3832
|
+
}
|
|
3833
|
+
return e.toLowerCase().split("/").map(((e, n) => (e.length <= 3 || /\d/.test(e)) && !/etc|yap/.test(e) ? e.toUpperCase() : e.replace(/baja|dumont|[a-z]+/g, ((e, t) => e.length <= 2 && !n || "in" === e || "chat" === e ? e.toUpperCase() : e.length > 2 || !t ? capitalize(e).replace(/island|noronha|murdo|rivadavia|urville/, capitalize) : e)))).join("/");
|
|
3834
|
+
})(e) : En;
|
|
3812
3835
|
}
|
|
3813
3836
|
|
|
3814
3837
|
function getTimeZoneAtomic(e) {
|
|
3815
3838
|
const n = getTimeZoneEssence(e);
|
|
3816
|
-
return "number" == typeof n ? n : n ? n.resolvedOptions().timeZone :
|
|
3839
|
+
return "number" == typeof n ? n : n ? n.resolvedOptions().timeZone : En;
|
|
3817
3840
|
}
|
|
3818
3841
|
|
|
3819
3842
|
function getTimeZoneEssence(e) {
|
|
3820
3843
|
const n = parseOffsetNanoMaybe(e = e.toUpperCase(), 1);
|
|
3821
|
-
return void 0 !== n ? n : e !==
|
|
3844
|
+
return void 0 !== n ? n : e !== En ? Vn(e) : void 0;
|
|
3822
3845
|
}
|
|
3823
3846
|
|
|
3824
3847
|
function compareInstants(e, n) {
|
|
3825
|
-
return
|
|
3848
|
+
return compareBigNanos(e.epochNanoseconds, n.epochNanoseconds);
|
|
3826
3849
|
}
|
|
3827
3850
|
|
|
3828
3851
|
function compareZonedDateTimes(e, n) {
|
|
3829
|
-
return
|
|
3852
|
+
return compareBigNanos(e.epochNanoseconds, n.epochNanoseconds);
|
|
3830
3853
|
}
|
|
3831
3854
|
|
|
3832
3855
|
function compareDurations(e, n, t, o, r, i) {
|
|
3833
3856
|
const a = e(normalizeOptions(i).relativeTo), s = Math.max(getLargestDurationUnit(o), getLargestDurationUnit(r));
|
|
3834
|
-
if (allPropsEqual(
|
|
3857
|
+
if (allPropsEqual(pe, o, r)) {
|
|
3835
3858
|
return 0;
|
|
3836
3859
|
}
|
|
3837
3860
|
if (s < 6 || 6 === s && (!a || !a.epochNanoseconds)) {
|
|
3838
|
-
return
|
|
3861
|
+
return compareBigNanos(givenFieldsToBigNano(o, 6, pe), givenFieldsToBigNano(r, 6, pe));
|
|
3839
3862
|
}
|
|
3840
3863
|
if (!a) {
|
|
3841
|
-
throw new RangeError(
|
|
3864
|
+
throw new RangeError(P);
|
|
3842
3865
|
}
|
|
3843
|
-
const [c, u, l] =
|
|
3844
|
-
return
|
|
3866
|
+
const [c, u, l] = createRelativeSystem(n, t, a);
|
|
3867
|
+
return compareBigNanos(relativeMarkerToEpochNano(moveRelativeMarker(o, c, u, l), l), relativeMarkerToEpochNano(moveRelativeMarker(r, c, u, l), l));
|
|
3845
3868
|
}
|
|
3846
3869
|
|
|
3847
3870
|
function compareIsoDateTimeFields(e, n) {
|
|
@@ -3903,38 +3926,38 @@ function diffInstants(e, n, t, o) {
|
|
|
3903
3926
|
}
|
|
3904
3927
|
|
|
3905
3928
|
function diffZonedDateTimes(e, n, t, o, r, i) {
|
|
3906
|
-
const a = getCommonCalendarSlot(o.calendar, r.calendar), s = copyOptions(i), [c, u, l, f] = refineDiffOptions(t, s, 5), d = o.epochNanoseconds, m = r.epochNanoseconds, p =
|
|
3907
|
-
let
|
|
3929
|
+
const a = getCommonCalendarSlot(o.calendar, r.calendar), s = copyOptions(i), [c, u, l, f] = refineDiffOptions(t, s, 5), d = o.epochNanoseconds, m = r.epochNanoseconds, p = compareBigNanos(m, d);
|
|
3930
|
+
let T;
|
|
3908
3931
|
if (p) {
|
|
3909
3932
|
if (c < 6) {
|
|
3910
|
-
|
|
3933
|
+
T = diffEpochNano(d, m, c, u, l, f);
|
|
3911
3934
|
} else {
|
|
3912
3935
|
const t = n(((e, n) => {
|
|
3913
3936
|
if (!isTimeZoneSlotsEqual(e, n)) {
|
|
3914
|
-
throw new RangeError(
|
|
3937
|
+
throw new RangeError(h);
|
|
3915
3938
|
}
|
|
3916
3939
|
return e;
|
|
3917
3940
|
})(o.timeZone, r.timeZone)), i = e(a);
|
|
3918
|
-
|
|
3941
|
+
T = diffZonedEpochNanoViaCalendar(i, t, p, o, r, c, s), !p || 0 === u && 1 === l || (T = roundRelativeDuration(T, m, c, u, l, f, o, i, t));
|
|
3919
3942
|
}
|
|
3920
3943
|
} else {
|
|
3921
|
-
|
|
3944
|
+
T = Me;
|
|
3922
3945
|
}
|
|
3923
|
-
return createDurationSlots(t ? negateDurationFields(
|
|
3946
|
+
return createDurationSlots(t ? negateDurationFields(T) : T);
|
|
3924
3947
|
}
|
|
3925
3948
|
|
|
3926
3949
|
function diffPlainDateTimes(e, n, t, o, r) {
|
|
3927
|
-
const i = getCommonCalendarSlot(t.calendar, o.calendar), a = copyOptions(r), [s, c, u, l] = refineDiffOptions(n, a, 6), f = isoToEpochNano(t), d = isoToEpochNano(o), m =
|
|
3950
|
+
const i = getCommonCalendarSlot(t.calendar, o.calendar), a = copyOptions(r), [s, c, u, l] = refineDiffOptions(n, a, 6), f = isoToEpochNano(t), d = isoToEpochNano(o), m = compareBigNanos(d, f);
|
|
3928
3951
|
let p;
|
|
3929
3952
|
if (m) {
|
|
3930
3953
|
if (s <= 6) {
|
|
3931
3954
|
p = diffEpochNano(f, d, s, c, u, l);
|
|
3932
3955
|
} else {
|
|
3933
3956
|
const n = e(i);
|
|
3934
|
-
p = diffDateTimesViaCalendar(n, m, t, o, s, a), !m || 0 === c && 1 === u || (p = roundRelativeDuration(p, d, s, c, u, l, t,
|
|
3957
|
+
p = diffDateTimesViaCalendar(n, m, t, o, s, a), !m || 0 === c && 1 === u || (p = roundRelativeDuration(p, d, s, c, u, l, t, n));
|
|
3935
3958
|
}
|
|
3936
3959
|
} else {
|
|
3937
|
-
p =
|
|
3960
|
+
p = Me;
|
|
3938
3961
|
}
|
|
3939
3962
|
return createDurationSlots(n ? negateDurationFields(p) : p);
|
|
3940
3963
|
}
|
|
@@ -3952,62 +3975,55 @@ function diffPlainYearMonth(e, n, t, o, r) {
|
|
|
3952
3975
|
function diffDateLike(e, n, t, o, r, i, a, s, c) {
|
|
3953
3976
|
const u = isoToEpochNano(t), l = isoToEpochNano(o);
|
|
3954
3977
|
let f;
|
|
3955
|
-
if (
|
|
3978
|
+
if (compareBigNanos(l, u)) {
|
|
3956
3979
|
let e;
|
|
3957
3980
|
6 === r ? f = diffByDay(t, o) : (e = n(), f = e.dateUntil(t, o, r, c)), 6 === i && 1 === a || (e || (e = n()),
|
|
3958
|
-
f = roundRelativeDuration(f, l, r, i, a, s,
|
|
3981
|
+
f = roundRelativeDuration(f, l, r, i, a, s, {
|
|
3982
|
+
...t,
|
|
3983
|
+
...be
|
|
3984
|
+
}, e));
|
|
3959
3985
|
} else {
|
|
3960
|
-
f =
|
|
3986
|
+
f = Me;
|
|
3961
3987
|
}
|
|
3962
3988
|
return createDurationSlots(e ? negateDurationFields(f) : f);
|
|
3963
3989
|
}
|
|
3964
3990
|
|
|
3965
3991
|
function diffPlainTimes(e, n, t, o) {
|
|
3966
3992
|
const r = copyOptions(o), [i, a, s, c] = refineDiffOptions(e, r, 5, 5), u = isoTimeFieldsToNano(n), l = roundByInc(isoTimeFieldsToNano(t) - u, computeNanoInc(a, s), c), f = {
|
|
3967
|
-
...
|
|
3993
|
+
...Me,
|
|
3968
3994
|
...nanoToDurationTimeFields(l, i)
|
|
3969
3995
|
};
|
|
3970
3996
|
return createDurationSlots(e ? negateDurationFields(f) : f);
|
|
3971
3997
|
}
|
|
3972
3998
|
|
|
3973
|
-
function diffZonedEpochNanoExact(e, n, t, o, r, i) {
|
|
3974
|
-
const a = compareDayTimeNanos(o, t);
|
|
3975
|
-
return a ? r < 6 ? diffEpochNanoExact(t, o, r) : diffZonedEpochNanoViaCalendar(e, n, a, t, o, r, i) : De;
|
|
3976
|
-
}
|
|
3977
|
-
|
|
3978
|
-
function diffDateTimesExact(e, n, t, o, r) {
|
|
3979
|
-
const i = isoToEpochNano(n), a = isoToEpochNano(t), s = compareDayTimeNanos(a, i);
|
|
3980
|
-
return s ? o <= 6 ? diffEpochNanoExact(i, a, o) : diffDateTimesViaCalendar(e, s, n, t, o, r) : De;
|
|
3981
|
-
}
|
|
3982
|
-
|
|
3983
3999
|
function diffZonedEpochNanoViaCalendar(e, n, t, o, r, i, a) {
|
|
3984
|
-
const s =
|
|
3985
|
-
let
|
|
4000
|
+
const s = wn(o, n), c = pluckProps(ye, s), u = wn(r, n), l = r.epochNanoseconds, f = bindArgs(getSingleInstantFor, n);
|
|
4001
|
+
let d, p, h, T = 0;
|
|
3986
4002
|
do {
|
|
3987
|
-
if (
|
|
3988
|
-
throw new RangeError(
|
|
4003
|
+
if (T > 2) {
|
|
4004
|
+
throw new RangeError(m);
|
|
3989
4005
|
}
|
|
3990
|
-
|
|
3991
|
-
...moveByIsoDays(u,
|
|
4006
|
+
d = {
|
|
4007
|
+
...moveByIsoDays(u, T++ * -t),
|
|
3992
4008
|
...c
|
|
3993
|
-
},
|
|
3994
|
-
} while (
|
|
4009
|
+
}, p = f(d), h = compareBigNanos(l, p);
|
|
4010
|
+
} while (h === -t);
|
|
3995
4011
|
return {
|
|
3996
|
-
...6 === i ? diffByDay(s,
|
|
3997
|
-
...nanoToDurationTimeFields(
|
|
4012
|
+
...6 === i ? diffByDay(s, d) : e.dateUntil(s, d, i, a),
|
|
4013
|
+
...nanoToDurationTimeFields(bigNanoToNumber(diffBigNanos(p, l)))
|
|
3998
4014
|
};
|
|
3999
4015
|
}
|
|
4000
4016
|
|
|
4001
4017
|
function diffDateTimesViaCalendar(e, n, t, o, r, i) {
|
|
4002
4018
|
const a = isoTimeFieldsToNano(t);
|
|
4003
4019
|
let s = isoTimeFieldsToNano(o) - a, c = t;
|
|
4004
|
-
return Math.sign(s) === -n && (c = moveByIsoDays(t, n), s +=
|
|
4020
|
+
return Math.sign(s) === -n && (c = moveByIsoDays(t, n), s += W * n), {
|
|
4005
4021
|
...e.dateUntil({
|
|
4006
4022
|
...c,
|
|
4007
|
-
...
|
|
4023
|
+
...be
|
|
4008
4024
|
}, {
|
|
4009
4025
|
...o,
|
|
4010
|
-
...
|
|
4026
|
+
...be
|
|
4011
4027
|
}, r, i),
|
|
4012
4028
|
...nanoToDurationTimeFields(s)
|
|
4013
4029
|
};
|
|
@@ -4015,21 +4031,21 @@ function diffDateTimesViaCalendar(e, n, t, o, r, i) {
|
|
|
4015
4031
|
|
|
4016
4032
|
function diffEpochNano(e, n, t, o, r, i) {
|
|
4017
4033
|
return {
|
|
4018
|
-
...
|
|
4019
|
-
...nanoToDurationDayTimeFields(
|
|
4034
|
+
...Me,
|
|
4035
|
+
...nanoToDurationDayTimeFields(roundBigNano(diffBigNanos(e, n), o, r, i), t)
|
|
4020
4036
|
};
|
|
4021
4037
|
}
|
|
4022
4038
|
|
|
4023
4039
|
function diffEpochNanoExact(e, n, t) {
|
|
4024
4040
|
return {
|
|
4025
|
-
...
|
|
4026
|
-
...nanoToDurationDayTimeFields(
|
|
4041
|
+
...Me,
|
|
4042
|
+
...nanoToDurationDayTimeFields(diffBigNanos(e, n), t)
|
|
4027
4043
|
};
|
|
4028
4044
|
}
|
|
4029
4045
|
|
|
4030
4046
|
function diffByDay(e, n) {
|
|
4031
4047
|
return {
|
|
4032
|
-
...
|
|
4048
|
+
...Me,
|
|
4033
4049
|
days: diffDays(e, n)
|
|
4034
4050
|
};
|
|
4035
4051
|
}
|
|
@@ -4039,12 +4055,12 @@ function diffDays(e, n) {
|
|
|
4039
4055
|
}
|
|
4040
4056
|
|
|
4041
4057
|
function diffEpochMilliByDay(e, n) {
|
|
4042
|
-
return Math.round((n - e) /
|
|
4058
|
+
return Math.round((n - e) / R);
|
|
4043
4059
|
}
|
|
4044
4060
|
|
|
4045
4061
|
function getCommonCalendarSlot(e, n) {
|
|
4046
4062
|
if (!isIdLikeEqual(e, n)) {
|
|
4047
|
-
throw new RangeError(
|
|
4063
|
+
throw new RangeError(p);
|
|
4048
4064
|
}
|
|
4049
4065
|
return e;
|
|
4050
4066
|
}
|
|
@@ -4057,7 +4073,7 @@ function createIntlCalendar(e) {
|
|
|
4057
4073
|
day: parseInt(e.day)
|
|
4058
4074
|
}))(hashIntlFormatParts(n, e), t);
|
|
4059
4075
|
}
|
|
4060
|
-
const n =
|
|
4076
|
+
const n = Kn(e), t = computeCalendarIdBase(e);
|
|
4061
4077
|
return {
|
|
4062
4078
|
id: e,
|
|
4063
4079
|
I: createIntlFieldCache(epochMilliToIntlFields),
|
|
@@ -4066,26 +4082,26 @@ function createIntlCalendar(e) {
|
|
|
4066
4082
|
}
|
|
4067
4083
|
|
|
4068
4084
|
function createIntlFieldCache(e) {
|
|
4069
|
-
return
|
|
4085
|
+
return memoize((n => {
|
|
4070
4086
|
const t = isoToEpochMilli(n);
|
|
4071
4087
|
return e(t);
|
|
4072
4088
|
}), WeakMap);
|
|
4073
4089
|
}
|
|
4074
4090
|
|
|
4075
4091
|
function createIntlYearMonthCache(e) {
|
|
4076
|
-
const n = e(0).year -
|
|
4077
|
-
return
|
|
4092
|
+
const n = e(0).year - ze;
|
|
4093
|
+
return memoize((t => {
|
|
4078
4094
|
let o, r = isoArgsToEpochMilli(t - n);
|
|
4079
4095
|
const i = [], a = [];
|
|
4080
4096
|
do {
|
|
4081
|
-
r += 400 *
|
|
4097
|
+
r += 400 * R;
|
|
4082
4098
|
} while ((o = e(r)).year <= t);
|
|
4083
4099
|
do {
|
|
4084
|
-
r += (1 - o.day) *
|
|
4100
|
+
r += (1 - o.day) * R, o.year === t && (i.push(r), a.push(o.month)), r -= R;
|
|
4085
4101
|
} while ((o = e(r)).year >= t);
|
|
4086
4102
|
return {
|
|
4087
|
-
|
|
4088
|
-
|
|
4103
|
+
v: i.reverse(),
|
|
4104
|
+
P: w(a.reverse())
|
|
4089
4105
|
};
|
|
4090
4106
|
}));
|
|
4091
4107
|
}
|
|
@@ -4093,9 +4109,9 @@ function createIntlYearMonthCache(e) {
|
|
|
4093
4109
|
function parseIntlYear(e, n) {
|
|
4094
4110
|
let t, o, r = parseIntlPartsYear(e);
|
|
4095
4111
|
if (e.era) {
|
|
4096
|
-
const a =
|
|
4112
|
+
const a = fe[n];
|
|
4097
4113
|
void 0 !== a && (i = (i = e.era).normalize("NFD").toLowerCase().replace(/[^a-z0-9]/g, ""),
|
|
4098
|
-
t =
|
|
4114
|
+
t = de[i] || i, o = r, r = eraYearToYear(o, a[t] || 0));
|
|
4099
4115
|
}
|
|
4100
4116
|
var i;
|
|
4101
4117
|
return {
|
|
@@ -4110,12 +4126,12 @@ function parseIntlPartsYear(e) {
|
|
|
4110
4126
|
}
|
|
4111
4127
|
|
|
4112
4128
|
function computeIntlDateParts(e) {
|
|
4113
|
-
const {year: n, month: t, day: o} = this.I(e), {
|
|
4129
|
+
const {year: n, month: t, day: o} = this.I(e), {P: r} = this.N(n);
|
|
4114
4130
|
return [ n, r[t] + 1, o ];
|
|
4115
4131
|
}
|
|
4116
4132
|
|
|
4117
4133
|
function computeIntlEpochMilli(e, n = 1, t = 1) {
|
|
4118
|
-
return this.N(e).
|
|
4134
|
+
return this.N(e).v[n - 1] + (t - 1) * R;
|
|
4119
4135
|
}
|
|
4120
4136
|
|
|
4121
4137
|
function computeIntlLeapMonth(e) {
|
|
@@ -4138,32 +4154,40 @@ function computeIntlDaysInYear(e) {
|
|
|
4138
4154
|
}
|
|
4139
4155
|
|
|
4140
4156
|
function computeIntlDaysInMonth(e, n) {
|
|
4141
|
-
const {
|
|
4157
|
+
const {v: t} = this.N(e);
|
|
4142
4158
|
let o = n + 1, r = t;
|
|
4143
|
-
return o > t.length && (o = 1, r = this.N(e + 1).
|
|
4159
|
+
return o > t.length && (o = 1, r = this.N(e + 1).v), diffEpochMilliByDay(t[n - 1], r[o - 1]);
|
|
4144
4160
|
}
|
|
4145
4161
|
|
|
4146
4162
|
function computeIntlMonthsInYear(e) {
|
|
4147
|
-
return this.N(e).
|
|
4163
|
+
return this.N(e).v.length;
|
|
4148
4164
|
}
|
|
4149
4165
|
|
|
4150
4166
|
function queryMonthStrs(e, n) {
|
|
4151
|
-
return Object.keys(e.N(n).
|
|
4167
|
+
return Object.keys(e.N(n).P);
|
|
4152
4168
|
}
|
|
4153
4169
|
|
|
4154
4170
|
function resolveCalendarId(e) {
|
|
4155
|
-
if ((e =
|
|
4171
|
+
if ((e = e.toLowerCase()) !== ce && e !== ue && computeCalendarIdBase(e) !== computeCalendarIdBase(Kn(e).resolvedOptions().calendar)) {
|
|
4156
4172
|
throw new RangeError(invalidCalendar(e));
|
|
4157
4173
|
}
|
|
4158
4174
|
return e;
|
|
4159
4175
|
}
|
|
4160
4176
|
|
|
4161
4177
|
function computeCalendarIdBase(e) {
|
|
4162
|
-
return e.split("-")[0];
|
|
4178
|
+
return "islamicc" === e && (e = "islamic"), e.split("-")[0];
|
|
4179
|
+
}
|
|
4180
|
+
|
|
4181
|
+
function computeNativeWeekOfYear(e) {
|
|
4182
|
+
return this.F(e)[0];
|
|
4183
|
+
}
|
|
4184
|
+
|
|
4185
|
+
function computeNativeYearOfWeek(e) {
|
|
4186
|
+
return this.F(e)[1];
|
|
4163
4187
|
}
|
|
4164
4188
|
|
|
4165
4189
|
function parseMonthCode(e) {
|
|
4166
|
-
const n =
|
|
4190
|
+
const n = Qn.exec(e);
|
|
4167
4191
|
if (!n) {
|
|
4168
4192
|
throw new RangeError(invalidMonthCode(e));
|
|
4169
4193
|
}
|
|
@@ -4183,19 +4207,19 @@ function eraYearToYear(e, n) {
|
|
|
4183
4207
|
}
|
|
4184
4208
|
|
|
4185
4209
|
function getCalendarEraOrigins(e) {
|
|
4186
|
-
return
|
|
4210
|
+
return fe[getCalendarIdBase(e)];
|
|
4187
4211
|
}
|
|
4188
4212
|
|
|
4189
4213
|
function getCalendarLeapMonthMeta(e) {
|
|
4190
|
-
return
|
|
4214
|
+
return me[getCalendarIdBase(e)];
|
|
4191
4215
|
}
|
|
4192
4216
|
|
|
4193
4217
|
function getCalendarIdBase(e) {
|
|
4194
|
-
return computeCalendarIdBase(e.id ||
|
|
4218
|
+
return computeCalendarIdBase(e.id || ce);
|
|
4195
4219
|
}
|
|
4196
4220
|
|
|
4197
4221
|
function refineMaybeZonedDateTimeBag(e, n, t, o) {
|
|
4198
|
-
const r = refineCalendarFields(t, o,
|
|
4222
|
+
const r = refineCalendarFields(t, o, re, [], _);
|
|
4199
4223
|
if (void 0 !== r.timeZone) {
|
|
4200
4224
|
const o = t.dateFromFields(r), i = refineTimeBag(r), a = e(r.timeZone);
|
|
4201
4225
|
return {
|
|
@@ -4208,12 +4232,12 @@ function refineMaybeZonedDateTimeBag(e, n, t, o) {
|
|
|
4208
4232
|
}
|
|
4209
4233
|
return {
|
|
4210
4234
|
...t.dateFromFields(r),
|
|
4211
|
-
...
|
|
4235
|
+
...be
|
|
4212
4236
|
};
|
|
4213
4237
|
}
|
|
4214
4238
|
|
|
4215
4239
|
function refineZonedDateTimeBag(e, n, t, o, r, i) {
|
|
4216
|
-
const a = refineCalendarFields(t, r,
|
|
4240
|
+
const a = refineCalendarFields(t, r, re, G, _), s = e(a.timeZone), [c, u, l] = refineZonedFieldOptions(i), f = t.dateFromFields(a, overrideOverflowOptions(i, c)), d = refineTimeBag(a, c);
|
|
4217
4241
|
return createZonedDateTimeSlots(getMatchingInstantFor(n(s), {
|
|
4218
4242
|
...f,
|
|
4219
4243
|
...d
|
|
@@ -4221,7 +4245,7 @@ function refineZonedDateTimeBag(e, n, t, o, r, i) {
|
|
|
4221
4245
|
}
|
|
4222
4246
|
|
|
4223
4247
|
function refinePlainDateTimeBag(e, n, t) {
|
|
4224
|
-
const o = refineCalendarFields(e, n,
|
|
4248
|
+
const o = refineCalendarFields(e, n, re, [], $), r = refineOverflowOptions(t);
|
|
4225
4249
|
return createPlainDateTimeSlots(checkIsoDateTimeInBounds({
|
|
4226
4250
|
...e.dateFromFields(o, overrideOverflowOptions(t, r)),
|
|
4227
4251
|
...refineTimeBag(o, r)
|
|
@@ -4229,30 +4253,30 @@ function refinePlainDateTimeBag(e, n, t) {
|
|
|
4229
4253
|
}
|
|
4230
4254
|
|
|
4231
4255
|
function refinePlainDateBag(e, n, t, o = []) {
|
|
4232
|
-
const r = refineCalendarFields(e, n,
|
|
4256
|
+
const r = refineCalendarFields(e, n, re, o);
|
|
4233
4257
|
return e.dateFromFields(r, t);
|
|
4234
4258
|
}
|
|
4235
4259
|
|
|
4236
4260
|
function refinePlainYearMonthBag(e, n, t, o) {
|
|
4237
|
-
const r = refineCalendarFields(e, n,
|
|
4261
|
+
const r = refineCalendarFields(e, n, te, o);
|
|
4238
4262
|
return e.yearMonthFromFields(r, t);
|
|
4239
4263
|
}
|
|
4240
4264
|
|
|
4241
4265
|
function refinePlainMonthDayBag(e, n, t, o, r = []) {
|
|
4242
|
-
const i = refineCalendarFields(e, t,
|
|
4243
|
-
return n && void 0 !== i.month && void 0 === i.monthCode && void 0 === i.year && (i.year =
|
|
4266
|
+
const i = refineCalendarFields(e, t, re, r);
|
|
4267
|
+
return n && void 0 !== i.month && void 0 === i.monthCode && void 0 === i.year && (i.year = qe),
|
|
4244
4268
|
e.monthDayFromFields(i, o);
|
|
4245
4269
|
}
|
|
4246
4270
|
|
|
4247
4271
|
function refinePlainTimeBag(e, n) {
|
|
4248
4272
|
const t = refineOverflowOptions(n);
|
|
4249
|
-
return createPlainTimeSlots(refineTimeBag(refineFields(e,
|
|
4273
|
+
return createPlainTimeSlots(refineTimeBag(refineFields(e, x, [], 1), t));
|
|
4250
4274
|
}
|
|
4251
4275
|
|
|
4252
4276
|
function refineDurationBag(e) {
|
|
4253
|
-
const n = refineFields(e,
|
|
4254
|
-
return createDurationSlots(
|
|
4255
|
-
...
|
|
4277
|
+
const n = refineFields(e, he);
|
|
4278
|
+
return createDurationSlots(checkDurationUnits({
|
|
4279
|
+
...Me,
|
|
4256
4280
|
...n
|
|
4257
4281
|
}));
|
|
4258
4282
|
}
|
|
@@ -4261,36 +4285,36 @@ function refineCalendarFields(e, n, t, o = [], r = []) {
|
|
|
4261
4285
|
return refineFields(n, [ ...e.fields(t), ...r ].sort(), o);
|
|
4262
4286
|
}
|
|
4263
4287
|
|
|
4264
|
-
function refineFields(e, n,
|
|
4265
|
-
const
|
|
4266
|
-
let
|
|
4267
|
-
for (const
|
|
4268
|
-
if (
|
|
4269
|
-
throw new RangeError(duplicateFields(
|
|
4288
|
+
function refineFields(e, n, t, o = !t) {
|
|
4289
|
+
const r = {};
|
|
4290
|
+
let i, a = 0;
|
|
4291
|
+
for (const o of n) {
|
|
4292
|
+
if (o === i) {
|
|
4293
|
+
throw new RangeError(duplicateFields(o));
|
|
4270
4294
|
}
|
|
4271
|
-
if ("constructor" ===
|
|
4272
|
-
throw new RangeError(forbiddenField(
|
|
4295
|
+
if ("constructor" === o || "__proto__" === o) {
|
|
4296
|
+
throw new RangeError(forbiddenField(o));
|
|
4273
4297
|
}
|
|
4274
|
-
let n = e[
|
|
4298
|
+
let n = e[o];
|
|
4275
4299
|
if (void 0 !== n) {
|
|
4276
|
-
|
|
4277
|
-
} else if (
|
|
4278
|
-
if (
|
|
4279
|
-
throw new TypeError(missingField(
|
|
4300
|
+
a = 1, tt[o] && (n = tt[o](n, o)), r[o] = n;
|
|
4301
|
+
} else if (t) {
|
|
4302
|
+
if (t.includes(o)) {
|
|
4303
|
+
throw new TypeError(missingField(o));
|
|
4280
4304
|
}
|
|
4281
|
-
|
|
4305
|
+
r[o] = se[o];
|
|
4282
4306
|
}
|
|
4283
|
-
|
|
4307
|
+
i = o;
|
|
4284
4308
|
}
|
|
4285
|
-
if (
|
|
4286
|
-
throw new TypeError(
|
|
4309
|
+
if (o && !a) {
|
|
4310
|
+
throw new TypeError(noValidFields(n));
|
|
4287
4311
|
}
|
|
4288
|
-
return
|
|
4312
|
+
return r;
|
|
4289
4313
|
}
|
|
4290
4314
|
|
|
4291
4315
|
function refineTimeBag(e, n) {
|
|
4292
|
-
return constrainIsoTimeFields(
|
|
4293
|
-
...
|
|
4316
|
+
return constrainIsoTimeFields(ot({
|
|
4317
|
+
...se,
|
|
4294
4318
|
...e
|
|
4295
4319
|
}), n);
|
|
4296
4320
|
}
|
|
@@ -4298,7 +4322,7 @@ function refineTimeBag(e, n) {
|
|
|
4298
4322
|
function zonedDateTimeWithFields(e, n, t, o, r, i) {
|
|
4299
4323
|
const a = copyOptions(i), {calendar: s, timeZone: c} = t;
|
|
4300
4324
|
return createZonedDateTimeSlots(((e, n, t, o, r) => {
|
|
4301
|
-
const i = mergeCalendarFields(e, t, o,
|
|
4325
|
+
const i = mergeCalendarFields(e, t, o, re, V, H), [a, s, c] = refineZonedFieldOptions(r, 2);
|
|
4302
4326
|
return getMatchingInstantFor(n, {
|
|
4303
4327
|
...e.dateFromFields(i, overrideOverflowOptions(r, a)),
|
|
4304
4328
|
...refineTimeBag(i, a)
|
|
@@ -4309,7 +4333,7 @@ function zonedDateTimeWithFields(e, n, t, o, r, i) {
|
|
|
4309
4333
|
function plainDateTimeWithFields(e, n, t, o, r) {
|
|
4310
4334
|
const i = copyOptions(r);
|
|
4311
4335
|
return createPlainDateTimeSlots(((e, n, t, o) => {
|
|
4312
|
-
const r = mergeCalendarFields(e, n, t,
|
|
4336
|
+
const r = mergeCalendarFields(e, n, t, re, $), i = refineOverflowOptions(o);
|
|
4313
4337
|
return checkIsoDateTimeInBounds({
|
|
4314
4338
|
...e.dateFromFields(r, overrideOverflowOptions(o, i)),
|
|
4315
4339
|
...refineTimeBag(r, i)
|
|
@@ -4320,7 +4344,7 @@ function plainDateTimeWithFields(e, n, t, o, r) {
|
|
|
4320
4344
|
function plainDateWithFields(e, n, t, o, r) {
|
|
4321
4345
|
const i = copyOptions(r);
|
|
4322
4346
|
return ((e, n, t, o) => {
|
|
4323
|
-
const r = mergeCalendarFields(e, n, t,
|
|
4347
|
+
const r = mergeCalendarFields(e, n, t, re);
|
|
4324
4348
|
return e.dateFromFields(r, o);
|
|
4325
4349
|
})(e(n.calendar), t, o, i);
|
|
4326
4350
|
}
|
|
@@ -4328,7 +4352,7 @@ function plainDateWithFields(e, n, t, o, r) {
|
|
|
4328
4352
|
function plainYearMonthWithFields(e, n, t, o, r) {
|
|
4329
4353
|
const i = copyOptions(r);
|
|
4330
4354
|
return createPlainYearMonthSlots(((e, n, t, o) => {
|
|
4331
|
-
const r = mergeCalendarFields(e, n, t,
|
|
4355
|
+
const r = mergeCalendarFields(e, n, t, te);
|
|
4332
4356
|
return e.yearMonthFromFields(r, o);
|
|
4333
4357
|
})(e(n.calendar), t, o, i));
|
|
4334
4358
|
}
|
|
@@ -4336,7 +4360,7 @@ function plainYearMonthWithFields(e, n, t, o, r) {
|
|
|
4336
4360
|
function plainMonthDayWithFields(e, n, t, o, r) {
|
|
4337
4361
|
const i = copyOptions(r);
|
|
4338
4362
|
return ((e, n, t, o) => {
|
|
4339
|
-
const r = mergeCalendarFields(e, n, t,
|
|
4363
|
+
const r = mergeCalendarFields(e, n, t, re);
|
|
4340
4364
|
return e.monthDayFromFields(r, o);
|
|
4341
4365
|
})(e(n.calendar), t, o, i);
|
|
4342
4366
|
}
|
|
@@ -4345,16 +4369,16 @@ function plainTimeWithFields(e, n, t) {
|
|
|
4345
4369
|
return createPlainTimeSlots(((e, n, t) => {
|
|
4346
4370
|
const o = refineOverflowOptions(t);
|
|
4347
4371
|
return refineTimeBag({
|
|
4348
|
-
...pluckProps(
|
|
4349
|
-
...refineFields(n,
|
|
4372
|
+
...pluckProps(x, e),
|
|
4373
|
+
...refineFields(n, x)
|
|
4350
4374
|
}, o);
|
|
4351
4375
|
})(e, n, t));
|
|
4352
4376
|
}
|
|
4353
4377
|
|
|
4354
4378
|
function durationWithFields(e, n) {
|
|
4355
|
-
return createDurationSlots((t = e, o = n,
|
|
4379
|
+
return createDurationSlots((t = e, o = n, checkDurationUnits({
|
|
4356
4380
|
...t,
|
|
4357
|
-
...refineFields(o,
|
|
4381
|
+
...refineFields(o, he)
|
|
4358
4382
|
})));
|
|
4359
4383
|
var t, o;
|
|
4360
4384
|
}
|
|
@@ -4367,12 +4391,12 @@ function mergeCalendarFields(e, n, t, o, r = [], i = []) {
|
|
|
4367
4391
|
}
|
|
4368
4392
|
|
|
4369
4393
|
function convertToPlainMonthDay(e, n) {
|
|
4370
|
-
const t = refineCalendarFields(e, n,
|
|
4394
|
+
const t = refineCalendarFields(e, n, ae);
|
|
4371
4395
|
return e.monthDayFromFields(t);
|
|
4372
4396
|
}
|
|
4373
4397
|
|
|
4374
4398
|
function convertToPlainYearMonth(e, n, t) {
|
|
4375
|
-
const o = refineCalendarFields(e, n,
|
|
4399
|
+
const o = refineCalendarFields(e, n, oe);
|
|
4376
4400
|
return e.yearMonthFromFields(o, t);
|
|
4377
4401
|
}
|
|
4378
4402
|
|
|
@@ -4384,25 +4408,25 @@ function convertToIso(e, n, t, o, r) {
|
|
|
4384
4408
|
|
|
4385
4409
|
function refineYear(e, n) {
|
|
4386
4410
|
let {era: t, eraYear: o, year: r} = n;
|
|
4387
|
-
const
|
|
4411
|
+
const c = getCalendarEraOrigins(e);
|
|
4388
4412
|
if (void 0 !== t || void 0 !== o) {
|
|
4389
4413
|
if (void 0 === t || void 0 === o) {
|
|
4390
|
-
throw new TypeError(
|
|
4414
|
+
throw new TypeError(a);
|
|
4391
4415
|
}
|
|
4392
|
-
if (!
|
|
4393
|
-
throw new RangeError(
|
|
4416
|
+
if (!c) {
|
|
4417
|
+
throw new RangeError(i);
|
|
4394
4418
|
}
|
|
4395
|
-
const e =
|
|
4419
|
+
const e = c[t];
|
|
4396
4420
|
if (void 0 === e) {
|
|
4397
4421
|
throw new RangeError(invalidEra(t));
|
|
4398
4422
|
}
|
|
4399
4423
|
const n = eraYearToYear(o, e);
|
|
4400
4424
|
if (void 0 !== r && r !== n) {
|
|
4401
|
-
throw new RangeError(
|
|
4425
|
+
throw new RangeError(s);
|
|
4402
4426
|
}
|
|
4403
4427
|
r = n;
|
|
4404
4428
|
} else if (void 0 === r) {
|
|
4405
|
-
throw new TypeError(missingYear(
|
|
4429
|
+
throw new TypeError(missingYear(c));
|
|
4406
4430
|
}
|
|
4407
4431
|
return r;
|
|
4408
4432
|
}
|
|
@@ -4411,42 +4435,42 @@ function refineMonth(e, n, t, o) {
|
|
|
4411
4435
|
let {month: r, monthCode: i} = n;
|
|
4412
4436
|
if (void 0 !== i) {
|
|
4413
4437
|
const n = ((e, n, t, o) => {
|
|
4414
|
-
const r = e.
|
|
4438
|
+
const r = e.O(t), [i, a] = parseMonthCode(n);
|
|
4415
4439
|
let s = monthCodeNumberToMonth(i, a, r);
|
|
4416
4440
|
if (a) {
|
|
4417
4441
|
const n = getCalendarLeapMonthMeta(e);
|
|
4418
4442
|
if (void 0 === n) {
|
|
4419
|
-
throw new RangeError(
|
|
4443
|
+
throw new RangeError(f);
|
|
4420
4444
|
}
|
|
4421
4445
|
if (n > 0) {
|
|
4422
4446
|
if (s > n) {
|
|
4423
|
-
throw new RangeError(
|
|
4447
|
+
throw new RangeError(f);
|
|
4424
4448
|
}
|
|
4425
4449
|
if (void 0 === r) {
|
|
4426
4450
|
if (1 === o) {
|
|
4427
|
-
throw new RangeError(
|
|
4451
|
+
throw new RangeError(f);
|
|
4428
4452
|
}
|
|
4429
4453
|
s--;
|
|
4430
4454
|
}
|
|
4431
4455
|
} else {
|
|
4432
4456
|
if (s !== -n) {
|
|
4433
|
-
throw new RangeError(
|
|
4457
|
+
throw new RangeError(f);
|
|
4434
4458
|
}
|
|
4435
4459
|
if (void 0 === r && 1 === o) {
|
|
4436
|
-
throw new RangeError(
|
|
4460
|
+
throw new RangeError(f);
|
|
4437
4461
|
}
|
|
4438
4462
|
}
|
|
4439
4463
|
}
|
|
4440
4464
|
return s;
|
|
4441
4465
|
})(e, i, t, o);
|
|
4442
4466
|
if (void 0 !== r && r !== n) {
|
|
4443
|
-
throw new RangeError(
|
|
4467
|
+
throw new RangeError(c);
|
|
4444
4468
|
}
|
|
4445
4469
|
r = n, o = 1;
|
|
4446
4470
|
} else if (void 0 === r) {
|
|
4447
|
-
throw new TypeError(
|
|
4471
|
+
throw new TypeError(u);
|
|
4448
4472
|
}
|
|
4449
|
-
return clampEntity("month", r, 1, e.
|
|
4473
|
+
return clampEntity("month", r, 1, e.B(t), o);
|
|
4450
4474
|
}
|
|
4451
4475
|
|
|
4452
4476
|
function refineDay(e, n, t, o, r) {
|
|
@@ -4466,25 +4490,19 @@ function spliceFields(e, n, t, o) {
|
|
|
4466
4490
|
}
|
|
4467
4491
|
}
|
|
4468
4492
|
|
|
4469
|
-
function createNativeOpsCreator(e, n) {
|
|
4470
|
-
return t => t === ae ? e : t === se || t === ce ? Object.assign(Object.create(e), {
|
|
4471
|
-
id: t
|
|
4472
|
-
}) : Object.assign(Object.create(n), Gn(t));
|
|
4473
|
-
}
|
|
4474
|
-
|
|
4475
4493
|
function constructInstantSlots(e) {
|
|
4476
|
-
return createInstantSlots(checkEpochNanoInBounds(
|
|
4494
|
+
return createInstantSlots(checkEpochNanoInBounds(bigIntToBigNano(toBigInt(e))));
|
|
4477
4495
|
}
|
|
4478
4496
|
|
|
4479
|
-
function constructZonedDateTimeSlots(e, n, t, o, r =
|
|
4480
|
-
return createZonedDateTimeSlots(checkEpochNanoInBounds(
|
|
4497
|
+
function constructZonedDateTimeSlots(e, n, t, o, r = ce) {
|
|
4498
|
+
return createZonedDateTimeSlots(checkEpochNanoInBounds(bigIntToBigNano(toBigInt(t))), n(o), e(r));
|
|
4481
4499
|
}
|
|
4482
4500
|
|
|
4483
|
-
function constructPlainDateTimeSlots(e, n, t, o, r = 0, i = 0, a = 0, s = 0, c = 0, u = 0, l =
|
|
4484
|
-
return createPlainDateTimeSlots(checkIsoDateTimeInBounds(checkIsoDateTimeFields(mapProps(toInteger, zipProps(
|
|
4501
|
+
function constructPlainDateTimeSlots(e, n, t, o, r = 0, i = 0, a = 0, s = 0, c = 0, u = 0, l = ce) {
|
|
4502
|
+
return createPlainDateTimeSlots(checkIsoDateTimeInBounds(checkIsoDateTimeFields(mapProps(toInteger, zipProps(Pe, [ n, t, o, r, i, a, s, c, u ])))), e(l));
|
|
4485
4503
|
}
|
|
4486
4504
|
|
|
4487
|
-
function constructPlainDateSlots(e, n, t, o, r =
|
|
4505
|
+
function constructPlainDateSlots(e, n, t, o, r = ce) {
|
|
4488
4506
|
return createPlainDateSlots(checkIsoDateInBounds(checkIsoDateFields(mapProps(toInteger, {
|
|
4489
4507
|
isoYear: n,
|
|
4490
4508
|
isoMonth: t,
|
|
@@ -4492,7 +4510,7 @@ function constructPlainDateSlots(e, n, t, o, r = ae) {
|
|
|
4492
4510
|
}))), e(r));
|
|
4493
4511
|
}
|
|
4494
4512
|
|
|
4495
|
-
function constructPlainYearMonthSlots(e, n, t, o =
|
|
4513
|
+
function constructPlainYearMonthSlots(e, n, t, o = ce, r = 1) {
|
|
4496
4514
|
const i = toInteger(n), a = toInteger(t), s = e(o);
|
|
4497
4515
|
return createPlainYearMonthSlots(checkIsoYearMonthInBounds(checkIsoDateFields({
|
|
4498
4516
|
isoYear: i,
|
|
@@ -4501,7 +4519,7 @@ function constructPlainYearMonthSlots(e, n, t, o = ae, r = 1) {
|
|
|
4501
4519
|
})), s);
|
|
4502
4520
|
}
|
|
4503
4521
|
|
|
4504
|
-
function constructPlainMonthDaySlots(e, n, t, o =
|
|
4522
|
+
function constructPlainMonthDaySlots(e, n, t, o = ce, r = qe) {
|
|
4505
4523
|
const i = toInteger(n), a = toInteger(t), s = e(o);
|
|
4506
4524
|
return createPlainMonthDaySlots(checkIsoDateInBounds(checkIsoDateFields({
|
|
4507
4525
|
isoYear: toInteger(r),
|
|
@@ -4511,14 +4529,14 @@ function constructPlainMonthDaySlots(e, n, t, o = ae, r = Be) {
|
|
|
4511
4529
|
}
|
|
4512
4530
|
|
|
4513
4531
|
function constructPlainTimeSlots(e = 0, n = 0, t = 0, o = 0, r = 0, i = 0) {
|
|
4514
|
-
return createPlainTimeSlots(constrainIsoTimeFields(mapProps(toInteger, zipProps(
|
|
4532
|
+
return createPlainTimeSlots(constrainIsoTimeFields(mapProps(toInteger, zipProps(ye, [ e, n, t, o, r, i ])), 1));
|
|
4515
4533
|
}
|
|
4516
4534
|
|
|
4517
4535
|
function constructDurationSlots(e = 0, n = 0, t = 0, o = 0, r = 0, i = 0, a = 0, s = 0, c = 0, u = 0) {
|
|
4518
|
-
return createDurationSlots(
|
|
4536
|
+
return createDurationSlots(checkDurationUnits(mapProps(toStrictInteger, zipProps(pe, [ e, n, t, o, r, i, a, s, c, u ]))));
|
|
4519
4537
|
}
|
|
4520
4538
|
|
|
4521
|
-
function instantToZonedDateTime(e, n, t =
|
|
4539
|
+
function instantToZonedDateTime(e, n, t = ce) {
|
|
4522
4540
|
return createZonedDateTimeSlots(e.epochNanoseconds, n, t);
|
|
4523
4541
|
}
|
|
4524
4542
|
|
|
@@ -4527,11 +4545,11 @@ function zonedDateTimeToInstant(e) {
|
|
|
4527
4545
|
}
|
|
4528
4546
|
|
|
4529
4547
|
function zonedDateTimeToPlainDateTime(e, n) {
|
|
4530
|
-
return createPlainDateTimeSlots(
|
|
4548
|
+
return createPlainDateTimeSlots(wn(n, e));
|
|
4531
4549
|
}
|
|
4532
4550
|
|
|
4533
4551
|
function zonedDateTimeToPlainDate(e, n) {
|
|
4534
|
-
return createPlainDateSlots(
|
|
4552
|
+
return createPlainDateSlots(wn(n, e));
|
|
4535
4553
|
}
|
|
4536
4554
|
|
|
4537
4555
|
function zonedDateTimeToPlainYearMonth(e, n, t) {
|
|
@@ -4543,7 +4561,7 @@ function zonedDateTimeToPlainMonthDay(e, n, t) {
|
|
|
4543
4561
|
}
|
|
4544
4562
|
|
|
4545
4563
|
function zonedDateTimeToPlainTime(e, n) {
|
|
4546
|
-
return createPlainTimeSlots(
|
|
4564
|
+
return createPlainTimeSlots(wn(n, e));
|
|
4547
4565
|
}
|
|
4548
4566
|
|
|
4549
4567
|
function plainDateTimeToZonedDateTime(e, n, t, o) {
|
|
@@ -4566,14 +4584,14 @@ function plainDateTimeToPlainMonthDay(e, n, t) {
|
|
|
4566
4584
|
}
|
|
4567
4585
|
|
|
4568
4586
|
function plainDateToZonedDateTime(e, n, t, o, r) {
|
|
4569
|
-
const i = e(r.timeZone), a = r.plainTime, s = void 0 !== a ? n(a) :
|
|
4587
|
+
const i = e(r.timeZone), a = r.plainTime, s = void 0 !== a ? n(a) : be;
|
|
4570
4588
|
return createZonedDateTimeSlots(getSingleInstantFor(t(i), {
|
|
4571
4589
|
...o,
|
|
4572
4590
|
...s
|
|
4573
4591
|
}), i, o.calendar);
|
|
4574
4592
|
}
|
|
4575
4593
|
|
|
4576
|
-
function plainDateToPlainDateTime(e, n =
|
|
4594
|
+
function plainDateToPlainDateTime(e, n = be) {
|
|
4577
4595
|
return createPlainDateTimeSlots(checkIsoDateTimeInBounds({
|
|
4578
4596
|
...e,
|
|
4579
4597
|
...n
|
|
@@ -4589,11 +4607,11 @@ function plainDateToPlainMonthDay(e, n, t) {
|
|
|
4589
4607
|
}
|
|
4590
4608
|
|
|
4591
4609
|
function plainYearMonthToPlainDate(e, n, t, o) {
|
|
4592
|
-
return ((e, n, t) => convertToIso(e, n,
|
|
4610
|
+
return ((e, n, t) => convertToIso(e, n, oe, requireObjectLike(t), ne))(e(n.calendar), t, o);
|
|
4593
4611
|
}
|
|
4594
4612
|
|
|
4595
4613
|
function plainMonthDayToPlainDate(e, n, t, o) {
|
|
4596
|
-
return ((e, n, t) => convertToIso(e, n,
|
|
4614
|
+
return ((e, n, t) => convertToIso(e, n, ae, requireObjectLike(t), Q))(e(n.calendar), t, o);
|
|
4597
4615
|
}
|
|
4598
4616
|
|
|
4599
4617
|
function plainTimeToZonedDateTime(e, n, t, o, r) {
|
|
@@ -4612,24 +4630,24 @@ function plainTimeToPlainDateTime(e, n) {
|
|
|
4612
4630
|
}
|
|
4613
4631
|
|
|
4614
4632
|
function epochSecToInstant(e) {
|
|
4615
|
-
return createInstantSlots(checkEpochNanoInBounds(
|
|
4633
|
+
return createInstantSlots(checkEpochNanoInBounds(numberToBigNano(e, A)));
|
|
4616
4634
|
}
|
|
4617
4635
|
|
|
4618
4636
|
function epochMilliToInstant(e) {
|
|
4619
|
-
return createInstantSlots(checkEpochNanoInBounds(
|
|
4637
|
+
return createInstantSlots(checkEpochNanoInBounds(numberToBigNano(e, q)));
|
|
4620
4638
|
}
|
|
4621
4639
|
|
|
4622
4640
|
function epochMicroToInstant(e) {
|
|
4623
|
-
return createInstantSlots(checkEpochNanoInBounds(
|
|
4641
|
+
return createInstantSlots(checkEpochNanoInBounds(bigIntToBigNano(toBigInt(e), z)));
|
|
4624
4642
|
}
|
|
4625
4643
|
|
|
4626
4644
|
function epochNanoToInstant(e) {
|
|
4627
|
-
return createInstantSlots(checkEpochNanoInBounds(
|
|
4645
|
+
return createInstantSlots(checkEpochNanoInBounds(bigIntToBigNano(toBigInt(e))));
|
|
4628
4646
|
}
|
|
4629
4647
|
|
|
4630
|
-
function zonedDateTimeWithPlainTime(e, n, t =
|
|
4648
|
+
function zonedDateTimeWithPlainTime(e, n, t = be) {
|
|
4631
4649
|
const o = n.timeZone, r = e(o), i = {
|
|
4632
|
-
...
|
|
4650
|
+
...wn(n, r),
|
|
4633
4651
|
...t
|
|
4634
4652
|
};
|
|
4635
4653
|
return createZonedDateTimeSlots(getMatchingInstantFor(r, i, i.offsetNanoseconds, 2), o, n.calendar);
|
|
@@ -4637,13 +4655,13 @@ function zonedDateTimeWithPlainTime(e, n, t = ve) {
|
|
|
4637
4655
|
|
|
4638
4656
|
function zonedDateTimeWithPlainDate(e, n, t) {
|
|
4639
4657
|
const o = n.timeZone, r = e(o), i = {
|
|
4640
|
-
...
|
|
4658
|
+
...wn(n, r),
|
|
4641
4659
|
...t
|
|
4642
4660
|
}, a = getPreferredCalendarSlot(n.calendar, t.calendar);
|
|
4643
4661
|
return createZonedDateTimeSlots(getMatchingInstantFor(r, i, i.offsetNanoseconds, 2), o, a);
|
|
4644
4662
|
}
|
|
4645
4663
|
|
|
4646
|
-
function plainDateTimeWithPlainTime(e, n =
|
|
4664
|
+
function plainDateTimeWithPlainTime(e, n = be) {
|
|
4647
4665
|
return createPlainDateTimeSlots({
|
|
4648
4666
|
...e,
|
|
4649
4667
|
...n
|
|
@@ -4676,13 +4694,19 @@ function getPreferredCalendarSlot(e, n) {
|
|
|
4676
4694
|
return e;
|
|
4677
4695
|
}
|
|
4678
4696
|
const t = getId(e), o = getId(n);
|
|
4679
|
-
if (t === o || t ===
|
|
4697
|
+
if (t === o || t === ce) {
|
|
4680
4698
|
return n;
|
|
4681
4699
|
}
|
|
4682
|
-
if (o ===
|
|
4700
|
+
if (o === ce) {
|
|
4683
4701
|
return e;
|
|
4684
4702
|
}
|
|
4685
|
-
throw new RangeError(
|
|
4703
|
+
throw new RangeError(p);
|
|
4704
|
+
}
|
|
4705
|
+
|
|
4706
|
+
function createNativeOpsCreator(e, n) {
|
|
4707
|
+
return t => t === ce ? e : t === ue || t === le ? Object.assign(Object.create(e), {
|
|
4708
|
+
id: t
|
|
4709
|
+
}) : Object.assign(Object.create(n), Jn(t));
|
|
4686
4710
|
}
|
|
4687
4711
|
|
|
4688
4712
|
function createOptionsTransformer(e, n, t = []) {
|
|
@@ -4698,8 +4722,8 @@ function createOptionsTransformer(e, n, t = []) {
|
|
|
4698
4722
|
}
|
|
4699
4723
|
|
|
4700
4724
|
function isoDateFieldsToEpochNano(e, n) {
|
|
4701
|
-
return getSingleInstantFor(
|
|
4702
|
-
...
|
|
4725
|
+
return getSingleInstantFor(kn(n.timeZone), {
|
|
4726
|
+
...be,
|
|
4703
4727
|
isoHour: 12,
|
|
4704
4728
|
...e
|
|
4705
4729
|
});
|
|
@@ -4711,7 +4735,7 @@ function extractEpochNano(e) {
|
|
|
4711
4735
|
|
|
4712
4736
|
function createFormatPrepper(e, n = createFormatForPrep) {
|
|
4713
4737
|
const [t, , , o] = e;
|
|
4714
|
-
return (r, i =
|
|
4738
|
+
return (r, i = Rt, ...a) => {
|
|
4715
4739
|
const s = n(o ? o(...a) : void 0, r, i, t), c = s.resolvedOptions();
|
|
4716
4740
|
return [ s, ...toEpochMillis(e, c, ...a) ];
|
|
4717
4741
|
};
|
|
@@ -4720,36 +4744,36 @@ function createFormatPrepper(e, n = createFormatForPrep) {
|
|
|
4720
4744
|
function createFormatForPrep(e, n, t, o) {
|
|
4721
4745
|
if (t = o(t), e) {
|
|
4722
4746
|
if (void 0 !== t.timeZone) {
|
|
4723
|
-
throw new TypeError(
|
|
4747
|
+
throw new TypeError(O);
|
|
4724
4748
|
}
|
|
4725
4749
|
t.timeZone = e;
|
|
4726
4750
|
}
|
|
4727
|
-
return new
|
|
4751
|
+
return new Oe(n, t);
|
|
4728
4752
|
}
|
|
4729
4753
|
|
|
4730
4754
|
function toEpochMillis(e, n, ...t) {
|
|
4731
4755
|
const [, o, r] = e;
|
|
4732
4756
|
return t.map((e => (e.calendar && ((e, n, t) => {
|
|
4733
|
-
if ((t || e !==
|
|
4734
|
-
throw new RangeError(
|
|
4757
|
+
if ((t || e !== ce) && e !== n) {
|
|
4758
|
+
throw new RangeError(p);
|
|
4735
4759
|
}
|
|
4736
4760
|
})(getId(e.calendar), n.calendar, r), epochNanoToMilli(o(e, n)))));
|
|
4737
4761
|
}
|
|
4738
4762
|
|
|
4739
4763
|
function getCurrentIsoDateTime(e) {
|
|
4740
|
-
const n =
|
|
4741
|
-
return
|
|
4764
|
+
const n = getCurrentEpochNano();
|
|
4765
|
+
return epochNanoToIso(n, e.getOffsetNanosecondsFor(n));
|
|
4742
4766
|
}
|
|
4743
4767
|
|
|
4744
|
-
function
|
|
4745
|
-
return
|
|
4768
|
+
function getCurrentEpochNano() {
|
|
4769
|
+
return numberToBigNano(Date.now(), q);
|
|
4746
4770
|
}
|
|
4747
4771
|
|
|
4748
4772
|
function getCurrentTimeZoneId() {
|
|
4749
|
-
return
|
|
4773
|
+
return Zt || (Zt = (new Oe).resolvedOptions().timeZone);
|
|
4750
4774
|
}
|
|
4751
4775
|
|
|
4752
|
-
const expectedInteger = (e, n) => `Non-integer ${e}: ${n}`, expectedPositive = (e, n) => `Non-positive ${e}: ${n}`, expectedFinite = (e, n) => `Non-finite ${e}: ${n}`, forbiddenBigIntToNumber = e => `Cannot convert bigint to ${e}`, invalidBigInt = e => `Invalid bigint: ${e}`, e = "Cannot convert Symbol to string", n = "Invalid object", numberOutOfRange = (e, n, t, o) =>
|
|
4776
|
+
const expectedInteger = (e, n) => `Non-integer ${e}: ${n}`, expectedPositive = (e, n) => `Non-positive ${e}: ${n}`, expectedFinite = (e, n) => `Non-finite ${e}: ${n}`, forbiddenBigIntToNumber = e => `Cannot convert bigint to ${e}`, invalidBigInt = e => `Invalid bigint: ${e}`, e = "Cannot convert Symbol to string", n = "Invalid object", numberOutOfRange = (e, n, t, o, r) => r ? numberOutOfRange(e, r[n], r[t], r[o]) : invalidEntity(e, n) + `; must be between ${t}-${o}`, invalidEntity = (e, n) => `Invalid ${e}: ${n}`, missingField = e => `Missing ${e}`, forbiddenField = e => `Invalid field ${e}`, duplicateFields = e => `Duplicate field ${e}`, noValidFields = e => "No valid fields: " + e.join(), t = "Invalid bag", invalidChoice = (e, n, t) => invalidEntity(e, n) + "; must be " + Object.keys(t).join(), o = "Cannot use valueOf", r = "Invalid calling context", i = "Forbidden era/eraYear", a = "Mismatching era/eraYear", s = "Mismatching year/eraYear", invalidEra = e => `Invalid era: ${e}`, missingYear = e => "Missing year" + (e ? "/era/eraYear" : ""), invalidMonthCode = e => `Invalid monthCode: ${e}`, c = "Mismatching month/monthCode", u = "Missing month/monthCode", l = "Cannot guess year", f = "Invalid leap month", d = "Invalid protocol", m = "Invalid protocol results", p = "Mismatching Calendars", invalidCalendar = e => `Invalid Calendar: ${e}`, h = "Mismatching TimeZones", T = "Forbidden ICU TimeZone", g = "Out-of-bounds offset", D$1 = "Out-of-bounds TimeZone gap", I = "Invalid TimeZone offset", M = "Ambiguous offset", N = "Out-of-bounds date", y = "Out-of-bounds duration", v = "Cannot mix duration signs", P = "Missing relativeTo", E = "Cannot use large units", S = "Required smallestUnit or largestUnit", F = "smallestUnit > largestUnit", failedParse = e => `Cannot parse: ${e}`, invalidSubstring = e => `Invalid substring: ${e}`, invalidFormatType = e => `Cannot format ${e}`, b = "Mismatching types for formatting", O = "Cannot specify TimeZone", w = /*@__PURE__*/ bindArgs(mapPropNames, ((e, n) => n)), B = /*@__PURE__*/ bindArgs(mapPropNames, ((e, n, t) => t)), k = /*@__PURE__*/ bindArgs(padNumber, 2), Y = {
|
|
4753
4777
|
nanosecond: 0,
|
|
4754
4778
|
microsecond: 1,
|
|
4755
4779
|
millisecond: 2,
|
|
@@ -4760,12 +4784,12 @@ const expectedInteger = (e, n) => `Non-integer ${e}: ${n}`, expectedPositive = (
|
|
|
4760
4784
|
week: 7,
|
|
4761
4785
|
month: 8,
|
|
4762
4786
|
year: 9
|
|
4763
|
-
},
|
|
4764
|
-
[
|
|
4787
|
+
}, C = /*@__PURE__*/ Object.keys(Y), R = 864e5, Z = 1e3, z = 1e3, q = 1e6, A = 1e9, L = 6e10, U = 36e11, W = 864e11, j = [ 1, z, q, A, L, U, W ], $ = /*@__PURE__*/ C.slice(0, 6), x = /*@__PURE__*/ sortStrings($), H = [ "offset" ], G = [ "timeZone" ], V = /*@__PURE__*/ $.concat(H), _ = /*@__PURE__*/ V.concat(G), J = [ "era", "eraYear" ], K = /*@__PURE__*/ J.concat([ "year" ]), Q = [ "year" ], X = [ "monthCode" ], ee = /*@__PURE__*/ [ "month" ].concat(X), ne = [ "day" ], te = /*@__PURE__*/ ee.concat(Q), oe = /*@__PURE__*/ X.concat(Q), re = /*@__PURE__*/ ne.concat(te), ie = /*@__PURE__*/ ne.concat(ee), ae = /*@__PURE__*/ ne.concat(X), se = /*@__PURE__*/ B($, 0), ce = "iso8601", ue = "gregory", le = "japanese", fe = {
|
|
4788
|
+
[ue]: {
|
|
4765
4789
|
bce: -1,
|
|
4766
4790
|
ce: 0
|
|
4767
4791
|
},
|
|
4768
|
-
[
|
|
4792
|
+
[le]: {
|
|
4769
4793
|
bce: -1,
|
|
4770
4794
|
ce: 0,
|
|
4771
4795
|
meiji: 1867,
|
|
@@ -4801,39 +4825,39 @@ const expectedInteger = (e, n) => `Non-integer ${e}: ${n}`, expectedPositive = (
|
|
|
4801
4825
|
persian: {
|
|
4802
4826
|
ap: 0
|
|
4803
4827
|
}
|
|
4804
|
-
},
|
|
4828
|
+
}, de = {
|
|
4805
4829
|
bc: "bce",
|
|
4806
4830
|
ad: "ce"
|
|
4807
|
-
},
|
|
4831
|
+
}, me = {
|
|
4808
4832
|
chinese: 13,
|
|
4809
4833
|
dangi: 13,
|
|
4810
4834
|
hebrew: -6
|
|
4811
|
-
},
|
|
4835
|
+
}, pe = /*@__PURE__*/ C.map((e => e + "s")), he = /*@__PURE__*/ sortStrings(pe), Te = /*@__PURE__*/ pe.slice(0, 6), ge = /*@__PURE__*/ pe.slice(6), De = /*@__PURE__*/ ge.slice(1), Ie = /*@__PURE__*/ w(pe), Me = /*@__PURE__*/ B(pe, 0), Ne = /*@__PURE__*/ B(Te, 0), ye = [ "isoNanosecond", "isoMicrosecond", "isoMillisecond", "isoSecond", "isoMinute", "isoHour" ], ve = [ "isoDay", "isoMonth", "isoYear" ], Pe = /*@__PURE__*/ ye.concat(ve), Ee = /*@__PURE__*/ sortStrings(ve), Se = /*@__PURE__*/ sortStrings(ye), Fe = /*@__PURE__*/ sortStrings(Pe), be = /*@__PURE__*/ B(Se, 0), Oe = Intl.DateTimeFormat, we = "en-GB", Be = 1e8, ke = Be * R, Ye = [ Be, 0 ], Ce = [ -Be, 0 ], Re = 275760, Ze = -271821, ze = 1970, qe = 1972, Ae = 12, Le = /*@__PURE__*/ isoArgsToEpochMilli(1868, 9, 8), Ue = /*@__PURE__*/ memoize(computeJapaneseEraParts, WeakMap), We = /*@__PURE__*/ bindArgs(requireType, "string"), je = /*@__PURE__*/ bindArgs(requireType, "boolean"), $e = /*@__PURE__*/ bindArgs(requireType, "number"), xe = /*@__PURE__*/ bindArgs(requireType, "function"), He = "smallestUnit", Ge = "unit", Ve = "roundingIncrement", _e = "fractionalSecondDigits", Je = "relativeTo", Ke = {
|
|
4812
4836
|
constrain: 0,
|
|
4813
4837
|
reject: 1
|
|
4814
|
-
},
|
|
4838
|
+
}, Qe = /*@__PURE__*/ Object.keys(Ke), Xe = {
|
|
4815
4839
|
compatible: 0,
|
|
4816
4840
|
reject: 1,
|
|
4817
4841
|
earlier: 2,
|
|
4818
4842
|
later: 3
|
|
4819
|
-
},
|
|
4843
|
+
}, en = {
|
|
4820
4844
|
reject: 0,
|
|
4821
4845
|
use: 1,
|
|
4822
4846
|
prefer: 2,
|
|
4823
4847
|
ignore: 3
|
|
4824
|
-
},
|
|
4848
|
+
}, nn = {
|
|
4825
4849
|
auto: 0,
|
|
4826
4850
|
never: 1,
|
|
4827
4851
|
critical: 2,
|
|
4828
4852
|
always: 3
|
|
4829
|
-
},
|
|
4853
|
+
}, tn = {
|
|
4830
4854
|
auto: 0,
|
|
4831
4855
|
never: 1,
|
|
4832
4856
|
critical: 2
|
|
4833
|
-
},
|
|
4857
|
+
}, on = {
|
|
4834
4858
|
auto: 0,
|
|
4835
4859
|
never: 1
|
|
4836
|
-
},
|
|
4860
|
+
}, rn = {
|
|
4837
4861
|
floor: 0,
|
|
4838
4862
|
halfFloor: 1,
|
|
4839
4863
|
ceil: 2,
|
|
@@ -4843,7 +4867,7 @@ const expectedInteger = (e, n) => `Non-integer ${e}: ${n}`, expectedPositive = (
|
|
|
4843
4867
|
expand: 6,
|
|
4844
4868
|
halfExpand: 7,
|
|
4845
4869
|
halfEven: 8
|
|
4846
|
-
},
|
|
4870
|
+
}, an = /*@__PURE__*/ bindArgs(refineUnitOption, He), sn = /*@__PURE__*/ bindArgs(refineUnitOption, "largestUnit"), cn = /*@__PURE__*/ bindArgs(refineUnitOption, Ge), un = /*@__PURE__*/ bindArgs(refineChoiceOption, "overflow", Ke), ln = /*@__PURE__*/ bindArgs(refineChoiceOption, "disambiguation", Xe), fn = /*@__PURE__*/ bindArgs(refineChoiceOption, "offset", en), dn = /*@__PURE__*/ bindArgs(refineChoiceOption, "calendarName", nn), mn = /*@__PURE__*/ bindArgs(refineChoiceOption, "timeZoneName", tn), pn = /*@__PURE__*/ bindArgs(refineChoiceOption, "offset", on), hn = /*@__PURE__*/ bindArgs(refineChoiceOption, "roundingMode", rn), Tn = "PlainYearMonth", gn = "PlainMonthDay", Dn = "PlainDate", In = "PlainDateTime", Mn = "PlainTime", Nn = "ZonedDateTime", yn = "Instant", vn = "Duration", Pn = [ Math.floor, e => hasHalf(e) ? Math.floor(e) : Math.round(e), Math.ceil, e => hasHalf(e) ? Math.ceil(e) : Math.round(e), Math.trunc, e => hasHalf(e) ? Math.trunc(e) || 0 : Math.round(e), e => e < 0 ? Math.floor(e) : Math.ceil(e), e => Math.sign(e) * Math.round(Math.abs(e)) || 0, e => hasHalf(e) ? (e = Math.trunc(e) || 0) + e % 2 : Math.round(e) ], En = "UTC", Sn = 5184e3, Fn = /*@__PURE__*/ isoArgsToEpochSec(1847), bn = /*@__PURE__*/ isoArgsToEpochSec(/*@__PURE__*/ (/*@__PURE__*/ new Date).getUTCFullYear() + 10), On = /0+$/, wn = /*@__PURE__*/ memoize(_zonedEpochSlotsToIso, WeakMap), Bn = 2 ** 32 - 1, kn = /*@__PURE__*/ memoize((e => {
|
|
4847
4871
|
const n = getTimeZoneEssence(e);
|
|
4848
4872
|
return "object" == typeof n ? new IntlTimeZone(n) : new FixedTimeZone(n || 0);
|
|
4849
4873
|
}));
|
|
@@ -4863,7 +4887,7 @@ class FixedTimeZone {
|
|
|
4863
4887
|
|
|
4864
4888
|
class IntlTimeZone {
|
|
4865
4889
|
constructor(e) {
|
|
4866
|
-
this.
|
|
4890
|
+
this.R = (e => {
|
|
4867
4891
|
function getOffsetSec(e) {
|
|
4868
4892
|
const i = clampNumber(e, o, r), [a, s] = computePeriod(i), c = n(a), u = n(s);
|
|
4869
4893
|
return c === u ? c : pinch(t(a, s), c, u, e);
|
|
@@ -4876,10 +4900,10 @@ class IntlTimeZone {
|
|
|
4876
4900
|
}
|
|
4877
4901
|
return i;
|
|
4878
4902
|
}
|
|
4879
|
-
const n =
|
|
4880
|
-
let o =
|
|
4903
|
+
const n = memoize(e), t = memoize(createSplitTuple);
|
|
4904
|
+
let o = Fn, r = bn;
|
|
4881
4905
|
return {
|
|
4882
|
-
|
|
4906
|
+
q(e) {
|
|
4883
4907
|
const n = getOffsetSec(e - 86400), t = getOffsetSec(e + 86400), o = e - n, r = e - t;
|
|
4884
4908
|
if (n === t) {
|
|
4885
4909
|
return [ o ];
|
|
@@ -4887,11 +4911,11 @@ class IntlTimeZone {
|
|
|
4887
4911
|
const i = getOffsetSec(o);
|
|
4888
4912
|
return i === getOffsetSec(r) ? [ e - i ] : n > t ? [ o, r ] : [];
|
|
4889
4913
|
},
|
|
4890
|
-
|
|
4914
|
+
L: getOffsetSec,
|
|
4891
4915
|
C(e, i) {
|
|
4892
4916
|
const a = clampNumber(e, o, r);
|
|
4893
4917
|
let [s, c] = computePeriod(a);
|
|
4894
|
-
const u =
|
|
4918
|
+
const u = Sn * i, l = i < 0 ? () => c > o || (o = a, 0) : () => s < r || (r = a,
|
|
4895
4919
|
0);
|
|
4896
4920
|
for (;l(); ) {
|
|
4897
4921
|
const o = n(s), r = n(c);
|
|
@@ -4908,27 +4932,27 @@ class IntlTimeZone {
|
|
|
4908
4932
|
}
|
|
4909
4933
|
};
|
|
4910
4934
|
})((e => n => {
|
|
4911
|
-
const t = hashIntlFormatParts(e, n *
|
|
4935
|
+
const t = hashIntlFormatParts(e, n * Z);
|
|
4912
4936
|
return isoArgsToEpochSec(parseIntlPartsYear(t), parseInt(t.month), parseInt(t.day), parseInt(t.hour), parseInt(t.minute), parseInt(t.second)) - n;
|
|
4913
4937
|
})(e));
|
|
4914
4938
|
}
|
|
4915
4939
|
getOffsetNanosecondsFor(e) {
|
|
4916
|
-
return this.
|
|
4940
|
+
return this.R.L(epochNanoToSec(e)) * A;
|
|
4917
4941
|
}
|
|
4918
4942
|
getPossibleInstantsFor(e) {
|
|
4919
|
-
const [n, t] = [ isoArgsToEpochSec((o = e).isoYear, o.isoMonth, o.isoDay, o.isoHour, o.isoMinute, o.isoSecond), o.isoMillisecond *
|
|
4943
|
+
const [n, t] = [ isoArgsToEpochSec((o = e).isoYear, o.isoMonth, o.isoDay, o.isoHour, o.isoMinute, o.isoSecond), o.isoMillisecond * q + o.isoMicrosecond * z + o.isoNanosecond ];
|
|
4920
4944
|
var o;
|
|
4921
|
-
return this.
|
|
4945
|
+
return this.R.q(n).map((e => checkEpochNanoInBounds(addBigNanoAndNumber(numberToBigNano(e, A), t))));
|
|
4922
4946
|
}
|
|
4923
4947
|
C(e, n) {
|
|
4924
|
-
const [t, o] = (e
|
|
4948
|
+
const [t, o] = epochNanoToSecMod(e), r = this.R.C(t + (n > 0 || o ? 1 : 0), n);
|
|
4925
4949
|
if (void 0 !== r) {
|
|
4926
|
-
return
|
|
4950
|
+
return numberToBigNano(r, A);
|
|
4927
4951
|
}
|
|
4928
4952
|
}
|
|
4929
4953
|
}
|
|
4930
4954
|
|
|
4931
|
-
const
|
|
4955
|
+
const Yn = "([+−-])", Cn = "(?:[.,](\\d{1,9}))?", Rn = `(?:(?:${Yn}(\\d{6}))|(\\d{4}))-?(\\d{2})`, Zn = "(\\d{2})(?::?(\\d{2})(?::?(\\d{2})" + Cn + ")?)?", zn = Yn + Zn, qn = Rn + "-?(\\d{2})(?:[T ]" + Zn + "(Z|" + zn + ")?)?", An = "\\[(!?)([^\\]]*)\\]", Ln = `((?:${An}){0,9})`, Un = /*@__PURE__*/ createRegExp(Rn + Ln), Wn = /*@__PURE__*/ createRegExp("(?:--)?(\\d{2})-?(\\d{2})" + Ln), jn = /*@__PURE__*/ createRegExp(qn + Ln), $n = /*@__PURE__*/ createRegExp("T?" + Zn + "(?:" + zn + ")?" + Ln), xn = /*@__PURE__*/ createRegExp(zn), Hn = /*@__PURE__*/ new RegExp(An, "g"), Gn = /*@__PURE__*/ createRegExp(`${Yn}?P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(?:T(?:(\\d+)${Cn}H)?(?:(\\d+)${Cn}M)?(?:(\\d+)${Cn}S)?)?`), Vn = /*@__PURE__*/ memoize((e => new Oe(we, {
|
|
4932
4956
|
timeZone: e,
|
|
4933
4957
|
era: "short",
|
|
4934
4958
|
year: "numeric",
|
|
@@ -4937,68 +4961,73 @@ const On = "([+−-])", Yn = "(?:[.,](\\d{1,9}))?", kn = `(?:(?:${On}(\\d{6}))|(
|
|
|
4937
4961
|
hour: "numeric",
|
|
4938
4962
|
minute: "numeric",
|
|
4939
4963
|
second: "numeric"
|
|
4940
|
-
}))),
|
|
4964
|
+
}))), _n = /^(AC|AE|AG|AR|AS|BE|BS|CA|CN|CS|CT|EA|EC|IE|IS|JS|MI|NE|NS|PL|PN|PR|PS|SS|VS)T$/, Jn = /*@__PURE__*/ memoize(createIntlCalendar), Kn = /*@__PURE__*/ memoize((e => new Oe(we, {
|
|
4941
4965
|
calendar: e,
|
|
4942
|
-
timeZone:
|
|
4966
|
+
timeZone: En,
|
|
4943
4967
|
era: "short",
|
|
4944
4968
|
year: "numeric",
|
|
4945
4969
|
month: "short",
|
|
4946
4970
|
day: "numeric"
|
|
4947
|
-
}))),
|
|
4971
|
+
}))), Qn = /^M(\d{2})(L?)$/, Xn = {
|
|
4972
|
+
era: toStringViaPrimitive,
|
|
4973
|
+
eraYear: toInteger,
|
|
4974
|
+
year: toInteger,
|
|
4975
|
+
month: toPositiveInteger,
|
|
4976
|
+
monthCode: toStringViaPrimitive,
|
|
4977
|
+
day: toPositiveInteger
|
|
4978
|
+
}, et = /*@__PURE__*/ B($, toInteger), nt = /*@__PURE__*/ B(pe, toStrictInteger), tt = /*@__PURE__*/ Object.assign({}, Xn, et, nt, {
|
|
4979
|
+
offset: toStringViaPrimitive
|
|
4980
|
+
}), ot = /*@__PURE__*/ bindArgs(remapProps, $, ye), rt = {
|
|
4948
4981
|
dateAdd(e, n, t) {
|
|
4949
4982
|
const o = refineOverflowOptions(t);
|
|
4950
4983
|
let r, {years: i, months: a, weeks: s, days: c} = n;
|
|
4951
|
-
if (c +=
|
|
4984
|
+
if (c += givenFieldsToBigNano(n, 5, pe)[0], i || a) {
|
|
4952
4985
|
let [n, t, s] = this.u(e);
|
|
4953
4986
|
if (i) {
|
|
4954
4987
|
const [e, r] = this.l(n, t);
|
|
4955
|
-
n += i, t = monthCodeNumberToMonth(e, r, this.
|
|
4988
|
+
n += i, t = monthCodeNumberToMonth(e, r, this.O(n)), t = clampEntity("month", t, 1, this.B(n), o);
|
|
4956
4989
|
}
|
|
4957
|
-
a && ([n, t] = this.
|
|
4958
|
-
r = this.
|
|
4990
|
+
a && ([n, t] = this.U(n, t, a)), s = clampEntity("day", s, 1, this.k(n, t), o),
|
|
4991
|
+
r = this.j(n, t, s);
|
|
4959
4992
|
} else {
|
|
4960
4993
|
if (!s && !c) {
|
|
4961
4994
|
return e;
|
|
4962
4995
|
}
|
|
4963
4996
|
r = isoToEpochMilli(e);
|
|
4964
4997
|
}
|
|
4965
|
-
return r += (
|
|
4998
|
+
return r += (7 * s + c) * R, checkIsoDateInBounds(epochMilliToIso(r));
|
|
4966
4999
|
},
|
|
4967
5000
|
dateUntil(e, n, t) {
|
|
4968
5001
|
if (t <= 7) {
|
|
4969
5002
|
let o = 0, r = diffDays(e, n);
|
|
4970
|
-
return 7 === t && ([o, r] = divModTrunc(r,
|
|
4971
|
-
...
|
|
5003
|
+
return 7 === t && ([o, r] = divModTrunc(r, 7)), {
|
|
5004
|
+
...Me,
|
|
4972
5005
|
weeks: o,
|
|
4973
5006
|
days: r
|
|
4974
5007
|
};
|
|
4975
5008
|
}
|
|
4976
5009
|
const o = this.u(e), r = this.u(n);
|
|
4977
5010
|
let [i, a, s] = ((e, n, t, o, r, i, a) => {
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
let s, c, u, l, f;
|
|
4986
|
-
updateYearMonthDay();
|
|
4987
|
-
const d = Math.sign(f), m = Math.sign(s) || Math.sign(u) || d;
|
|
4988
|
-
if (m) {
|
|
4989
|
-
if (d === -m) {
|
|
4990
|
-
const n = l;
|
|
4991
|
-
[r, i] = e.L(r, i, -m), updateYearMonthDay(), f += m < 0 ? -n : l;
|
|
5011
|
+
let s = r - n, c = i - t, u = a - o;
|
|
5012
|
+
if (s || c) {
|
|
5013
|
+
const l = Math.sign(s || c);
|
|
5014
|
+
let f = e.k(r, i), d = 0;
|
|
5015
|
+
if (Math.sign(u) === -l) {
|
|
5016
|
+
const o = f;
|
|
5017
|
+
[r, i] = e.U(r, i, -l), s = r - n, c = i - t, f = e.k(r, i), d = l < 0 ? -o : f;
|
|
4992
5018
|
}
|
|
4993
|
-
if (Math.
|
|
4994
|
-
const e =
|
|
4995
|
-
|
|
5019
|
+
if (u = a - Math.min(o, f) + d, s) {
|
|
5020
|
+
const [o, a] = e.l(n, t), [u, f] = e.l(r, i);
|
|
5021
|
+
if (c = u - o || Number(f) - Number(a), Math.sign(c) === -l) {
|
|
5022
|
+
const t = l < 0 && -e.B(r);
|
|
5023
|
+
s = (r -= l) - n, c = i - monthCodeNumberToMonth(o, a, e.O(r)) + (t || e.B(r));
|
|
5024
|
+
}
|
|
4996
5025
|
}
|
|
4997
5026
|
}
|
|
4998
|
-
return [ s,
|
|
5027
|
+
return [ s, c, u ];
|
|
4999
5028
|
})(this, ...o, ...r);
|
|
5000
|
-
return 8 === t && (a += this
|
|
5001
|
-
...
|
|
5029
|
+
return 8 === t && (a += this.$(i, o[0]), i = 0), {
|
|
5030
|
+
...Me,
|
|
5002
5031
|
years: i,
|
|
5003
5032
|
months: a,
|
|
5004
5033
|
days: s
|
|
@@ -5006,53 +5035,53 @@ const On = "([+−-])", Yn = "(?:[.,](\\d{1,9}))?", kn = `(?:(?:${On}(\\d{6}))|(
|
|
|
5006
5035
|
},
|
|
5007
5036
|
dateFromFields(e, n) {
|
|
5008
5037
|
const t = refineOverflowOptions(n), o = refineYear(this, e), r = refineMonth(this, e, o, t), i = refineDay(this, e, r, o, t);
|
|
5009
|
-
return createPlainDateSlots(checkIsoDateInBounds(this.p(o, r, i)), this.id ||
|
|
5038
|
+
return createPlainDateSlots(checkIsoDateInBounds(this.p(o, r, i)), this.id || ce);
|
|
5010
5039
|
},
|
|
5011
5040
|
yearMonthFromFields(e, n) {
|
|
5012
5041
|
const t = refineOverflowOptions(n), o = refineYear(this, e), r = refineMonth(this, e, o, t);
|
|
5013
|
-
return createPlainYearMonthSlots(checkIsoYearMonthInBounds(this.p(o, r, 1)), this.id ||
|
|
5042
|
+
return createPlainYearMonthSlots(checkIsoYearMonthInBounds(this.p(o, r, 1)), this.id || ce);
|
|
5014
5043
|
},
|
|
5015
5044
|
monthDayFromFields(e, n) {
|
|
5016
5045
|
const t = refineOverflowOptions(n), o = !this.id, {monthCode: r, year: i, month: a} = e;
|
|
5017
|
-
let s,
|
|
5046
|
+
let s, u, f, d, m;
|
|
5018
5047
|
if (void 0 !== r) {
|
|
5019
|
-
[s,
|
|
5020
|
-
const n = this.m(s,
|
|
5048
|
+
[s, u] = parseMonthCode(r), m = getDefinedProp(e, "day");
|
|
5049
|
+
const n = this.m(s, u, m);
|
|
5021
5050
|
if (!n) {
|
|
5022
|
-
throw new RangeError(
|
|
5051
|
+
throw new RangeError(l);
|
|
5023
5052
|
}
|
|
5024
|
-
if ([
|
|
5025
|
-
throw new RangeError(
|
|
5053
|
+
if ([f, d] = n, void 0 !== a && a !== d) {
|
|
5054
|
+
throw new RangeError(c);
|
|
5026
5055
|
}
|
|
5027
|
-
o && (d = clampEntity("month", d, 1,
|
|
5056
|
+
o && (d = clampEntity("month", d, 1, Ae, 1), m = clampEntity("day", m, 1, computeIsoDaysInMonth(void 0 !== i ? i : f, d), t));
|
|
5028
5057
|
} else {
|
|
5029
|
-
|
|
5030
|
-
m = refineDay(this, e, d,
|
|
5031
|
-
const n = this.
|
|
5032
|
-
|
|
5033
|
-
const r = this.m(s,
|
|
5058
|
+
f = void 0 === i && o ? qe : refineYear(this, e), d = refineMonth(this, e, f, t),
|
|
5059
|
+
m = refineDay(this, e, d, f, t);
|
|
5060
|
+
const n = this.O(f);
|
|
5061
|
+
u = d === n, s = monthToMonthCodeNumber(d, n);
|
|
5062
|
+
const r = this.m(s, u, m);
|
|
5034
5063
|
if (!r) {
|
|
5035
|
-
throw new RangeError(
|
|
5064
|
+
throw new RangeError(l);
|
|
5036
5065
|
}
|
|
5037
|
-
[
|
|
5066
|
+
[f, d] = r;
|
|
5038
5067
|
}
|
|
5039
|
-
return createPlainMonthDaySlots(this.p(
|
|
5068
|
+
return createPlainMonthDaySlots(this.p(f, d, m), this.id || ce);
|
|
5040
5069
|
},
|
|
5041
5070
|
fields(e) {
|
|
5042
|
-
return getCalendarEraOrigins(this) && e.includes("year") ? [ ...e, ...
|
|
5071
|
+
return getCalendarEraOrigins(this) && e.includes("year") ? [ ...e, ...J ] : e;
|
|
5043
5072
|
},
|
|
5044
5073
|
mergeFields(e, n) {
|
|
5045
5074
|
const t = Object.assign(Object.create(null), e);
|
|
5046
|
-
return spliceFields(t, n,
|
|
5047
|
-
this.id ===
|
|
5075
|
+
return spliceFields(t, n, ee), getCalendarEraOrigins(this) && (spliceFields(t, n, K),
|
|
5076
|
+
this.id === le && spliceFields(t, n, ie, J)), t;
|
|
5048
5077
|
},
|
|
5049
5078
|
inLeapYear(e) {
|
|
5050
5079
|
const [n] = this.u(e);
|
|
5051
|
-
return this
|
|
5080
|
+
return this.G(n);
|
|
5052
5081
|
},
|
|
5053
5082
|
monthsInYear(e) {
|
|
5054
5083
|
const [n] = this.u(e);
|
|
5055
|
-
return this.
|
|
5084
|
+
return this.B(n);
|
|
5056
5085
|
},
|
|
5057
5086
|
daysInMonth(e) {
|
|
5058
5087
|
const [n, t] = this.u(e);
|
|
@@ -5060,63 +5089,70 @@ const On = "([+−-])", Yn = "(?:[.,](\\d{1,9}))?", kn = `(?:(?:${On}(\\d{6}))|(
|
|
|
5060
5089
|
},
|
|
5061
5090
|
daysInYear(e) {
|
|
5062
5091
|
const [n] = this.u(e);
|
|
5063
|
-
return this.
|
|
5092
|
+
return this.V(n);
|
|
5064
5093
|
},
|
|
5065
5094
|
era(e) {
|
|
5066
|
-
return this.
|
|
5095
|
+
return this._(e)[0];
|
|
5067
5096
|
},
|
|
5068
5097
|
eraYear(e) {
|
|
5069
|
-
return this.
|
|
5098
|
+
return this._(e)[1];
|
|
5070
5099
|
},
|
|
5071
5100
|
monthCode(e) {
|
|
5072
5101
|
const [n, t] = this.u(e), [o, r] = this.l(n, t);
|
|
5073
|
-
return ((e, n) => "M" +
|
|
5102
|
+
return ((e, n) => "M" + k(e) + (n ? "L" : ""))(o, r);
|
|
5074
5103
|
},
|
|
5075
5104
|
dayOfWeek: computeIsoDayOfWeek,
|
|
5076
|
-
weekOfYear(e) {
|
|
5077
|
-
return computeIsoWeekParts(e)[1];
|
|
5078
|
-
},
|
|
5079
|
-
yearOfWeek(e) {
|
|
5080
|
-
return computeIsoWeekParts(e)[0];
|
|
5081
|
-
},
|
|
5082
5105
|
daysInWeek() {
|
|
5083
|
-
return
|
|
5106
|
+
return 7;
|
|
5084
5107
|
}
|
|
5085
|
-
},
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5108
|
+
}, it = {
|
|
5109
|
+
weekOfYear: computeNativeWeekOfYear,
|
|
5110
|
+
yearOfWeek: computeNativeYearOfWeek,
|
|
5111
|
+
F(e) {
|
|
5112
|
+
function computeWeekShift(e) {
|
|
5113
|
+
return (7 - e < n ? 7 : 0) - e;
|
|
5114
|
+
}
|
|
5115
|
+
function computeWeeksInYear(e) {
|
|
5116
|
+
const n = computeIsoDaysInYear(u + e), t = e || 1;
|
|
5117
|
+
return (n + (computeWeekShift(modFloor(a + n * t, 7)) - s) * t) / 7;
|
|
5118
|
+
}
|
|
5119
|
+
const n = this.id ? 1 : 4, t = computeIsoDayOfWeek(e), o = computeIsoDayOfYear(e), r = modFloor(t - 1, 7), i = o - 1, a = modFloor(r - i, 7), s = computeWeekShift(a);
|
|
5120
|
+
let c = Math.floor((i - s) / 7) + 1, u = e.isoYear;
|
|
5121
|
+
return c ? c > computeWeeksInYear(0) && (c = 1, u++) : (c = computeWeeksInYear(-1),
|
|
5122
|
+
u--), [ c, u ];
|
|
5123
|
+
}
|
|
5124
|
+
}, at = {
|
|
5125
|
+
weekOfYear: computeNativeWeekOfYear,
|
|
5126
|
+
yearOfWeek: computeNativeYearOfWeek,
|
|
5127
|
+
F() {
|
|
5128
|
+
return [];
|
|
5129
|
+
}
|
|
5130
|
+
}, st = /*@__PURE__*/ createNativeOpsCreator(/*@__PURE__*/ Object.assign({}, rt, it, {
|
|
5095
5131
|
u: e => [ e.isoYear, e.isoMonth, e.isoDay ],
|
|
5096
|
-
|
|
5097
|
-
return this.id ===
|
|
5132
|
+
_(e) {
|
|
5133
|
+
return this.id === ue ? computeGregoryEraParts(e) : this.id === le ? Ue(e) : [];
|
|
5098
5134
|
},
|
|
5099
5135
|
l: (e, n) => [ n, 0 ],
|
|
5100
5136
|
m(e, n) {
|
|
5101
5137
|
if (!n) {
|
|
5102
|
-
return [
|
|
5138
|
+
return [ qe, e ];
|
|
5103
5139
|
}
|
|
5104
5140
|
},
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5141
|
+
G: computeIsoInLeapYear,
|
|
5142
|
+
O() {},
|
|
5143
|
+
B: computeIsoMonthsInYear,
|
|
5144
|
+
$: e => e * Ae,
|
|
5109
5145
|
k: computeIsoDaysInMonth,
|
|
5110
|
-
|
|
5146
|
+
V: computeIsoDaysInYear,
|
|
5111
5147
|
dayOfYear: computeIsoDayOfYear,
|
|
5112
5148
|
p: (e, n, t) => ({
|
|
5113
5149
|
isoYear: e,
|
|
5114
5150
|
isoMonth: n,
|
|
5115
5151
|
isoDay: t
|
|
5116
5152
|
}),
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
n -=
|
|
5153
|
+
j: isoArgsToEpochMilli,
|
|
5154
|
+
U: (e, n, t) => (e += divTrunc(t, Ae), (n += modTrunc(t, Ae)) < 1 ? (e--, n += Ae) : n > Ae && (e++,
|
|
5155
|
+
n -= Ae), [ e, n ]),
|
|
5120
5156
|
year(e) {
|
|
5121
5157
|
return e.isoYear;
|
|
5122
5158
|
},
|
|
@@ -5124,9 +5160,9 @@ const On = "([+−-])", Yn = "(?:[.,](\\d{1,9}))?", kn = `(?:(?:${On}(\\d{6}))|(
|
|
|
5124
5160
|
return e.isoMonth;
|
|
5125
5161
|
},
|
|
5126
5162
|
day: e => e.isoDay
|
|
5127
|
-
}), /*@__PURE__*/ Object.assign({},
|
|
5163
|
+
}), /*@__PURE__*/ Object.assign({}, rt, at, {
|
|
5128
5164
|
u: computeIntlDateParts,
|
|
5129
|
-
|
|
5165
|
+
_(e) {
|
|
5130
5166
|
const n = this.I(e);
|
|
5131
5167
|
return [ n.era, n.eraYear ];
|
|
5132
5168
|
},
|
|
@@ -5136,8 +5172,8 @@ const On = "([+−-])", Yn = "(?:[.,](\\d{1,9}))?", kn = `(?:(?:${On}(\\d{6}))|(
|
|
|
5136
5172
|
},
|
|
5137
5173
|
m(e, n, t) {
|
|
5138
5174
|
let [o, r, i] = computeIntlDateParts.call(this, {
|
|
5139
|
-
isoYear:
|
|
5140
|
-
isoMonth:
|
|
5175
|
+
isoYear: qe,
|
|
5176
|
+
isoMonth: Ae,
|
|
5141
5177
|
isoDay: 31
|
|
5142
5178
|
});
|
|
5143
5179
|
const a = computeIntlLeapMonth.call(this, o), s = r === a;
|
|
@@ -5149,13 +5185,13 @@ const On = "([+−-])", Yn = "(?:[.,](\\d{1,9}))?", kn = `(?:(?:${On}(\\d{6}))|(
|
|
|
5149
5185
|
}
|
|
5150
5186
|
}
|
|
5151
5187
|
},
|
|
5152
|
-
|
|
5188
|
+
G(e) {
|
|
5153
5189
|
const n = computeIntlDaysInYear.call(this, e);
|
|
5154
5190
|
return n > computeIntlDaysInYear.call(this, e - 1) && n > computeIntlDaysInYear.call(this, e + 1);
|
|
5155
5191
|
},
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5192
|
+
O: computeIntlLeapMonth,
|
|
5193
|
+
B: computeIntlMonthsInYear,
|
|
5194
|
+
$(e, n) {
|
|
5159
5195
|
const t = n + e, o = Math.sign(e), r = o < 0 ? -1 : 0;
|
|
5160
5196
|
let i = 0;
|
|
5161
5197
|
for (let e = n; e !== t; e += o) {
|
|
@@ -5164,33 +5200,30 @@ const On = "([+−-])", Yn = "(?:[.,](\\d{1,9}))?", kn = `(?:(?:${On}(\\d{6}))|(
|
|
|
5164
5200
|
return i;
|
|
5165
5201
|
},
|
|
5166
5202
|
k: computeIntlDaysInMonth,
|
|
5167
|
-
|
|
5203
|
+
V: computeIntlDaysInYear,
|
|
5168
5204
|
dayOfYear(e) {
|
|
5169
5205
|
const n = isoToEpochMilli({
|
|
5170
5206
|
...e,
|
|
5171
|
-
...
|
|
5207
|
+
...be
|
|
5172
5208
|
}), {year: t} = this.I(e);
|
|
5173
|
-
return diffEpochMilliByDay(computeIntlEpochMilli.call(this, t), n);
|
|
5209
|
+
return diffEpochMilliByDay(computeIntlEpochMilli.call(this, t), n) + 1;
|
|
5174
5210
|
},
|
|
5175
5211
|
p(e, n, t) {
|
|
5176
5212
|
return checkIsoDateInBounds({
|
|
5177
5213
|
...epochMilliToIso(computeIntlEpochMilli.call(this, e, n, t))
|
|
5178
5214
|
});
|
|
5179
5215
|
},
|
|
5180
|
-
|
|
5181
|
-
|
|
5216
|
+
j: computeIntlEpochMilli,
|
|
5217
|
+
U(e, n, t) {
|
|
5182
5218
|
if (t) {
|
|
5183
|
-
if (n += t,
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5219
|
+
if (n += t, !Number.isSafeInteger(n)) {
|
|
5220
|
+
throw new RangeError(N);
|
|
5221
|
+
}
|
|
5222
|
+
if (t < 0) {
|
|
5187
5223
|
for (;n < 1; ) {
|
|
5188
5224
|
n += computeIntlMonthsInYear.call(this, --e);
|
|
5189
5225
|
}
|
|
5190
5226
|
} else {
|
|
5191
|
-
if (n > Number.MAX_SAFE_INTEGER) {
|
|
5192
|
-
throw new RangeError(y);
|
|
5193
|
-
}
|
|
5194
5227
|
let t;
|
|
5195
5228
|
for (;n > (t = computeIntlMonthsInYear.call(this, e)); ) {
|
|
5196
5229
|
n -= t, e++;
|
|
@@ -5203,47 +5236,47 @@ const On = "([+−-])", Yn = "(?:[.,](\\d{1,9}))?", kn = `(?:(?:${On}(\\d{6}))|(
|
|
|
5203
5236
|
return this.I(e).year;
|
|
5204
5237
|
},
|
|
5205
5238
|
month(e) {
|
|
5206
|
-
const {year: n, month: t} = this.I(e), {
|
|
5239
|
+
const {year: n, month: t} = this.I(e), {P: o} = this.N(n);
|
|
5207
5240
|
return o[t] + 1;
|
|
5208
5241
|
},
|
|
5209
5242
|
day(e) {
|
|
5210
5243
|
return this.I(e).day;
|
|
5211
5244
|
}
|
|
5212
|
-
})),
|
|
5213
|
-
month:
|
|
5214
|
-
day:
|
|
5215
|
-
},
|
|
5216
|
-
year:
|
|
5217
|
-
month:
|
|
5218
|
-
},
|
|
5219
|
-
day:
|
|
5220
|
-
}),
|
|
5221
|
-
hour:
|
|
5222
|
-
minute:
|
|
5223
|
-
second:
|
|
5224
|
-
},
|
|
5245
|
+
})), ct = "numeric", ut = [ "timeZoneName" ], lt = {
|
|
5246
|
+
month: ct,
|
|
5247
|
+
day: ct
|
|
5248
|
+
}, ft = {
|
|
5249
|
+
year: ct,
|
|
5250
|
+
month: ct
|
|
5251
|
+
}, dt = /*@__PURE__*/ Object.assign({}, ft, {
|
|
5252
|
+
day: ct
|
|
5253
|
+
}), mt = {
|
|
5254
|
+
hour: ct,
|
|
5255
|
+
minute: ct,
|
|
5256
|
+
second: ct
|
|
5257
|
+
}, pt = /*@__PURE__*/ Object.assign({}, dt, mt), ht = /*@__PURE__*/ Object.assign({}, pt, {
|
|
5225
5258
|
timeZoneName: "short"
|
|
5226
|
-
}),
|
|
5227
|
-
isoYear:
|
|
5259
|
+
}), Tt = /*@__PURE__*/ Object.keys(lt), gt = /*@__PURE__*/ Object.keys(ft), Dt = /*@__PURE__*/ Object.keys(dt), It = /*@__PURE__*/ Object.keys(mt), Mt = /*@__PURE__*/ Dt.concat([ "weekday", "dateStyle" ]), Nt = /*@__PURE__*/ It.concat([ "dayPeriod", "timeStyle" ]), yt = /*@__PURE__*/ Mt.concat(Nt), vt = /*@__PURE__*/ yt.concat(ut), Pt = /*@__PURE__*/ ut.concat(Nt), Et = /*@__PURE__*/ ut.concat(Mt), St = /*@__PURE__*/ ut.concat([ "day", "weekday", "dateStyle" ], Nt), Ft = /*@__PURE__*/ createOptionsTransformer(Tt, lt, /*@__PURE__*/ ut.concat([ "year", "weekday", "dateStyle" ], Nt)), bt = [ /*@__PURE__*/ createOptionsTransformer(gt, ft, St), isoDateFieldsToEpochNano, 1 ], Ot = [ Ft, isoDateFieldsToEpochNano, 1 ], wt = [ /*@__PURE__*/ createOptionsTransformer(Mt, dt, Pt), isoDateFieldsToEpochNano ], Bt = [ /*@__PURE__*/ createOptionsTransformer(yt, pt, ut), isoDateFieldsToEpochNano ], kt = [ /*@__PURE__*/ createOptionsTransformer(Nt, mt, Et), (e, n) => getSingleInstantFor(kn(n.timeZone), {
|
|
5260
|
+
isoYear: ze,
|
|
5228
5261
|
isoMonth: 1,
|
|
5229
5262
|
isoDay: 1,
|
|
5230
5263
|
...e
|
|
5231
|
-
}) ],
|
|
5264
|
+
}) ], Yt = [ /*@__PURE__*/ createOptionsTransformer(yt, pt), extractEpochNano ], Ct = [ /*@__PURE__*/ createOptionsTransformer(vt, ht), extractEpochNano, 0, (e, n) => {
|
|
5232
5265
|
const t = getId(e.timeZone);
|
|
5233
5266
|
if (n && getId(n.timeZone) !== t) {
|
|
5234
|
-
throw new RangeError(
|
|
5267
|
+
throw new RangeError(h);
|
|
5235
5268
|
}
|
|
5236
5269
|
return t;
|
|
5237
|
-
} ],
|
|
5270
|
+
} ], Rt = {};
|
|
5238
5271
|
|
|
5239
|
-
let
|
|
5272
|
+
let Zt;
|
|
5240
5273
|
|
|
5241
|
-
function createSlotClass(e, t, n, o,
|
|
5274
|
+
function createSlotClass(e, t, n, o, a) {
|
|
5242
5275
|
function Class(...e) {
|
|
5243
5276
|
if (!(this instanceof Class)) {
|
|
5244
|
-
throw new TypeError(
|
|
5277
|
+
throw new TypeError(r);
|
|
5245
5278
|
}
|
|
5246
|
-
|
|
5279
|
+
za(this, t(...e));
|
|
5247
5280
|
}
|
|
5248
5281
|
function bindMethod(e, t) {
|
|
5249
5282
|
return Object.defineProperties((function(...t) {
|
|
@@ -5251,9 +5284,9 @@ function createSlotClass(e, t, n, o, r) {
|
|
|
5251
5284
|
}), createNameDescriptors(t));
|
|
5252
5285
|
}
|
|
5253
5286
|
function getSpecificSlots(t) {
|
|
5254
|
-
const n =
|
|
5287
|
+
const n = Ua(t);
|
|
5255
5288
|
if (!n || n.branding !== e) {
|
|
5256
|
-
throw new TypeError(
|
|
5289
|
+
throw new TypeError(r);
|
|
5257
5290
|
}
|
|
5258
5291
|
return n;
|
|
5259
5292
|
}
|
|
@@ -5262,42 +5295,42 @@ function createSlotClass(e, t, n, o, r) {
|
|
|
5262
5295
|
...createPropDescriptors(mapProps(bindMethod, o)),
|
|
5263
5296
|
...createStringTagDescriptors("Temporal." + e)
|
|
5264
5297
|
}), Object.defineProperties(Class, {
|
|
5265
|
-
...createPropDescriptors(
|
|
5298
|
+
...createPropDescriptors(a),
|
|
5266
5299
|
...createNameDescriptors(e)
|
|
5267
5300
|
}), [ Class, e => {
|
|
5268
5301
|
const t = Object.create(Class.prototype);
|
|
5269
|
-
return
|
|
5302
|
+
return za(t, e), t;
|
|
5270
5303
|
}, getSpecificSlots ];
|
|
5271
5304
|
}
|
|
5272
5305
|
|
|
5273
5306
|
function createProtocolValidator(e) {
|
|
5274
5307
|
return e = e.concat("id").sort(), t => {
|
|
5275
5308
|
if (!hasAllPropsByName(t, e)) {
|
|
5276
|
-
throw new TypeError(
|
|
5309
|
+
throw new TypeError(d);
|
|
5277
5310
|
}
|
|
5278
5311
|
return t;
|
|
5279
5312
|
};
|
|
5280
5313
|
}
|
|
5281
5314
|
|
|
5282
5315
|
function rejectInvalidBag(e) {
|
|
5283
|
-
if (
|
|
5284
|
-
throw new TypeError(
|
|
5316
|
+
if (Ua(e) || void 0 !== e.calendar || void 0 !== e.timeZone) {
|
|
5317
|
+
throw new TypeError(t);
|
|
5285
5318
|
}
|
|
5286
5319
|
return e;
|
|
5287
5320
|
}
|
|
5288
5321
|
|
|
5289
5322
|
function createDateTimeFormatClass() {
|
|
5290
|
-
const e =
|
|
5323
|
+
const e = Oe.prototype, t = Object.getOwnPropertyDescriptors(e), n = Object.getOwnPropertyDescriptors(Oe), DateTimeFormat = function(e, t = {}) {
|
|
5291
5324
|
if (!(this instanceof DateTimeFormat)) {
|
|
5292
5325
|
return new DateTimeFormat(e, t);
|
|
5293
5326
|
}
|
|
5294
|
-
|
|
5295
|
-
const n = new
|
|
5327
|
+
Ha.set(this, ((e, t = {}) => {
|
|
5328
|
+
const n = new Oe(e, t), o = n.resolvedOptions(), r = o.locale, a = pluckProps(Object.keys(t), o), i = memoize(createFormatPrepperForBranding), prepFormat = (...e) => {
|
|
5296
5329
|
let t;
|
|
5297
5330
|
const o = e.map(((e, n) => {
|
|
5298
|
-
const o =
|
|
5331
|
+
const o = Ua(e), r = (o || {}).branding;
|
|
5299
5332
|
if (n && t && t !== r) {
|
|
5300
|
-
throw new TypeError(
|
|
5333
|
+
throw new TypeError(b);
|
|
5301
5334
|
}
|
|
5302
5335
|
return t = r, o;
|
|
5303
5336
|
}));
|
|
@@ -5318,30 +5351,30 @@ function createDateTimeFormatClass() {
|
|
|
5318
5351
|
|
|
5319
5352
|
function createFormatMethod(e) {
|
|
5320
5353
|
return function(...t) {
|
|
5321
|
-
const n =
|
|
5354
|
+
const n = Ha.get(this), [o, ...r] = n(...t);
|
|
5322
5355
|
return o[e](...r);
|
|
5323
5356
|
};
|
|
5324
5357
|
}
|
|
5325
5358
|
|
|
5326
5359
|
function createProxiedMethod(e) {
|
|
5327
5360
|
return function(...t) {
|
|
5328
|
-
return
|
|
5361
|
+
return Ha.get(this).J[e](...t);
|
|
5329
5362
|
};
|
|
5330
5363
|
}
|
|
5331
5364
|
|
|
5332
5365
|
function createFormatPrepperForBranding(e) {
|
|
5333
|
-
const t =
|
|
5366
|
+
const t = Ka[e];
|
|
5334
5367
|
if (!t) {
|
|
5335
5368
|
throw new TypeError(invalidFormatType(e));
|
|
5336
5369
|
}
|
|
5337
|
-
return createFormatPrepper(t,
|
|
5370
|
+
return createFormatPrepper(t, memoize(createFormatForPrep));
|
|
5338
5371
|
}
|
|
5339
5372
|
|
|
5340
5373
|
function createCalendarFieldMethods(e, t) {
|
|
5341
5374
|
const n = {};
|
|
5342
5375
|
for (const o in e) {
|
|
5343
5376
|
n[o] = ({K: e}, n) => {
|
|
5344
|
-
const r =
|
|
5377
|
+
const r = Ua(n) || {}, {branding: a} = r, i = a === Dn || t.includes(a) ? r : toPlainDateSlots(n);
|
|
5345
5378
|
return e[o](i);
|
|
5346
5379
|
};
|
|
5347
5380
|
}
|
|
@@ -5353,7 +5386,7 @@ function createCalendarGetters(e) {
|
|
|
5353
5386
|
for (const n in e) {
|
|
5354
5387
|
t[n] = e => {
|
|
5355
5388
|
const {calendar: t} = e;
|
|
5356
|
-
return (o = t, "string" == typeof o ?
|
|
5389
|
+
return (o = t, "string" == typeof o ? st(o) : (r = o, Object.assign(Object.create(mi), {
|
|
5357
5390
|
X: r
|
|
5358
5391
|
})))[n](e);
|
|
5359
5392
|
var o, r;
|
|
@@ -5363,85 +5396,56 @@ function createCalendarGetters(e) {
|
|
|
5363
5396
|
}
|
|
5364
5397
|
|
|
5365
5398
|
function neverValueOf() {
|
|
5366
|
-
throw new TypeError(
|
|
5399
|
+
throw new TypeError(o);
|
|
5367
5400
|
}
|
|
5368
5401
|
|
|
5369
5402
|
function createCalendarFromSlots({calendar: e}) {
|
|
5370
|
-
return "string" == typeof e ? new
|
|
5403
|
+
return "string" == typeof e ? new ds(e) : e;
|
|
5371
5404
|
}
|
|
5372
5405
|
|
|
5373
5406
|
function toPlainMonthDaySlots(e, t) {
|
|
5374
5407
|
if (t = copyOptions(t), isObjectLike(e)) {
|
|
5375
|
-
const n =
|
|
5376
|
-
if (n && n.branding ===
|
|
5408
|
+
const n = Ua(e);
|
|
5409
|
+
if (n && n.branding === gn) {
|
|
5377
5410
|
return refineOverflowOptions(t), n;
|
|
5378
5411
|
}
|
|
5379
5412
|
const o = extractCalendarSlotFromBag(e);
|
|
5380
|
-
return refinePlainMonthDayBag(
|
|
5413
|
+
return refinePlainMonthDayBag(_i(o || ce), !o, e, t);
|
|
5381
5414
|
}
|
|
5382
|
-
const n = parsePlainMonthDay(
|
|
5415
|
+
const n = parsePlainMonthDay(st, e);
|
|
5383
5416
|
return refineOverflowOptions(t), n;
|
|
5384
5417
|
}
|
|
5385
5418
|
|
|
5386
5419
|
function getOffsetNanosecondsForAdapter(e, t, n) {
|
|
5387
|
-
return o = t.call(e,
|
|
5420
|
+
return o = t.call(e, bi(createInstantSlots(n))), validateTimeZoneOffset(requireInteger(o));
|
|
5388
5421
|
var o;
|
|
5389
5422
|
}
|
|
5390
5423
|
|
|
5391
|
-
function createAdapterOps(e, t =
|
|
5424
|
+
function createAdapterOps(e, t = Ci) {
|
|
5392
5425
|
const n = Object.keys(t).sort(), o = {};
|
|
5393
5426
|
for (const r of n) {
|
|
5394
|
-
o[r] = bindArgs(t[r], e,
|
|
5427
|
+
o[r] = bindArgs(t[r], e, xe(e[r]));
|
|
5395
5428
|
}
|
|
5396
5429
|
return o;
|
|
5397
5430
|
}
|
|
5398
5431
|
|
|
5399
5432
|
function createTimeZoneOps(e, t) {
|
|
5400
|
-
return "string" == typeof e ?
|
|
5433
|
+
return "string" == typeof e ? kn(e) : createAdapterOps(e, t);
|
|
5401
5434
|
}
|
|
5402
5435
|
|
|
5403
5436
|
function createTimeZoneOffsetOps(e) {
|
|
5404
|
-
return createTimeZoneOps(e,
|
|
5405
|
-
}
|
|
5406
|
-
|
|
5407
|
-
function toPlainYearMonthSlots(e, t) {
|
|
5408
|
-
if (t = copyOptions(t), isObjectLike(e)) {
|
|
5409
|
-
const n = Aa(e);
|
|
5410
|
-
return n && n.branding === mn ? (refineOverflowOptions(t), n) : refinePlainYearMonthBag(xi(getCalendarSlotFromBag(e)), e, t);
|
|
5411
|
-
}
|
|
5412
|
-
const n = parsePlainYearMonth(nt, e);
|
|
5413
|
-
return refineOverflowOptions(t), n;
|
|
5414
|
-
}
|
|
5415
|
-
|
|
5416
|
-
function toZonedDateTimeSlots(e, t) {
|
|
5417
|
-
if (t = copyOptions(t), isObjectLike(e)) {
|
|
5418
|
-
const n = Aa(e);
|
|
5419
|
-
if (n && n.branding === In) {
|
|
5420
|
-
return refineZonedFieldOptions(t), n;
|
|
5421
|
-
}
|
|
5422
|
-
const o = getCalendarSlotFromBag(e);
|
|
5423
|
-
return refineZonedDateTimeBag(refineTimeZoneSlot, createTimeZoneOps, Ri(o), o, e, t);
|
|
5424
|
-
}
|
|
5425
|
-
return parseZonedDateTime(e, t);
|
|
5426
|
-
}
|
|
5427
|
-
|
|
5428
|
-
function slotsToIso(e) {
|
|
5429
|
-
return bn(e, createTimeZoneOffsetOps);
|
|
5430
|
-
}
|
|
5431
|
-
|
|
5432
|
-
function adaptDateMethods(e) {
|
|
5433
|
-
return mapProps((e => t => e(slotsToIso(t))), e);
|
|
5437
|
+
return createTimeZoneOps(e, gi);
|
|
5434
5438
|
}
|
|
5435
5439
|
|
|
5436
5440
|
function toInstantSlots(e) {
|
|
5437
5441
|
if (isObjectLike(e)) {
|
|
5438
|
-
const t =
|
|
5442
|
+
const t = Ua(e);
|
|
5439
5443
|
if (t) {
|
|
5440
5444
|
switch (t.branding) {
|
|
5441
|
-
case
|
|
5445
|
+
case yn:
|
|
5442
5446
|
return t;
|
|
5443
5447
|
|
|
5444
|
-
case
|
|
5448
|
+
case Nn:
|
|
5445
5449
|
return createInstantSlots(t.epochNanoseconds);
|
|
5446
5450
|
}
|
|
5447
5451
|
}
|
|
@@ -5449,30 +5453,30 @@ function toInstantSlots(e) {
|
|
|
5449
5453
|
return parseInstant(e);
|
|
5450
5454
|
}
|
|
5451
5455
|
|
|
5452
|
-
function
|
|
5453
|
-
return
|
|
5456
|
+
function xt() {
|
|
5457
|
+
return bi(createInstantSlots(numberToBigNano(this.valueOf(), q)));
|
|
5454
5458
|
}
|
|
5455
5459
|
|
|
5456
5460
|
function getImplTransition(e, t, n) {
|
|
5457
5461
|
const o = t.C(toInstantSlots(n).epochNanoseconds, e);
|
|
5458
|
-
return o ?
|
|
5462
|
+
return o ? bi(createInstantSlots(o)) : null;
|
|
5459
5463
|
}
|
|
5460
5464
|
|
|
5461
5465
|
function refineTimeZoneSlot(e) {
|
|
5462
|
-
return isObjectLike(e) ? (
|
|
5466
|
+
return isObjectLike(e) ? (Ua(e) || {}).timeZone || wi(e) : (e => resolveTimeZoneId(parseTimeZoneId(We(e))))(e);
|
|
5463
5467
|
}
|
|
5464
5468
|
|
|
5465
5469
|
function toPlainTimeSlots(e, t) {
|
|
5466
5470
|
if (isObjectLike(e)) {
|
|
5467
|
-
const n =
|
|
5471
|
+
const n = Ua(e) || {};
|
|
5468
5472
|
switch (n.branding) {
|
|
5469
|
-
case
|
|
5473
|
+
case Mn:
|
|
5470
5474
|
return refineOverflowOptions(t), n;
|
|
5471
5475
|
|
|
5472
|
-
case
|
|
5476
|
+
case In:
|
|
5473
5477
|
return refineOverflowOptions(t), createPlainTimeSlots(n);
|
|
5474
5478
|
|
|
5475
|
-
case
|
|
5479
|
+
case Nn:
|
|
5476
5480
|
return refineOverflowOptions(t), zonedDateTimeToPlainTime(createTimeZoneOffsetOps, n);
|
|
5477
5481
|
}
|
|
5478
5482
|
return refinePlainTimeBag(e, t);
|
|
@@ -5484,23 +5488,32 @@ function optionalToPlainTimeFields(e) {
|
|
|
5484
5488
|
return void 0 === e ? void 0 : toPlainTimeSlots(e);
|
|
5485
5489
|
}
|
|
5486
5490
|
|
|
5491
|
+
function toPlainYearMonthSlots(e, t) {
|
|
5492
|
+
if (t = copyOptions(t), isObjectLike(e)) {
|
|
5493
|
+
const n = Ua(e);
|
|
5494
|
+
return n && n.branding === Tn ? (refineOverflowOptions(t), n) : refinePlainYearMonthBag(Xi(getCalendarSlotFromBag(e)), e, t);
|
|
5495
|
+
}
|
|
5496
|
+
const n = parsePlainYearMonth(st, e);
|
|
5497
|
+
return refineOverflowOptions(t), n;
|
|
5498
|
+
}
|
|
5499
|
+
|
|
5487
5500
|
function toPlainDateTimeSlots(e, t) {
|
|
5488
5501
|
if (t = copyOptions(t), isObjectLike(e)) {
|
|
5489
|
-
const n =
|
|
5502
|
+
const n = Ua(e) || {};
|
|
5490
5503
|
switch (n.branding) {
|
|
5491
|
-
case
|
|
5504
|
+
case In:
|
|
5492
5505
|
return refineOverflowOptions(t), n;
|
|
5493
5506
|
|
|
5494
|
-
case
|
|
5507
|
+
case Dn:
|
|
5495
5508
|
return refineOverflowOptions(t), createPlainDateTimeSlots({
|
|
5496
5509
|
...n,
|
|
5497
|
-
...
|
|
5510
|
+
...be
|
|
5498
5511
|
});
|
|
5499
5512
|
|
|
5500
|
-
case
|
|
5513
|
+
case Nn:
|
|
5501
5514
|
return refineOverflowOptions(t), zonedDateTimeToPlainDateTime(createTimeZoneOffsetOps, n);
|
|
5502
5515
|
}
|
|
5503
|
-
return refinePlainDateTimeBag(
|
|
5516
|
+
return refinePlainDateTimeBag($i(getCalendarSlotFromBag(e)), e, t);
|
|
5504
5517
|
}
|
|
5505
5518
|
const n = parsePlainDateTime(e);
|
|
5506
5519
|
return refineOverflowOptions(t), n;
|
|
@@ -5508,29 +5521,29 @@ function toPlainDateTimeSlots(e, t) {
|
|
|
5508
5521
|
|
|
5509
5522
|
function toPlainDateSlots(e, t) {
|
|
5510
5523
|
if (t = copyOptions(t), isObjectLike(e)) {
|
|
5511
|
-
const n =
|
|
5524
|
+
const n = Ua(e) || {};
|
|
5512
5525
|
switch (n.branding) {
|
|
5513
|
-
case
|
|
5526
|
+
case Dn:
|
|
5514
5527
|
return refineOverflowOptions(t), n;
|
|
5515
5528
|
|
|
5516
|
-
case
|
|
5529
|
+
case In:
|
|
5517
5530
|
return refineOverflowOptions(t), createPlainDateSlots(n);
|
|
5518
5531
|
|
|
5519
|
-
case
|
|
5532
|
+
case Nn:
|
|
5520
5533
|
return refineOverflowOptions(t), zonedDateTimeToPlainDate(createTimeZoneOffsetOps, n);
|
|
5521
5534
|
}
|
|
5522
|
-
return refinePlainDateBag(
|
|
5535
|
+
return refinePlainDateBag($i(getCalendarSlotFromBag(e)), e, t);
|
|
5523
5536
|
}
|
|
5524
5537
|
const n = parsePlainDate(e);
|
|
5525
5538
|
return refineOverflowOptions(t), n;
|
|
5526
5539
|
}
|
|
5527
5540
|
|
|
5528
5541
|
function dayAdapter(e, t, n) {
|
|
5529
|
-
return requirePositiveInteger(t.call(e,
|
|
5542
|
+
return requirePositiveInteger(t.call(e, Vi(createPlainDateSlots(n, e))));
|
|
5530
5543
|
}
|
|
5531
5544
|
|
|
5532
5545
|
function createCompoundOpsCreator(e) {
|
|
5533
|
-
return t => "string" == typeof t ?
|
|
5546
|
+
return t => "string" == typeof t ? st(t) : ((e, t) => {
|
|
5534
5547
|
const n = Object.keys(t).sort(), o = {};
|
|
5535
5548
|
for (const r of n) {
|
|
5536
5549
|
o[r] = bindArgs(t[r], e, e[r]);
|
|
@@ -5541,8 +5554,8 @@ function createCompoundOpsCreator(e) {
|
|
|
5541
5554
|
|
|
5542
5555
|
function toDurationSlots(e) {
|
|
5543
5556
|
if (isObjectLike(e)) {
|
|
5544
|
-
const t =
|
|
5545
|
-
return t && t.branding ===
|
|
5557
|
+
const t = Ua(e);
|
|
5558
|
+
return t && t.branding === vn ? t : refineDurationBag(e);
|
|
5546
5559
|
}
|
|
5547
5560
|
return parseDuration(e);
|
|
5548
5561
|
}
|
|
@@ -5550,27 +5563,27 @@ function toDurationSlots(e) {
|
|
|
5550
5563
|
function refinePublicRelativeTo(e) {
|
|
5551
5564
|
if (void 0 !== e) {
|
|
5552
5565
|
if (isObjectLike(e)) {
|
|
5553
|
-
const t =
|
|
5566
|
+
const t = Ua(e) || {};
|
|
5554
5567
|
switch (t.branding) {
|
|
5555
|
-
case
|
|
5556
|
-
case
|
|
5568
|
+
case Nn:
|
|
5569
|
+
case Dn:
|
|
5557
5570
|
return t;
|
|
5558
5571
|
|
|
5559
|
-
case
|
|
5572
|
+
case In:
|
|
5560
5573
|
return createPlainDateSlots(t);
|
|
5561
5574
|
}
|
|
5562
5575
|
const n = getCalendarSlotFromBag(e);
|
|
5563
5576
|
return {
|
|
5564
|
-
...refineMaybeZonedDateTimeBag(refineTimeZoneSlot, createTimeZoneOps,
|
|
5577
|
+
...refineMaybeZonedDateTimeBag(refineTimeZoneSlot, createTimeZoneOps, $i(n), e),
|
|
5565
5578
|
calendar: n
|
|
5566
5579
|
};
|
|
5567
5580
|
}
|
|
5568
|
-
return
|
|
5581
|
+
return parseRelativeToSlots(e);
|
|
5569
5582
|
}
|
|
5570
5583
|
}
|
|
5571
5584
|
|
|
5572
5585
|
function getCalendarSlotFromBag(e) {
|
|
5573
|
-
return extractCalendarSlotFromBag(e) ||
|
|
5586
|
+
return extractCalendarSlotFromBag(e) || ce;
|
|
5574
5587
|
}
|
|
5575
5588
|
|
|
5576
5589
|
function extractCalendarSlotFromBag(e) {
|
|
@@ -5581,210 +5594,157 @@ function extractCalendarSlotFromBag(e) {
|
|
|
5581
5594
|
}
|
|
5582
5595
|
|
|
5583
5596
|
function refineCalendarSlot(e) {
|
|
5584
|
-
return isObjectLike(e) ? (
|
|
5597
|
+
return isObjectLike(e) ? (Ua(e) || {}).calendar || fs(e) : (e => resolveCalendarId(parseCalendarId(We(e))))(e);
|
|
5598
|
+
}
|
|
5599
|
+
|
|
5600
|
+
function toZonedDateTimeSlots(e, t) {
|
|
5601
|
+
if (t = copyOptions(t), isObjectLike(e)) {
|
|
5602
|
+
const n = Ua(e);
|
|
5603
|
+
if (n && n.branding === Nn) {
|
|
5604
|
+
return refineZonedFieldOptions(t), n;
|
|
5605
|
+
}
|
|
5606
|
+
const o = getCalendarSlotFromBag(e);
|
|
5607
|
+
return refineZonedDateTimeBag(refineTimeZoneSlot, createTimeZoneOps, $i(o), o, e, t);
|
|
5608
|
+
}
|
|
5609
|
+
return parseZonedDateTime(e, t);
|
|
5610
|
+
}
|
|
5611
|
+
|
|
5612
|
+
function slotsToIso(e) {
|
|
5613
|
+
return wn(e, createTimeZoneOffsetOps);
|
|
5614
|
+
}
|
|
5615
|
+
|
|
5616
|
+
function adaptDateMethods(e) {
|
|
5617
|
+
return mapProps((e => t => e(slotsToIso(t))), e);
|
|
5585
5618
|
}
|
|
5586
5619
|
|
|
5587
|
-
const
|
|
5588
|
-
PlainYearMonth:
|
|
5589
|
-
PlainMonthDay:
|
|
5590
|
-
PlainDate:
|
|
5591
|
-
PlainDateTime:
|
|
5592
|
-
PlainTime:
|
|
5593
|
-
Instant:
|
|
5594
|
-
},
|
|
5620
|
+
const Ga = /*@__PURE__*/ new WeakMap, Ua = /*@__PURE__*/ Ga.get.bind(Ga), za = /*@__PURE__*/ Ga.set.bind(Ga), qt = /*@__PURE__*/ createDateTimeFormatClass(), Ha = /*@__PURE__*/ new WeakMap, Ka = {
|
|
5621
|
+
PlainYearMonth: bt,
|
|
5622
|
+
PlainMonthDay: Ot,
|
|
5623
|
+
PlainDate: wt,
|
|
5624
|
+
PlainDateTime: Bt,
|
|
5625
|
+
PlainTime: kt,
|
|
5626
|
+
Instant: Yt
|
|
5627
|
+
}, Qa = /*@__PURE__*/ createFormatPrepper(bt), Xa = /*@__PURE__*/ createFormatPrepper(Ot), $a = /*@__PURE__*/ createFormatPrepper(wt), _a = /*@__PURE__*/ createFormatPrepper(Bt), ei = /*@__PURE__*/ createFormatPrepper(kt), ti = /*@__PURE__*/ createFormatPrepper(Yt), ni = /*@__PURE__*/ createFormatPrepper(Ct), oi = {
|
|
5595
5628
|
era: requireStringOrUndefined,
|
|
5596
5629
|
eraYear: requireIntegerOrUndefined,
|
|
5597
5630
|
year: requireInteger,
|
|
5598
5631
|
month: requirePositiveInteger,
|
|
5599
5632
|
daysInMonth: requirePositiveInteger,
|
|
5600
5633
|
daysInYear: requirePositiveInteger,
|
|
5601
|
-
inLeapYear:
|
|
5634
|
+
inLeapYear: je,
|
|
5602
5635
|
monthsInYear: requirePositiveInteger
|
|
5603
|
-
},
|
|
5604
|
-
monthCode:
|
|
5605
|
-
},
|
|
5636
|
+
}, ri = {
|
|
5637
|
+
monthCode: We
|
|
5638
|
+
}, ai = {
|
|
5606
5639
|
day: requirePositiveInteger
|
|
5607
|
-
},
|
|
5640
|
+
}, ii = {
|
|
5608
5641
|
dayOfWeek: requirePositiveInteger,
|
|
5609
5642
|
dayOfYear: requirePositiveInteger,
|
|
5610
|
-
weekOfYear:
|
|
5611
|
-
yearOfWeek:
|
|
5643
|
+
weekOfYear: requirePositiveIntegerOrUndefined,
|
|
5644
|
+
yearOfWeek: requireIntegerOrUndefined,
|
|
5612
5645
|
daysInWeek: requirePositiveInteger
|
|
5613
|
-
},
|
|
5614
|
-
...createCalendarFieldMethods(
|
|
5615
|
-
...createCalendarFieldMethods(
|
|
5616
|
-
...createCalendarFieldMethods(
|
|
5617
|
-
...createCalendarFieldMethods(
|
|
5618
|
-
},
|
|
5619
|
-
...
|
|
5620
|
-
...
|
|
5621
|
-
}),
|
|
5622
|
-
...
|
|
5623
|
-
...
|
|
5624
|
-
}),
|
|
5646
|
+
}, si = /*@__PURE__*/ Object.assign({}, oi, ri, ai, ii), li = {
|
|
5647
|
+
...createCalendarFieldMethods(oi, [ Tn ]),
|
|
5648
|
+
...createCalendarFieldMethods(ii, []),
|
|
5649
|
+
...createCalendarFieldMethods(ri, [ Tn, gn ]),
|
|
5650
|
+
...createCalendarFieldMethods(ai, [ gn ])
|
|
5651
|
+
}, ci = /*@__PURE__*/ createCalendarGetters(si), ui = /*@__PURE__*/ createCalendarGetters({
|
|
5652
|
+
...oi,
|
|
5653
|
+
...ri
|
|
5654
|
+
}), di = /*@__PURE__*/ createCalendarGetters({
|
|
5655
|
+
...ri,
|
|
5656
|
+
...ai
|
|
5657
|
+
}), fi = {
|
|
5625
5658
|
calendarId: e => getId(e.calendar)
|
|
5626
|
-
},
|
|
5659
|
+
}, mi = /*@__PURE__*/ mapProps(((e, t) => function(n) {
|
|
5627
5660
|
const {X: o} = this;
|
|
5628
|
-
return e(o[t](
|
|
5629
|
-
}),
|
|
5661
|
+
return e(o[t](Vi(createPlainDateSlots(n, o))));
|
|
5662
|
+
}), si), Si = /*@__PURE__*/ mapPropNames((e => t => t[e]), pe.concat("sign")), Oi = /*@__PURE__*/ mapPropNames(((e, t) => e => e[ye[t]]), $), Ti = {
|
|
5630
5663
|
epochSeconds: getEpochSeconds,
|
|
5631
5664
|
epochMilliseconds: getEpochMilliseconds,
|
|
5632
5665
|
epochMicroseconds: getEpochMicroseconds,
|
|
5633
5666
|
epochNanoseconds: getEpochNanoseconds
|
|
5634
|
-
},
|
|
5635
|
-
...
|
|
5636
|
-
...
|
|
5667
|
+
}, pi = /*@__PURE__*/ bindArgs(excludePropsByName, new Set([ "branding" ])), [hi, Pi, Di] = createSlotClass(gn, bindArgs(constructPlainMonthDaySlots, refineCalendarSlot), {
|
|
5668
|
+
...fi,
|
|
5669
|
+
...di
|
|
5637
5670
|
}, {
|
|
5638
5671
|
with(e, t, n) {
|
|
5639
|
-
return
|
|
5672
|
+
return Pi(plainMonthDayWithFields(ns, e, this, rejectInvalidBag(t), n));
|
|
5640
5673
|
},
|
|
5641
5674
|
equals: (e, t) => plainMonthDaysEqual(e, toPlainMonthDaySlots(t)),
|
|
5642
5675
|
toString: formatPlainMonthDayIso,
|
|
5643
5676
|
toJSON: e => formatPlainMonthDayIso(e),
|
|
5644
5677
|
toLocaleString(e, t, n) {
|
|
5645
|
-
const [o, r] =
|
|
5678
|
+
const [o, r] = Xa(t, n, e);
|
|
5646
5679
|
return o.format(r);
|
|
5647
5680
|
},
|
|
5648
5681
|
toPlainDate(e, t) {
|
|
5649
|
-
return
|
|
5682
|
+
return Vi(plainMonthDayToPlainDate(ts, e, this, t));
|
|
5650
5683
|
},
|
|
5651
|
-
getISOFields:
|
|
5684
|
+
getISOFields: pi,
|
|
5652
5685
|
getCalendar: createCalendarFromSlots,
|
|
5653
5686
|
valueOf: neverValueOf
|
|
5654
5687
|
}, {
|
|
5655
|
-
from: (e, t) =>
|
|
5656
|
-
}),
|
|
5688
|
+
from: (e, t) => Pi(toPlainMonthDaySlots(e, t))
|
|
5689
|
+
}), Ci = {
|
|
5657
5690
|
getOffsetNanosecondsFor: getOffsetNanosecondsForAdapter,
|
|
5658
5691
|
getPossibleInstantsFor(e, t, n) {
|
|
5659
|
-
|
|
5692
|
+
const o = [ ...t.call(e, Ai(createPlainDateTimeSlots(n, ce))) ].map((e => Fi(e).epochNanoseconds)), r = o.length;
|
|
5693
|
+
return r > 1 && (o.sort(compareBigNanos), validateTimeZoneGap(bigNanoToNumber(diffBigNanos(o[0], o[r - 1])))), o;
|
|
5660
5694
|
}
|
|
5661
|
-
},
|
|
5695
|
+
}, gi = {
|
|
5662
5696
|
getOffsetNanosecondsFor: getOffsetNanosecondsForAdapter
|
|
5663
|
-
}, [
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
},
|
|
5670
|
-
add: (e, t, n) => mi(movePlainYearMonth(Qi, 0, e, toDurationSlots(t), n)),
|
|
5671
|
-
subtract: (e, t, n) => mi(movePlainYearMonth(Qi, 1, e, toDurationSlots(t), n)),
|
|
5672
|
-
until: (e, t, n) => _i(diffPlainYearMonth(Xi, 0, e, toPlainYearMonthSlots(t), n)),
|
|
5673
|
-
since: (e, t, n) => _i(diffPlainYearMonth(Xi, 1, e, toPlainYearMonthSlots(t), n)),
|
|
5674
|
-
equals: (e, t) => plainYearMonthsEqual(e, toPlainYearMonthSlots(t)),
|
|
5675
|
-
toString: formatPlainYearMonthIso,
|
|
5676
|
-
toJSON: e => formatPlainYearMonthIso(e),
|
|
5677
|
-
toLocaleString(e, t, n) {
|
|
5678
|
-
const [o, r] = La(t, n, e);
|
|
5679
|
-
return o.format(r);
|
|
5680
|
-
},
|
|
5681
|
-
toPlainDate(e, t) {
|
|
5682
|
-
return wi(plainYearMonthToPlainDate(Ui, e, this, t));
|
|
5683
|
-
},
|
|
5684
|
-
getISOFields: ii,
|
|
5685
|
-
getCalendar: createCalendarFromSlots,
|
|
5686
|
-
valueOf: neverValueOf
|
|
5687
|
-
}, {
|
|
5688
|
-
from: (e, t) => mi(toPlainYearMonthSlots(e, t)),
|
|
5689
|
-
compare: (e, t) => compareIsoDateFields(toPlainYearMonthSlots(e), toPlainYearMonthSlots(t))
|
|
5690
|
-
}), [Oi, Ti] = createSlotClass(In, bindArgs(constructZonedDateTimeSlots, refineCalendarSlot, refineTimeZoneSlot), {
|
|
5691
|
-
...ai,
|
|
5692
|
-
...ti,
|
|
5693
|
-
...adaptDateMethods($a),
|
|
5694
|
-
...adaptDateMethods(ri),
|
|
5695
|
-
hoursInDay: e => computeHoursInDay(createTimeZoneOps, e),
|
|
5696
|
-
offsetNanoseconds: e => slotsToIso(e).offsetNanoseconds,
|
|
5697
|
-
offset: e => formatOffsetNano(slotsToIso(e).offsetNanoseconds),
|
|
5698
|
-
timeZoneId: e => getId(e.timeZone)
|
|
5699
|
-
}, {
|
|
5700
|
-
with(e, t, n) {
|
|
5701
|
-
return Ti(zonedDateTimeWithFields(Ui, createTimeZoneOps, e, this, rejectInvalidBag(t), n));
|
|
5702
|
-
},
|
|
5703
|
-
withPlainTime: (e, t) => Ti(zonedDateTimeWithPlainTime(createTimeZoneOps, e, optionalToPlainTimeFields(t))),
|
|
5704
|
-
withPlainDate: (e, t) => Ti(zonedDateTimeWithPlainDate(createTimeZoneOps, e, toPlainDateSlots(t))),
|
|
5705
|
-
withTimeZone: (e, t) => Ti(slotsWithTimeZone(e, refineTimeZoneSlot(t))),
|
|
5706
|
-
withCalendar: (e, t) => Ti(slotsWithCalendar(e, refineCalendarSlot(t))),
|
|
5707
|
-
add: (e, t, n) => Ti(moveZonedDateTime(Hi, createTimeZoneOps, 0, e, toDurationSlots(t), n)),
|
|
5708
|
-
subtract: (e, t, n) => Ti(moveZonedDateTime(Hi, createTimeZoneOps, 1, e, toDurationSlots(t), n)),
|
|
5709
|
-
until: (e, t, n) => _i(createDurationSlots(diffZonedDateTimes(Ki, createTimeZoneOps, 0, e, toZonedDateTimeSlots(t), n))),
|
|
5710
|
-
since: (e, t, n) => _i(createDurationSlots(diffZonedDateTimes(Ki, createTimeZoneOps, 1, e, toZonedDateTimeSlots(t), n))),
|
|
5711
|
-
round: (e, t) => Ti(roundZonedDateTime(createTimeZoneOps, e, t)),
|
|
5712
|
-
startOfDay: e => Ti(computeStartOfDay(createTimeZoneOps, e)),
|
|
5713
|
-
equals: (e, t) => zonedDateTimesEqual(e, toZonedDateTimeSlots(t)),
|
|
5714
|
-
toString: (e, t) => formatZonedDateTimeIso(createTimeZoneOffsetOps, e, t),
|
|
5715
|
-
toJSON: e => formatZonedDateTimeIso(createTimeZoneOffsetOps, e),
|
|
5716
|
-
toLocaleString(e, t, n = {}) {
|
|
5717
|
-
const [o, r] = Ga(t, n, e);
|
|
5718
|
-
return o.format(r);
|
|
5719
|
-
},
|
|
5720
|
-
toInstant: e => hi(zonedDateTimeToInstant(e)),
|
|
5721
|
-
toPlainDate: e => wi(zonedDateTimeToPlainDate(createTimeZoneOffsetOps, e)),
|
|
5722
|
-
toPlainTime: e => bi(zonedDateTimeToPlainTime(createTimeZoneOffsetOps, e)),
|
|
5723
|
-
toPlainDateTime: e => Ii(zonedDateTimeToPlainDateTime(createTimeZoneOffsetOps, e)),
|
|
5724
|
-
toPlainYearMonth(e) {
|
|
5725
|
-
return mi(zonedDateTimeToPlainYearMonth(xi, e, this));
|
|
5726
|
-
},
|
|
5727
|
-
toPlainMonthDay(e) {
|
|
5728
|
-
return li(zonedDateTimeToPlainMonthDay(Wi, e, this));
|
|
5729
|
-
},
|
|
5730
|
-
getISOFields: e => buildZonedIsoFields(createTimeZoneOffsetOps, e),
|
|
5731
|
-
getCalendar: createCalendarFromSlots,
|
|
5732
|
-
getTimeZone: ({timeZone: e}) => "string" == typeof e ? new Di(e) : e,
|
|
5733
|
-
valueOf: neverValueOf
|
|
5734
|
-
}, {
|
|
5735
|
-
from: (e, t) => Ti(toZonedDateTimeSlots(e, t)),
|
|
5736
|
-
compare: (e, t) => compareZonedDateTimes(toZonedDateTimeSlots(e), toZonedDateTimeSlots(t))
|
|
5737
|
-
}), [pi, hi, Pi] = createSlotClass(gn, constructInstantSlots, ai, {
|
|
5738
|
-
add: (e, t) => hi(moveInstant(0, e, toDurationSlots(t))),
|
|
5739
|
-
subtract: (e, t) => hi(moveInstant(1, e, toDurationSlots(t))),
|
|
5740
|
-
until: (e, t, n) => _i(diffInstants(0, e, toInstantSlots(t), n)),
|
|
5741
|
-
since: (e, t, n) => _i(diffInstants(1, e, toInstantSlots(t), n)),
|
|
5742
|
-
round: (e, t) => hi(roundInstant(e, t)),
|
|
5697
|
+
}, [Zi, bi, Fi] = createSlotClass(yn, constructInstantSlots, Ti, {
|
|
5698
|
+
add: (e, t) => bi(moveInstant(0, e, toDurationSlots(t))),
|
|
5699
|
+
subtract: (e, t) => bi(moveInstant(1, e, toDurationSlots(t))),
|
|
5700
|
+
until: (e, t, n) => ls(diffInstants(0, e, toInstantSlots(t), n)),
|
|
5701
|
+
since: (e, t, n) => ls(diffInstants(1, e, toInstantSlots(t), n)),
|
|
5702
|
+
round: (e, t) => bi(roundInstant(e, t)),
|
|
5743
5703
|
equals: (e, t) => instantsEqual(e, toInstantSlots(t)),
|
|
5744
5704
|
toString: (e, t) => formatInstantIso(refineTimeZoneSlot, createTimeZoneOffsetOps, e, t),
|
|
5745
5705
|
toJSON: e => formatInstantIso(refineTimeZoneSlot, createTimeZoneOffsetOps, e),
|
|
5746
5706
|
toLocaleString(e, t, n) {
|
|
5747
|
-
const [o, r] =
|
|
5707
|
+
const [o, r] = ti(t, n, e);
|
|
5748
5708
|
return o.format(r);
|
|
5749
5709
|
},
|
|
5750
|
-
toZonedDateTimeISO: (e, t) =>
|
|
5710
|
+
toZonedDateTimeISO: (e, t) => Ss(instantToZonedDateTime(e, refineTimeZoneSlot(t))),
|
|
5751
5711
|
toZonedDateTime(e, t) {
|
|
5752
5712
|
const n = requireObjectLike(t);
|
|
5753
|
-
return
|
|
5713
|
+
return Ss(instantToZonedDateTime(e, refineTimeZoneSlot(n.timeZone), refineCalendarSlot(n.calendar)));
|
|
5754
5714
|
},
|
|
5755
5715
|
valueOf: neverValueOf
|
|
5756
5716
|
}, {
|
|
5757
|
-
from: e =>
|
|
5758
|
-
fromEpochSeconds: e =>
|
|
5759
|
-
fromEpochMilliseconds: e =>
|
|
5760
|
-
fromEpochMicroseconds: e =>
|
|
5761
|
-
fromEpochNanoseconds: e =>
|
|
5717
|
+
from: e => bi(toInstantSlots(e)),
|
|
5718
|
+
fromEpochSeconds: e => bi(epochSecToInstant(e)),
|
|
5719
|
+
fromEpochMilliseconds: e => bi(epochMilliToInstant(e)),
|
|
5720
|
+
fromEpochMicroseconds: e => bi(epochMicroToInstant(e)),
|
|
5721
|
+
fromEpochNanoseconds: e => bi(epochNanoToInstant(e)),
|
|
5762
5722
|
compare: (e, t) => compareInstants(toInstantSlots(e), toInstantSlots(t))
|
|
5763
|
-
}), [
|
|
5723
|
+
}), [Ii, vi] = createSlotClass("TimeZone", (e => {
|
|
5764
5724
|
const t = resolveTimeZoneId(e);
|
|
5765
5725
|
return {
|
|
5766
5726
|
branding: "TimeZone",
|
|
5767
5727
|
id: t,
|
|
5768
|
-
K:
|
|
5728
|
+
K: kn(t)
|
|
5769
5729
|
};
|
|
5770
5730
|
}), {
|
|
5771
5731
|
id: e => e.id
|
|
5772
5732
|
}, {
|
|
5773
5733
|
toString: e => e.id,
|
|
5774
5734
|
toJSON: e => e.id,
|
|
5775
|
-
getPossibleInstantsFor: ({K: e}, t) => e.getPossibleInstantsFor(toPlainDateTimeSlots(t)).map((e =>
|
|
5735
|
+
getPossibleInstantsFor: ({K: e}, t) => e.getPossibleInstantsFor(toPlainDateTimeSlots(t)).map((e => bi(createInstantSlots(e)))),
|
|
5776
5736
|
getOffsetNanosecondsFor: ({K: e}, t) => e.getOffsetNanosecondsFor(toInstantSlots(t).epochNanoseconds),
|
|
5777
5737
|
getOffsetStringFor(e, t) {
|
|
5778
|
-
const n = toInstantSlots(t).epochNanoseconds, o = createAdapterOps(this,
|
|
5738
|
+
const n = toInstantSlots(t).epochNanoseconds, o = createAdapterOps(this, gi).getOffsetNanosecondsFor(n);
|
|
5779
5739
|
return formatOffsetNano(o);
|
|
5780
5740
|
},
|
|
5781
|
-
getPlainDateTimeFor(e, t, n =
|
|
5782
|
-
const o = toInstantSlots(t).epochNanoseconds, r = createAdapterOps(this,
|
|
5783
|
-
return
|
|
5741
|
+
getPlainDateTimeFor(e, t, n = ce) {
|
|
5742
|
+
const o = toInstantSlots(t).epochNanoseconds, r = createAdapterOps(this, gi).getOffsetNanosecondsFor(o);
|
|
5743
|
+
return Ai(createPlainDateTimeSlots(epochNanoToIso(o, r), refineCalendarSlot(n)));
|
|
5784
5744
|
},
|
|
5785
5745
|
getInstantFor(e, t, n) {
|
|
5786
5746
|
const o = toPlainDateTimeSlots(t), r = refineEpochDisambigOptions(n), a = createAdapterOps(this);
|
|
5787
|
-
return
|
|
5747
|
+
return bi(createInstantSlots(getSingleInstantFor(a, o, r)));
|
|
5788
5748
|
},
|
|
5789
5749
|
getNextTransition: ({K: e}, t) => getImplTransition(1, e, t),
|
|
5790
5750
|
getPreviousTransition: ({K: e}, t) => getImplTransition(-1, e, t),
|
|
@@ -5794,153 +5754,179 @@ const Ya = /*@__PURE__*/ new WeakMap, Aa = /*@__PURE__*/ Ya.get.bind(Ya), Ea = /
|
|
|
5794
5754
|
}, {
|
|
5795
5755
|
from(e) {
|
|
5796
5756
|
const t = refineTimeZoneSlot(e);
|
|
5797
|
-
return "string" == typeof t ? new
|
|
5757
|
+
return "string" == typeof t ? new Ii(t) : t;
|
|
5798
5758
|
}
|
|
5799
|
-
}),
|
|
5759
|
+
}), wi = /*@__PURE__*/ createProtocolValidator(Object.keys(Ci)), [ji, Mi] = createSlotClass(Mn, constructPlainTimeSlots, Oi, {
|
|
5800
5760
|
with(e, t, n) {
|
|
5801
|
-
return
|
|
5761
|
+
return Mi(plainTimeWithFields(this, rejectInvalidBag(t), n));
|
|
5802
5762
|
},
|
|
5803
|
-
add: (e, t) =>
|
|
5804
|
-
subtract: (e, t) =>
|
|
5805
|
-
until: (e, t, n) =>
|
|
5806
|
-
since: (e, t, n) =>
|
|
5807
|
-
round: (e, t) =>
|
|
5763
|
+
add: (e, t) => Mi(movePlainTime(0, e, toDurationSlots(t))),
|
|
5764
|
+
subtract: (e, t) => Mi(movePlainTime(1, e, toDurationSlots(t))),
|
|
5765
|
+
until: (e, t, n) => ls(diffPlainTimes(0, e, toPlainTimeSlots(t), n)),
|
|
5766
|
+
since: (e, t, n) => ls(diffPlainTimes(1, e, toPlainTimeSlots(t), n)),
|
|
5767
|
+
round: (e, t) => Mi(roundPlainTime(e, t)),
|
|
5808
5768
|
equals: (e, t) => plainTimesEqual(e, toPlainTimeSlots(t)),
|
|
5809
5769
|
toString: formatPlainTimeIso,
|
|
5810
5770
|
toJSON: e => formatPlainTimeIso(e),
|
|
5811
5771
|
toLocaleString(e, t, n) {
|
|
5812
|
-
const [o, r] =
|
|
5772
|
+
const [o, r] = ei(t, n, e);
|
|
5813
5773
|
return o.format(r);
|
|
5814
5774
|
},
|
|
5815
|
-
toZonedDateTime: (e, t) =>
|
|
5816
|
-
toPlainDateTime: (e, t) =>
|
|
5817
|
-
getISOFields:
|
|
5775
|
+
toZonedDateTime: (e, t) => Ss(plainTimeToZonedDateTime(refineTimeZoneSlot, toPlainDateSlots, createTimeZoneOps, e, t)),
|
|
5776
|
+
toPlainDateTime: (e, t) => Ai(plainTimeToPlainDateTime(e, toPlainDateSlots(t))),
|
|
5777
|
+
getISOFields: pi,
|
|
5818
5778
|
valueOf: neverValueOf
|
|
5819
5779
|
}, {
|
|
5820
|
-
from: (e, t) =>
|
|
5780
|
+
from: (e, t) => Mi(toPlainTimeSlots(e, t)),
|
|
5821
5781
|
compare: (e, t) => compareIsoTimeFields(toPlainTimeSlots(e), toPlainTimeSlots(t))
|
|
5822
|
-
}), [
|
|
5823
|
-
...
|
|
5824
|
-
|
|
5825
|
-
...ri
|
|
5782
|
+
}), [yi, Ni, Bi] = createSlotClass(Tn, bindArgs(constructPlainYearMonthSlots, refineCalendarSlot), {
|
|
5783
|
+
...fi,
|
|
5784
|
+
...ui
|
|
5826
5785
|
}, {
|
|
5827
5786
|
with(e, t, n) {
|
|
5828
|
-
return
|
|
5787
|
+
return Ni(plainYearMonthWithFields(es, e, this, rejectInvalidBag(t), n));
|
|
5788
|
+
},
|
|
5789
|
+
add: (e, t, n) => Ni(movePlainYearMonth(as, 0, e, toDurationSlots(t), n)),
|
|
5790
|
+
subtract: (e, t, n) => Ni(movePlainYearMonth(as, 1, e, toDurationSlots(t), n)),
|
|
5791
|
+
until: (e, t, n) => ls(diffPlainYearMonth(is, 0, e, toPlainYearMonthSlots(t), n)),
|
|
5792
|
+
since: (e, t, n) => ls(diffPlainYearMonth(is, 1, e, toPlainYearMonthSlots(t), n)),
|
|
5793
|
+
equals: (e, t) => plainYearMonthsEqual(e, toPlainYearMonthSlots(t)),
|
|
5794
|
+
toString: formatPlainYearMonthIso,
|
|
5795
|
+
toJSON: e => formatPlainYearMonthIso(e),
|
|
5796
|
+
toLocaleString(e, t, n) {
|
|
5797
|
+
const [o, r] = Qa(t, n, e);
|
|
5798
|
+
return o.format(r);
|
|
5829
5799
|
},
|
|
5830
|
-
|
|
5831
|
-
|
|
5832
|
-
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
|
|
5836
|
-
|
|
5837
|
-
|
|
5800
|
+
toPlainDate(e, t) {
|
|
5801
|
+
return Vi(plainYearMonthToPlainDate(ts, e, this, t));
|
|
5802
|
+
},
|
|
5803
|
+
getISOFields: pi,
|
|
5804
|
+
getCalendar: createCalendarFromSlots,
|
|
5805
|
+
valueOf: neverValueOf
|
|
5806
|
+
}, {
|
|
5807
|
+
from: (e, t) => Ni(toPlainYearMonthSlots(e, t)),
|
|
5808
|
+
compare: (e, t) => compareIsoDateFields(toPlainYearMonthSlots(e), toPlainYearMonthSlots(t))
|
|
5809
|
+
}), [Yi, Ai] = createSlotClass(In, bindArgs(constructPlainDateTimeSlots, refineCalendarSlot), {
|
|
5810
|
+
...fi,
|
|
5811
|
+
...ci,
|
|
5812
|
+
...Oi
|
|
5813
|
+
}, {
|
|
5814
|
+
with(e, t, n) {
|
|
5815
|
+
return Ai(plainDateTimeWithFields(ts, e, this, rejectInvalidBag(t), n));
|
|
5816
|
+
},
|
|
5817
|
+
withPlainTime: (e, t) => Ai(plainDateTimeWithPlainTime(e, optionalToPlainTimeFields(t))),
|
|
5818
|
+
withPlainDate: (e, t) => Ai(plainDateTimeWithPlainDate(e, toPlainDateSlots(t))),
|
|
5819
|
+
withCalendar: (e, t) => Ai(slotsWithCalendar(e, refineCalendarSlot(t))),
|
|
5820
|
+
add: (e, t, n) => Ai(movePlainDateTime(os, 0, e, toDurationSlots(t), n)),
|
|
5821
|
+
subtract: (e, t, n) => Ai(movePlainDateTime(os, 1, e, toDurationSlots(t), n)),
|
|
5822
|
+
until: (e, t, n) => ls(diffPlainDateTimes(rs, 0, e, toPlainDateTimeSlots(t), n)),
|
|
5823
|
+
since: (e, t, n) => ls(diffPlainDateTimes(rs, 1, e, toPlainDateTimeSlots(t), n)),
|
|
5824
|
+
round: (e, t) => Ai(roundPlainDateTime(e, t)),
|
|
5838
5825
|
equals: (e, t) => plainDateTimesEqual(e, toPlainDateTimeSlots(t)),
|
|
5839
5826
|
toString: (e, t) => formatPlainDateTimeIso(e, t),
|
|
5840
5827
|
toJSON: e => formatPlainDateTimeIso(e),
|
|
5841
5828
|
toLocaleString(e, t, n) {
|
|
5842
|
-
const [o, r] =
|
|
5829
|
+
const [o, r] = _a(t, n, e);
|
|
5843
5830
|
return o.format(r);
|
|
5844
5831
|
},
|
|
5845
|
-
toZonedDateTime: (e, t, n) =>
|
|
5846
|
-
toPlainDate: e =>
|
|
5832
|
+
toZonedDateTime: (e, t, n) => Ss(plainDateTimeToZonedDateTime(createTimeZoneOps, e, refineTimeZoneSlot(t), n)),
|
|
5833
|
+
toPlainDate: e => Vi(createPlainDateSlots(e)),
|
|
5847
5834
|
toPlainYearMonth(e) {
|
|
5848
|
-
return
|
|
5835
|
+
return Ni(plainDateTimeToPlainYearMonth(Xi, e, this));
|
|
5849
5836
|
},
|
|
5850
5837
|
toPlainMonthDay(e) {
|
|
5851
|
-
return
|
|
5838
|
+
return Pi(plainDateTimeToPlainMonthDay(_i, e, this));
|
|
5852
5839
|
},
|
|
5853
|
-
toPlainTime: e =>
|
|
5854
|
-
getISOFields:
|
|
5840
|
+
toPlainTime: e => Mi(createPlainTimeSlots(e)),
|
|
5841
|
+
getISOFields: pi,
|
|
5855
5842
|
getCalendar: createCalendarFromSlots,
|
|
5856
5843
|
valueOf: neverValueOf
|
|
5857
5844
|
}, {
|
|
5858
|
-
from: (e, t) =>
|
|
5845
|
+
from: (e, t) => Ai(toPlainDateTimeSlots(e, t)),
|
|
5859
5846
|
compare: (e, t) => compareIsoDateTimeFields(toPlainDateTimeSlots(e), toPlainDateTimeSlots(t))
|
|
5860
|
-
}), [
|
|
5861
|
-
...
|
|
5862
|
-
|
|
5847
|
+
}), [Ei, Vi, Ji] = createSlotClass(Dn, bindArgs(constructPlainDateSlots, refineCalendarSlot), {
|
|
5848
|
+
...fi,
|
|
5849
|
+
...ci
|
|
5863
5850
|
}, {
|
|
5864
5851
|
with(e, t, n) {
|
|
5865
|
-
return
|
|
5852
|
+
return Vi(plainDateWithFields(ts, e, this, rejectInvalidBag(t), n));
|
|
5866
5853
|
},
|
|
5867
|
-
withCalendar: (e, t) =>
|
|
5868
|
-
add: (e, t, n) =>
|
|
5869
|
-
subtract: (e, t, n) =>
|
|
5870
|
-
until: (e, t, n) =>
|
|
5871
|
-
since: (e, t, n) =>
|
|
5854
|
+
withCalendar: (e, t) => Vi(slotsWithCalendar(e, refineCalendarSlot(t))),
|
|
5855
|
+
add: (e, t, n) => Vi(movePlainDate(os, 0, e, toDurationSlots(t), n)),
|
|
5856
|
+
subtract: (e, t, n) => Vi(movePlainDate(os, 1, e, toDurationSlots(t), n)),
|
|
5857
|
+
until: (e, t, n) => ls(diffPlainDates(rs, 0, e, toPlainDateSlots(t), n)),
|
|
5858
|
+
since: (e, t, n) => ls(diffPlainDates(rs, 1, e, toPlainDateSlots(t), n)),
|
|
5872
5859
|
equals: (e, t) => plainDatesEqual(e, toPlainDateSlots(t)),
|
|
5873
5860
|
toString: formatPlainDateIso,
|
|
5874
5861
|
toJSON: e => formatPlainDateIso(e),
|
|
5875
5862
|
toLocaleString(e, t, n) {
|
|
5876
|
-
const [o, r] =
|
|
5863
|
+
const [o, r] = $a(t, n, e);
|
|
5877
5864
|
return o.format(r);
|
|
5878
5865
|
},
|
|
5879
5866
|
toZonedDateTime(e, t) {
|
|
5880
|
-
const n = !isObjectLike(t) || t instanceof
|
|
5867
|
+
const n = !isObjectLike(t) || t instanceof Ii ? {
|
|
5881
5868
|
timeZone: t
|
|
5882
5869
|
} : t;
|
|
5883
|
-
return
|
|
5870
|
+
return Ss(plainDateToZonedDateTime(refineTimeZoneSlot, toPlainTimeSlots, createTimeZoneOps, e, n));
|
|
5884
5871
|
},
|
|
5885
|
-
toPlainDateTime: (e, t) =>
|
|
5872
|
+
toPlainDateTime: (e, t) => Ai(plainDateToPlainDateTime(e, optionalToPlainTimeFields(t))),
|
|
5886
5873
|
toPlainYearMonth(e) {
|
|
5887
|
-
return
|
|
5874
|
+
return Ni(plainDateToPlainYearMonth(Xi, e, this));
|
|
5888
5875
|
},
|
|
5889
5876
|
toPlainMonthDay(e) {
|
|
5890
|
-
return
|
|
5877
|
+
return Pi(plainDateToPlainMonthDay(_i, e, this));
|
|
5891
5878
|
},
|
|
5892
|
-
getISOFields:
|
|
5879
|
+
getISOFields: pi,
|
|
5893
5880
|
getCalendar: createCalendarFromSlots,
|
|
5894
5881
|
valueOf: neverValueOf
|
|
5895
5882
|
}, {
|
|
5896
|
-
from: (e, t) =>
|
|
5883
|
+
from: (e, t) => Vi(toPlainDateSlots(e, t)),
|
|
5897
5884
|
compare: (e, t) => compareIsoDateFields(toPlainDateSlots(e), toPlainDateSlots(t))
|
|
5898
|
-
}),
|
|
5885
|
+
}), Li = {
|
|
5899
5886
|
fields(e, t, n) {
|
|
5900
5887
|
return [ ...t.call(e, n) ];
|
|
5901
5888
|
}
|
|
5902
|
-
},
|
|
5889
|
+
}, qi = /*@__PURE__*/ Object.assign({
|
|
5903
5890
|
dateFromFields(e, t, n, o) {
|
|
5904
|
-
return
|
|
5891
|
+
return Ji(t.call(e, Object.assign(Object.create(null), n), o));
|
|
5905
5892
|
}
|
|
5906
|
-
},
|
|
5893
|
+
}, Li), ki = /*@__PURE__*/ Object.assign({
|
|
5907
5894
|
yearMonthFromFields(e, t, n, o) {
|
|
5908
|
-
return
|
|
5895
|
+
return Bi(t.call(e, Object.assign(Object.create(null), n), o));
|
|
5909
5896
|
}
|
|
5910
|
-
},
|
|
5897
|
+
}, Li), xi = /*@__PURE__*/ Object.assign({
|
|
5911
5898
|
monthDayFromFields(e, t, n, o) {
|
|
5912
|
-
return
|
|
5899
|
+
return Di(t.call(e, Object.assign(Object.create(null), n), o));
|
|
5913
5900
|
}
|
|
5914
|
-
},
|
|
5901
|
+
}, Li), Ri = {
|
|
5915
5902
|
mergeFields(e, t, n, o) {
|
|
5916
5903
|
return requireObjectLike(t.call(e, Object.assign(Object.create(null), n), Object.assign(Object.create(null), o)));
|
|
5917
5904
|
}
|
|
5918
|
-
},
|
|
5905
|
+
}, Wi = /*@__PURE__*/ Object.assign({}, qi, Ri), Gi = /*@__PURE__*/ Object.assign({}, ki, Ri), Ui = /*@__PURE__*/ Object.assign({}, xi, Ri), zi = {
|
|
5919
5906
|
dateAdd(e, t, n, o, r) {
|
|
5920
|
-
return
|
|
5907
|
+
return Ji(t.call(e, Vi(createPlainDateSlots(n, e)), ls(createDurationSlots(o)), r));
|
|
5921
5908
|
}
|
|
5922
|
-
},
|
|
5909
|
+
}, Hi = /*@__PURE__*/ Object.assign({}, zi, {
|
|
5923
5910
|
dateUntil(e, t, n, o, r, a) {
|
|
5924
|
-
return
|
|
5925
|
-
largestUnit:
|
|
5911
|
+
return cs(t.call(e, Vi(createPlainDateSlots(n, e)), Vi(createPlainDateSlots(o, e)), Object.assign(Object.create(null), a, {
|
|
5912
|
+
largestUnit: C[r]
|
|
5926
5913
|
})));
|
|
5927
5914
|
}
|
|
5928
|
-
}),
|
|
5915
|
+
}), Ki = /*@__PURE__*/ Object.assign({}, zi, {
|
|
5929
5916
|
day: dayAdapter
|
|
5930
|
-
}),
|
|
5917
|
+
}), Qi = /*@__PURE__*/ Object.assign({}, Hi, {
|
|
5931
5918
|
day: dayAdapter
|
|
5932
|
-
}),
|
|
5933
|
-
...
|
|
5934
|
-
blank:
|
|
5935
|
-
sign: e => Sn(e)
|
|
5919
|
+
}), Xi = /*@__PURE__*/ createCompoundOpsCreator(ki), $i = /*@__PURE__*/ createCompoundOpsCreator(qi), _i = /*@__PURE__*/ createCompoundOpsCreator(xi), es = /*@__PURE__*/ createCompoundOpsCreator(Gi), ts = /*@__PURE__*/ createCompoundOpsCreator(Wi), ns = /*@__PURE__*/ createCompoundOpsCreator(Ui), os = /*@__PURE__*/ createCompoundOpsCreator(zi), rs = /*@__PURE__*/ createCompoundOpsCreator(Hi), as = /*@__PURE__*/ createCompoundOpsCreator(Ki), is = /*@__PURE__*/ createCompoundOpsCreator(Qi), [ss, ls, cs] = createSlotClass(vn, constructDurationSlots, {
|
|
5920
|
+
...Si,
|
|
5921
|
+
blank: getDurationBlank
|
|
5936
5922
|
}, {
|
|
5937
|
-
with: (e, t) =>
|
|
5938
|
-
add: (e, t, n) =>
|
|
5939
|
-
subtract: (e, t, n) =>
|
|
5940
|
-
negated: e =>
|
|
5941
|
-
abs: e =>
|
|
5942
|
-
round: (e, t) =>
|
|
5943
|
-
total: (e, t) => totalDuration(refinePublicRelativeTo,
|
|
5923
|
+
with: (e, t) => ls(durationWithFields(e, t)),
|
|
5924
|
+
add: (e, t, n) => ls(addDurations(refinePublicRelativeTo, rs, createTimeZoneOps, 0, e, toDurationSlots(t), n)),
|
|
5925
|
+
subtract: (e, t, n) => ls(addDurations(refinePublicRelativeTo, rs, createTimeZoneOps, 1, e, toDurationSlots(t), n)),
|
|
5926
|
+
negated: e => ls(negateDuration(e)),
|
|
5927
|
+
abs: e => ls(absDuration(e)),
|
|
5928
|
+
round: (e, t) => ls(roundDuration(refinePublicRelativeTo, rs, createTimeZoneOps, e, t)),
|
|
5929
|
+
total: (e, t) => totalDuration(refinePublicRelativeTo, rs, createTimeZoneOps, e, t),
|
|
5944
5930
|
toString: formatDurationIso,
|
|
5945
5931
|
toLocaleString(e, t, n) {
|
|
5946
5932
|
return Intl.DurationFormat ? new Intl.DurationFormat(t, n).format(this) : formatDurationIso(e);
|
|
@@ -5948,21 +5934,21 @@ const Ya = /*@__PURE__*/ new WeakMap, Aa = /*@__PURE__*/ Ya.get.bind(Ya), Ea = /
|
|
|
5948
5934
|
toJSON: e => formatDurationIso(e),
|
|
5949
5935
|
valueOf: neverValueOf
|
|
5950
5936
|
}, {
|
|
5951
|
-
from: e =>
|
|
5952
|
-
compare: (e, t, n) => compareDurations(refinePublicRelativeTo,
|
|
5953
|
-
}),
|
|
5937
|
+
from: e => ls(toDurationSlots(e)),
|
|
5938
|
+
compare: (e, t, n) => compareDurations(refinePublicRelativeTo, os, createTimeZoneOps, toDurationSlots(e), toDurationSlots(t), n)
|
|
5939
|
+
}), us = {
|
|
5954
5940
|
toString: e => e.id,
|
|
5955
5941
|
toJSON: e => e.id,
|
|
5956
|
-
...
|
|
5957
|
-
dateAdd: ({id: e, K: t}, n, o, r) =>
|
|
5958
|
-
dateUntil: ({K: e}, t, n, o) =>
|
|
5959
|
-
dateFromFields: ({id: e, K: t}, n, o) =>
|
|
5960
|
-
yearMonthFromFields: ({id: e, K: t}, n, o) =>
|
|
5961
|
-
monthDayFromFields: ({id: e, K: t}, n, o) =>
|
|
5942
|
+
...li,
|
|
5943
|
+
dateAdd: ({id: e, K: t}, n, o, r) => Vi(createPlainDateSlots(t.dateAdd(toPlainDateSlots(n), toDurationSlots(o), r), e)),
|
|
5944
|
+
dateUntil: ({K: e}, t, n, o) => ls(createDurationSlots(e.dateUntil(toPlainDateSlots(t), toPlainDateSlots(n), refineCalendarDiffOptions(o)))),
|
|
5945
|
+
dateFromFields: ({id: e, K: t}, n, o) => Vi(refinePlainDateBag(t, n, o, getRequiredDateFields(e))),
|
|
5946
|
+
yearMonthFromFields: ({id: e, K: t}, n, o) => Ni(refinePlainYearMonthBag(t, n, o, getRequiredYearMonthFields(e))),
|
|
5947
|
+
monthDayFromFields: ({id: e, K: t}, n, o) => Pi(refinePlainMonthDayBag(t, 0, n, o, getRequiredMonthDayFields(e))),
|
|
5962
5948
|
fields({K: e}, t) {
|
|
5963
|
-
const n = new Set(
|
|
5949
|
+
const n = new Set(re), o = [];
|
|
5964
5950
|
for (const e of t) {
|
|
5965
|
-
if (
|
|
5951
|
+
if (We(e), !n.has(e)) {
|
|
5966
5952
|
throw new RangeError(forbiddenField(e));
|
|
5967
5953
|
}
|
|
5968
5954
|
n.delete(e), o.push(e);
|
|
@@ -5970,47 +5956,94 @@ const Ya = /*@__PURE__*/ new WeakMap, Aa = /*@__PURE__*/ Ya.get.bind(Ya), Ea = /
|
|
|
5970
5956
|
return e.fields(o);
|
|
5971
5957
|
},
|
|
5972
5958
|
mergeFields: ({K: e}, t, n) => e.mergeFields(excludeUndefinedProps(requireNonNullish(t)), excludeUndefinedProps(requireNonNullish(n)))
|
|
5973
|
-
}, [
|
|
5974
|
-
const t = resolveCalendarId(
|
|
5959
|
+
}, [ds] = createSlotClass("Calendar", (e => {
|
|
5960
|
+
const t = resolveCalendarId(We(e));
|
|
5975
5961
|
return {
|
|
5976
5962
|
branding: "Calendar",
|
|
5977
5963
|
id: t,
|
|
5978
|
-
K:
|
|
5964
|
+
K: st(t)
|
|
5979
5965
|
};
|
|
5980
5966
|
}), {
|
|
5981
5967
|
id: e => e.id
|
|
5982
|
-
},
|
|
5968
|
+
}, us, {
|
|
5983
5969
|
from(e) {
|
|
5984
5970
|
const t = refineCalendarSlot(e);
|
|
5985
|
-
return "string" == typeof t ? new
|
|
5971
|
+
return "string" == typeof t ? new ds(t) : t;
|
|
5986
5972
|
}
|
|
5987
|
-
}),
|
|
5973
|
+
}), fs = /*@__PURE__*/ createProtocolValidator(Object.keys(us).slice(4)), [ms, Ss] = createSlotClass(Nn, bindArgs(constructZonedDateTimeSlots, refineCalendarSlot, refineTimeZoneSlot), {
|
|
5974
|
+
...Ti,
|
|
5975
|
+
...fi,
|
|
5976
|
+
...adaptDateMethods(ci),
|
|
5977
|
+
...adaptDateMethods(Oi),
|
|
5978
|
+
hoursInDay: e => computeHoursInDay(createTimeZoneOps, e),
|
|
5979
|
+
offsetNanoseconds: e => slotsToIso(e).offsetNanoseconds,
|
|
5980
|
+
offset: e => formatOffsetNano(slotsToIso(e).offsetNanoseconds),
|
|
5981
|
+
timeZoneId: e => getId(e.timeZone)
|
|
5982
|
+
}, {
|
|
5983
|
+
with(e, t, n) {
|
|
5984
|
+
return Ss(zonedDateTimeWithFields(ts, createTimeZoneOps, e, this, rejectInvalidBag(t), n));
|
|
5985
|
+
},
|
|
5986
|
+
withPlainTime: (e, t) => Ss(zonedDateTimeWithPlainTime(createTimeZoneOps, e, optionalToPlainTimeFields(t))),
|
|
5987
|
+
withPlainDate: (e, t) => Ss(zonedDateTimeWithPlainDate(createTimeZoneOps, e, toPlainDateSlots(t))),
|
|
5988
|
+
withTimeZone: (e, t) => Ss(slotsWithTimeZone(e, refineTimeZoneSlot(t))),
|
|
5989
|
+
withCalendar: (e, t) => Ss(slotsWithCalendar(e, refineCalendarSlot(t))),
|
|
5990
|
+
add: (e, t, n) => Ss(moveZonedDateTime(os, createTimeZoneOps, 0, e, toDurationSlots(t), n)),
|
|
5991
|
+
subtract: (e, t, n) => Ss(moveZonedDateTime(os, createTimeZoneOps, 1, e, toDurationSlots(t), n)),
|
|
5992
|
+
until: (e, t, n) => ls(createDurationSlots(diffZonedDateTimes(rs, createTimeZoneOps, 0, e, toZonedDateTimeSlots(t), n))),
|
|
5993
|
+
since: (e, t, n) => ls(createDurationSlots(diffZonedDateTimes(rs, createTimeZoneOps, 1, e, toZonedDateTimeSlots(t), n))),
|
|
5994
|
+
round: (e, t) => Ss(roundZonedDateTime(createTimeZoneOps, e, t)),
|
|
5995
|
+
startOfDay: e => Ss(computeStartOfDay(createTimeZoneOps, e)),
|
|
5996
|
+
equals: (e, t) => zonedDateTimesEqual(e, toZonedDateTimeSlots(t)),
|
|
5997
|
+
toString: (e, t) => formatZonedDateTimeIso(createTimeZoneOffsetOps, e, t),
|
|
5998
|
+
toJSON: e => formatZonedDateTimeIso(createTimeZoneOffsetOps, e),
|
|
5999
|
+
toLocaleString(e, t, n = {}) {
|
|
6000
|
+
const [o, r] = ni(t, n, e);
|
|
6001
|
+
return o.format(r);
|
|
6002
|
+
},
|
|
6003
|
+
toInstant: e => bi(zonedDateTimeToInstant(e)),
|
|
6004
|
+
toPlainDate: e => Vi(zonedDateTimeToPlainDate(createTimeZoneOffsetOps, e)),
|
|
6005
|
+
toPlainTime: e => Mi(zonedDateTimeToPlainTime(createTimeZoneOffsetOps, e)),
|
|
6006
|
+
toPlainDateTime: e => Ai(zonedDateTimeToPlainDateTime(createTimeZoneOffsetOps, e)),
|
|
6007
|
+
toPlainYearMonth(e) {
|
|
6008
|
+
return Ni(zonedDateTimeToPlainYearMonth(Xi, e, this));
|
|
6009
|
+
},
|
|
6010
|
+
toPlainMonthDay(e) {
|
|
6011
|
+
return Pi(zonedDateTimeToPlainMonthDay(_i, e, this));
|
|
6012
|
+
},
|
|
6013
|
+
getISOFields: e => buildZonedIsoFields(createTimeZoneOffsetOps, e),
|
|
6014
|
+
getCalendar: createCalendarFromSlots,
|
|
6015
|
+
getTimeZone: ({timeZone: e}) => "string" == typeof e ? new Ii(e) : e,
|
|
6016
|
+
valueOf: neverValueOf
|
|
6017
|
+
}, {
|
|
6018
|
+
from: (e, t) => Ss(toZonedDateTimeSlots(e, t)),
|
|
6019
|
+
compare: (e, t) => compareZonedDateTimes(toZonedDateTimeSlots(e), toZonedDateTimeSlots(t))
|
|
6020
|
+
}), Os = /*@__PURE__*/ Object.defineProperties({}, {
|
|
5988
6021
|
...createStringTagDescriptors("Temporal.Now"),
|
|
5989
6022
|
...createPropDescriptors({
|
|
5990
6023
|
timeZoneId: () => getCurrentTimeZoneId(),
|
|
5991
|
-
instant: () =>
|
|
5992
|
-
zonedDateTime: (e, t = getCurrentTimeZoneId()) =>
|
|
5993
|
-
zonedDateTimeISO: (e = getCurrentTimeZoneId()) =>
|
|
5994
|
-
plainDateTime: (e, t = getCurrentTimeZoneId()) =>
|
|
5995
|
-
plainDateTimeISO: (e = getCurrentTimeZoneId()) =>
|
|
5996
|
-
plainDate: (e, t = getCurrentTimeZoneId()) =>
|
|
5997
|
-
plainDateISO: (e = getCurrentTimeZoneId()) =>
|
|
5998
|
-
plainTimeISO: (e = getCurrentTimeZoneId()) =>
|
|
6024
|
+
instant: () => bi(createInstantSlots(getCurrentEpochNano())),
|
|
6025
|
+
zonedDateTime: (e, t = getCurrentTimeZoneId()) => Ss(createZonedDateTimeSlots(getCurrentEpochNano(), refineTimeZoneSlot(t), refineCalendarSlot(e))),
|
|
6026
|
+
zonedDateTimeISO: (e = getCurrentTimeZoneId()) => Ss(createZonedDateTimeSlots(getCurrentEpochNano(), refineTimeZoneSlot(e), ce)),
|
|
6027
|
+
plainDateTime: (e, t = getCurrentTimeZoneId()) => Ai(createPlainDateTimeSlots(getCurrentIsoDateTime(createTimeZoneOffsetOps(refineTimeZoneSlot(t))), refineCalendarSlot(e))),
|
|
6028
|
+
plainDateTimeISO: (e = getCurrentTimeZoneId()) => Ai(createPlainDateTimeSlots(getCurrentIsoDateTime(createTimeZoneOffsetOps(refineTimeZoneSlot(e))), ce)),
|
|
6029
|
+
plainDate: (e, t = getCurrentTimeZoneId()) => Vi(createPlainDateSlots(getCurrentIsoDateTime(createTimeZoneOffsetOps(refineTimeZoneSlot(t))), refineCalendarSlot(e))),
|
|
6030
|
+
plainDateISO: (e = getCurrentTimeZoneId()) => Vi(createPlainDateSlots(getCurrentIsoDateTime(createTimeZoneOffsetOps(refineTimeZoneSlot(e))), ce)),
|
|
6031
|
+
plainTimeISO: (e = getCurrentTimeZoneId()) => Mi(createPlainTimeSlots(getCurrentIsoDateTime(createTimeZoneOffsetOps(refineTimeZoneSlot(e)))))
|
|
5999
6032
|
})
|
|
6000
6033
|
}), jt = /*@__PURE__*/ Object.defineProperties({}, {
|
|
6001
6034
|
...createStringTagDescriptors("Temporal"),
|
|
6002
6035
|
...createPropDescriptors({
|
|
6003
|
-
PlainYearMonth:
|
|
6004
|
-
PlainMonthDay:
|
|
6005
|
-
PlainDate:
|
|
6006
|
-
PlainTime:
|
|
6007
|
-
PlainDateTime:
|
|
6008
|
-
ZonedDateTime:
|
|
6009
|
-
Instant:
|
|
6010
|
-
Calendar:
|
|
6011
|
-
TimeZone:
|
|
6012
|
-
Duration:
|
|
6013
|
-
Now:
|
|
6036
|
+
PlainYearMonth: yi,
|
|
6037
|
+
PlainMonthDay: hi,
|
|
6038
|
+
PlainDate: Ei,
|
|
6039
|
+
PlainTime: ji,
|
|
6040
|
+
PlainDateTime: Yi,
|
|
6041
|
+
ZonedDateTime: ms,
|
|
6042
|
+
Instant: Zi,
|
|
6043
|
+
Calendar: ds,
|
|
6044
|
+
TimeZone: Ii,
|
|
6045
|
+
Duration: ss,
|
|
6046
|
+
Now: Os
|
|
6014
6047
|
})
|
|
6015
6048
|
});
|
|
6016
6049
|
|
|
@@ -7477,9 +7510,9 @@ function pad4(number) {
|
|
|
7477
7510
|
Object.defineProperties(globalThis, createPropDescriptors({
|
|
7478
7511
|
Temporal: jt
|
|
7479
7512
|
})), Object.defineProperties(Intl, createPropDescriptors({
|
|
7480
|
-
DateTimeFormat:
|
|
7513
|
+
DateTimeFormat: qt
|
|
7481
7514
|
})), Object.defineProperties(Date.prototype, createPropDescriptors({
|
|
7482
|
-
toTemporalInstant:
|
|
7515
|
+
toTemporalInstant: xt
|
|
7483
7516
|
}));
|
|
7484
7517
|
|
|
7485
7518
|
/**
|
|
@@ -9782,6 +9815,14 @@ const staticModernHolidays = [{
|
|
|
9782
9815
|
mm: Cheshvan,
|
|
9783
9816
|
dd: 7,
|
|
9784
9817
|
desc: 'Yom HaAliyah School Observance'
|
|
9818
|
+
},
|
|
9819
|
+
// https://www.gov.il/he/departments/policies/2012_des5234
|
|
9820
|
+
{
|
|
9821
|
+
firstYear: 5773,
|
|
9822
|
+
mm: months.TEVET,
|
|
9823
|
+
dd: 21,
|
|
9824
|
+
desc: 'Hebrew Language Day',
|
|
9825
|
+
friSatMovetoThu: true
|
|
9785
9826
|
}];
|
|
9786
9827
|
|
|
9787
9828
|
/*
|
|
@@ -10320,7 +10361,7 @@ class DailyLearning {
|
|
|
10320
10361
|
}
|
|
10321
10362
|
|
|
10322
10363
|
// DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
10323
|
-
const version = '5.
|
|
10364
|
+
const version = '5.3.0';
|
|
10324
10365
|
|
|
10325
10366
|
const NONE$1 = 0;
|
|
10326
10367
|
const HALF = 1;
|
|
@@ -10684,6 +10725,7 @@ var poHe = {
|
|
|
10684
10725
|
"Jabotinsky Day": ["יוֹם ז׳בוטינסקי"],
|
|
10685
10726
|
"Herzl Day": ["יוֹם הרצל"],
|
|
10686
10727
|
"Ben-Gurion Day": ["יוֹם בן־גוריון"],
|
|
10728
|
+
"Hebrew Language Day": ["יוֹם הַשָׂפָה הַעִברִית"],
|
|
10687
10729
|
"Birkat Hachamah": ["בִרְכַּת הַחַמָּה"],
|
|
10688
10730
|
"Shushan Purim Katan": ["שׁוּשָׁן פּוּרִים קָטָן"],
|
|
10689
10731
|
"Purim Meshulash": ["פּוּרִים מְשׁוּלָּשׁ"],
|