@internationalized/date 3.2.1-nightly.3964 → 3.2.1-nightly.3969
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/import.mjs +26 -36
- package/dist/main.js +26 -39
- package/dist/main.js.map +1 -1
- package/dist/module.js +26 -36
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
package/dist/module.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import $cUVuN$
|
|
2
|
-
import $cUVuN$swchelperssrc_define_propertymjs from "@swc/helpers/src/_define_property.mjs";
|
|
1
|
+
import {_ as $cUVuN$_} from "@swc/helpers/_/_class_private_field_init";
|
|
3
2
|
|
|
4
3
|
/*
|
|
5
4
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -59,7 +58,6 @@ import $cUVuN$swchelperssrc_define_propertymjs from "@swc/helpers/src/_define_pr
|
|
|
59
58
|
*/ // Portions of the code in this file are based on code from ICU.
|
|
60
59
|
// Original licensing can be found in the NOTICE file in the root directory of this source tree.
|
|
61
60
|
|
|
62
|
-
|
|
63
61
|
/*
|
|
64
62
|
* Copyright 2020 Adobe. All rights reserved.
|
|
65
63
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -194,7 +192,7 @@ class $3b62074eb05584b2$export$80ee6245ec4f29ec {
|
|
|
194
192
|
}
|
|
195
193
|
}
|
|
196
194
|
constructor(){
|
|
197
|
-
|
|
195
|
+
this.identifier = "gregory";
|
|
198
196
|
}
|
|
199
197
|
}
|
|
200
198
|
|
|
@@ -640,11 +638,11 @@ function $11d87f3f76e88657$export$5107c82f94518f5c(date, timeZone, disambiguatio
|
|
|
640
638
|
if (timeZone === (0, $14e0f24ef4ac5c92$export$aa8b41735afcabd2)() && disambiguation === "compatible") {
|
|
641
639
|
dateTime = $11d87f3f76e88657$export$b4a036af3fc0b032(dateTime, new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)());
|
|
642
640
|
// Don't use Date constructor here because two-digit years are interpreted in the 20th century.
|
|
643
|
-
let
|
|
641
|
+
let date = new Date();
|
|
644
642
|
let year = (0, $3b62074eb05584b2$export$c36e0ecb2d4fa69d)(dateTime.era, dateTime.year);
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
return
|
|
643
|
+
date.setFullYear(year, dateTime.month - 1, dateTime.day);
|
|
644
|
+
date.setHours(dateTime.hour, dateTime.minute, dateTime.second, dateTime.millisecond);
|
|
645
|
+
return date.getTime();
|
|
648
646
|
}
|
|
649
647
|
let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime);
|
|
650
648
|
let offsetBefore = $11d87f3f76e88657$export$59c99f3515d3493f(ms - $11d87f3f76e88657$var$DAYMILLIS, timeZone);
|
|
@@ -1001,8 +999,8 @@ function $735220c2d4774dd3$export$96b1d28349274637(dateTime, duration) {
|
|
|
1001
999
|
ms += (duration.seconds || 0) * 1000;
|
|
1002
1000
|
ms += (duration.minutes || 0) * 60000;
|
|
1003
1001
|
ms += (duration.hours || 0) * 3600000;
|
|
1004
|
-
let
|
|
1005
|
-
return (0, $11d87f3f76e88657$export$b4a036af3fc0b032)(
|
|
1002
|
+
let res = (0, $11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone);
|
|
1003
|
+
return (0, $11d87f3f76e88657$export$b4a036af3fc0b032)(res, dateTime.calendar);
|
|
1006
1004
|
}
|
|
1007
1005
|
function $735220c2d4774dd3$export$6814caac34ca03c7(dateTime, duration) {
|
|
1008
1006
|
return $735220c2d4774dd3$export$96b1d28349274637(dateTime, $735220c2d4774dd3$export$3e2544e88a25bff8(duration));
|
|
@@ -1062,8 +1060,8 @@ function $735220c2d4774dd3$export$9a297d111fc86b79(dateTime, field, amount, opti
|
|
|
1062
1060
|
case "day":
|
|
1063
1061
|
{
|
|
1064
1062
|
let res = $735220c2d4774dd3$export$d52ced6badfb9a4c((0, $11d87f3f76e88657$export$b21e0b124e224484)(dateTime), field, amount, options);
|
|
1065
|
-
let
|
|
1066
|
-
return (0, $11d87f3f76e88657$export$b4a036af3fc0b032)((0, $11d87f3f76e88657$export$1b96692a1ba042ac)(
|
|
1063
|
+
let ms = (0, $11d87f3f76e88657$export$5107c82f94518f5c)(res, dateTime.timeZone);
|
|
1064
|
+
return (0, $11d87f3f76e88657$export$b4a036af3fc0b032)((0, $11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone), dateTime.calendar);
|
|
1067
1065
|
}
|
|
1068
1066
|
default:
|
|
1069
1067
|
throw new Error("Unsupported field " + field);
|
|
@@ -1288,7 +1286,7 @@ class $35ea8db9cb2ccb90$export$99faa760c7908e4f {
|
|
|
1288
1286
|
return (0, $14e0f24ef4ac5c92$export$68781ddf31c0090f)(this, b);
|
|
1289
1287
|
}
|
|
1290
1288
|
constructor(...args){
|
|
1291
|
-
(0, $cUVuN$
|
|
1289
|
+
(0, $cUVuN$_)(this, $35ea8db9cb2ccb90$var$_type, {
|
|
1292
1290
|
writable: true,
|
|
1293
1291
|
value: void 0
|
|
1294
1292
|
});
|
|
@@ -1330,7 +1328,7 @@ class $35ea8db9cb2ccb90$export$680ea196effce5f {
|
|
|
1330
1328
|
return (0, $14e0f24ef4ac5c92$export$c19a80a9721b80f6)(this, b);
|
|
1331
1329
|
}
|
|
1332
1330
|
constructor(hour = 0, minute = 0, second = 0, millisecond = 0){
|
|
1333
|
-
(0, $cUVuN$
|
|
1331
|
+
(0, $cUVuN$_)(this, $35ea8db9cb2ccb90$var$_type1, {
|
|
1334
1332
|
writable: true,
|
|
1335
1333
|
value: void 0
|
|
1336
1334
|
});
|
|
@@ -1384,7 +1382,7 @@ class $35ea8db9cb2ccb90$export$ca871e8dbb80966f {
|
|
|
1384
1382
|
return res;
|
|
1385
1383
|
}
|
|
1386
1384
|
constructor(...args){
|
|
1387
|
-
(0, $cUVuN$
|
|
1385
|
+
(0, $cUVuN$_)(this, $35ea8db9cb2ccb90$var$_type2, {
|
|
1388
1386
|
writable: true,
|
|
1389
1387
|
value: void 0
|
|
1390
1388
|
});
|
|
@@ -1438,7 +1436,7 @@ class $35ea8db9cb2ccb90$export$d3b7288e7994edea {
|
|
|
1438
1436
|
return this.toDate().getTime() - (0, $11d87f3f76e88657$export$84c95a83c799e074)(b, this.timeZone).toDate().getTime();
|
|
1439
1437
|
}
|
|
1440
1438
|
constructor(...args){
|
|
1441
|
-
(0, $cUVuN$
|
|
1439
|
+
(0, $cUVuN$_)(this, $35ea8db9cb2ccb90$var$_type3, {
|
|
1442
1440
|
writable: true,
|
|
1443
1441
|
value: void 0
|
|
1444
1442
|
});
|
|
@@ -1476,7 +1474,6 @@ class $35ea8db9cb2ccb90$export$d3b7288e7994edea {
|
|
|
1476
1474
|
// Original licensing can be found in the NOTICE file in the root directory of this source tree.
|
|
1477
1475
|
|
|
1478
1476
|
|
|
1479
|
-
|
|
1480
1477
|
const $62225008020f0a13$var$ERA_START_DATES = [
|
|
1481
1478
|
[
|
|
1482
1479
|
1868,
|
|
@@ -1622,7 +1619,7 @@ class $62225008020f0a13$export$b746ab2b60cdffbf extends (0, $3b62074eb05584b2$ex
|
|
|
1622
1619
|
}
|
|
1623
1620
|
constructor(...args){
|
|
1624
1621
|
super(...args);
|
|
1625
|
-
|
|
1622
|
+
this.identifier = "japanese";
|
|
1626
1623
|
}
|
|
1627
1624
|
}
|
|
1628
1625
|
function $62225008020f0a13$var$getMinimums(date) {
|
|
@@ -1647,7 +1644,6 @@ function $62225008020f0a13$var$getMinimums(date) {
|
|
|
1647
1644
|
// Original licensing can be found in the NOTICE file in the root directory of this source tree.
|
|
1648
1645
|
|
|
1649
1646
|
|
|
1650
|
-
|
|
1651
1647
|
const $8d73d47422ca7302$var$BUDDHIST_ERA_START = -543;
|
|
1652
1648
|
class $8d73d47422ca7302$export$42d20a78301dee44 extends (0, $3b62074eb05584b2$export$80ee6245ec4f29ec) {
|
|
1653
1649
|
fromJulianDay(jd) {
|
|
@@ -1669,7 +1665,7 @@ class $8d73d47422ca7302$export$42d20a78301dee44 extends (0, $3b62074eb05584b2$ex
|
|
|
1669
1665
|
balanceDate() {}
|
|
1670
1666
|
constructor(...args){
|
|
1671
1667
|
super(...args);
|
|
1672
|
-
|
|
1668
|
+
this.identifier = "buddhist";
|
|
1673
1669
|
}
|
|
1674
1670
|
}
|
|
1675
1671
|
function $8d73d47422ca7302$var$toGregorian(date) {
|
|
@@ -1692,7 +1688,6 @@ function $8d73d47422ca7302$var$toGregorian(date) {
|
|
|
1692
1688
|
// Original licensing can be found in the NOTICE file in the root directory of this source tree.
|
|
1693
1689
|
|
|
1694
1690
|
|
|
1695
|
-
|
|
1696
1691
|
const $5f31bd6f0c8940b2$var$TAIWAN_ERA_START = 1911;
|
|
1697
1692
|
function $5f31bd6f0c8940b2$var$gregorianYear(date) {
|
|
1698
1693
|
return date.era === "minguo" ? date.year + $5f31bd6f0c8940b2$var$TAIWAN_ERA_START : 1 - date.year + $5f31bd6f0c8940b2$var$TAIWAN_ERA_START;
|
|
@@ -1740,7 +1735,7 @@ class $5f31bd6f0c8940b2$export$65e01080afcb0799 extends (0, $3b62074eb05584b2$ex
|
|
|
1740
1735
|
}
|
|
1741
1736
|
constructor(...args){
|
|
1742
1737
|
super(...args);
|
|
1743
|
-
|
|
1738
|
+
this.identifier = "roc" // Republic of China
|
|
1744
1739
|
;
|
|
1745
1740
|
}
|
|
1746
1741
|
}
|
|
@@ -1764,7 +1759,6 @@ function $5f31bd6f0c8940b2$var$toGregorian(date) {
|
|
|
1764
1759
|
// Original licensing can be found in the NOTICE file in the root directory of this source tree.
|
|
1765
1760
|
|
|
1766
1761
|
|
|
1767
|
-
|
|
1768
1762
|
const $f3ed2e4472ae7e25$var$PERSIAN_EPOCH = 1948321; // 622/03/19 Julian C.E.
|
|
1769
1763
|
function $f3ed2e4472ae7e25$var$isLeapYear(year) {
|
|
1770
1764
|
let y0 = year > 0 ? year - 474 : year - 473;
|
|
@@ -1812,7 +1806,7 @@ class $f3ed2e4472ae7e25$export$37fccdbfd14c5939 {
|
|
|
1812
1806
|
return 9377;
|
|
1813
1807
|
}
|
|
1814
1808
|
constructor(){
|
|
1815
|
-
|
|
1809
|
+
this.identifier = "persian";
|
|
1816
1810
|
}
|
|
1817
1811
|
}
|
|
1818
1812
|
|
|
@@ -1831,7 +1825,6 @@ class $f3ed2e4472ae7e25$export$37fccdbfd14c5939 {
|
|
|
1831
1825
|
// Original licensing can be found in the NOTICE file in the root directory of this source tree.
|
|
1832
1826
|
|
|
1833
1827
|
|
|
1834
|
-
|
|
1835
1828
|
// Starts in 78 AD,
|
|
1836
1829
|
const $82c358003bdda0a8$var$INDIAN_ERA_START = 78;
|
|
1837
1830
|
// The Indian year starts 80 days later than the Gregorian year.
|
|
@@ -1910,7 +1903,7 @@ class $82c358003bdda0a8$export$39f31c639fa15726 extends (0, $3b62074eb05584b2$ex
|
|
|
1910
1903
|
balanceDate() {}
|
|
1911
1904
|
constructor(...args){
|
|
1912
1905
|
super(...args);
|
|
1913
|
-
|
|
1906
|
+
this.identifier = "indian";
|
|
1914
1907
|
}
|
|
1915
1908
|
}
|
|
1916
1909
|
|
|
@@ -1928,7 +1921,6 @@ class $82c358003bdda0a8$export$39f31c639fa15726 extends (0, $3b62074eb05584b2$ex
|
|
|
1928
1921
|
*/ // Portions of the code in this file are based on code from ICU.
|
|
1929
1922
|
// Original licensing can be found in the NOTICE file in the root directory of this source tree.
|
|
1930
1923
|
|
|
1931
|
-
|
|
1932
1924
|
const $f2f3e0e3a817edbd$var$CIVIL_EPOC = 1948440; // CE 622 July 16 Friday (Julian calendar) / CE 622 July 19 (Gregorian calendar)
|
|
1933
1925
|
const $f2f3e0e3a817edbd$var$ASTRONOMICAL_EPOC = 1948439; // CE 622 July 15 Thursday (Julian calendar)
|
|
1934
1926
|
const $f2f3e0e3a817edbd$var$UMALQURA_YEAR_START = 1300;
|
|
@@ -1974,7 +1966,7 @@ class $f2f3e0e3a817edbd$export$2066795aadd37bfc {
|
|
|
1974
1966
|
];
|
|
1975
1967
|
}
|
|
1976
1968
|
constructor(){
|
|
1977
|
-
|
|
1969
|
+
this.identifier = "islamic-civil";
|
|
1978
1970
|
}
|
|
1979
1971
|
}
|
|
1980
1972
|
class $f2f3e0e3a817edbd$export$37f0887f2f9d22f7 extends $f2f3e0e3a817edbd$export$2066795aadd37bfc {
|
|
@@ -1986,7 +1978,7 @@ class $f2f3e0e3a817edbd$export$37f0887f2f9d22f7 extends $f2f3e0e3a817edbd$export
|
|
|
1986
1978
|
}
|
|
1987
1979
|
constructor(...args){
|
|
1988
1980
|
super(...args);
|
|
1989
|
-
|
|
1981
|
+
this.identifier = "islamic-tbla";
|
|
1990
1982
|
}
|
|
1991
1983
|
}
|
|
1992
1984
|
// Generated by scripts/generate-umalqura.js
|
|
@@ -2055,7 +2047,7 @@ class $f2f3e0e3a817edbd$export$5baab4758c231076 extends $f2f3e0e3a817edbd$export
|
|
|
2055
2047
|
}
|
|
2056
2048
|
constructor(){
|
|
2057
2049
|
super();
|
|
2058
|
-
|
|
2050
|
+
this.identifier = "islamic-umalqura";
|
|
2059
2051
|
if (!$f2f3e0e3a817edbd$var$UMALQURA_MONTHLENGTH) $f2f3e0e3a817edbd$var$UMALQURA_MONTHLENGTH = new Uint16Array(Uint8Array.from(atob($f2f3e0e3a817edbd$var$UMALQURA_DATA), (c)=>c.charCodeAt(0)).buffer);
|
|
2060
2052
|
if (!$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START_TABLE) {
|
|
2061
2053
|
$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START_TABLE = new Uint32Array($f2f3e0e3a817edbd$var$UMALQURA_YEAR_END - $f2f3e0e3a817edbd$var$UMALQURA_YEAR_START + 1);
|
|
@@ -2083,7 +2075,6 @@ class $f2f3e0e3a817edbd$export$5baab4758c231076 extends $f2f3e0e3a817edbd$export
|
|
|
2083
2075
|
// Original licensing can be found in the NOTICE file in the root directory of this source tree.
|
|
2084
2076
|
|
|
2085
2077
|
|
|
2086
|
-
|
|
2087
2078
|
const $7c5f6fbf42389787$var$HEBREW_EPOCH = 347997;
|
|
2088
2079
|
// Hebrew date calculations are performed in terms of days, hours, and
|
|
2089
2080
|
// "parts" (or halakim), which are 1/1080 of an hour, or 3 1/3 seconds.
|
|
@@ -2204,7 +2195,7 @@ class $7c5f6fbf42389787$export$ca405048b8fb5af {
|
|
|
2204
2195
|
}
|
|
2205
2196
|
}
|
|
2206
2197
|
constructor(){
|
|
2207
|
-
|
|
2198
|
+
this.identifier = "hebrew";
|
|
2208
2199
|
}
|
|
2209
2200
|
}
|
|
2210
2201
|
|
|
@@ -2222,7 +2213,6 @@ class $7c5f6fbf42389787$export$ca405048b8fb5af {
|
|
|
2222
2213
|
*/ // Portions of the code in this file are based on code from ICU.
|
|
2223
2214
|
// Original licensing can be found in the NOTICE file in the root directory of this source tree.
|
|
2224
2215
|
|
|
2225
|
-
|
|
2226
2216
|
const $b956b2d7a6cf451f$var$ETHIOPIC_EPOCH = 1723856;
|
|
2227
2217
|
const $b956b2d7a6cf451f$var$COPTIC_EPOCH = 1824665;
|
|
2228
2218
|
// The delta between Amete Alem 1 and Amete Mihret 1
|
|
@@ -2297,7 +2287,7 @@ class $b956b2d7a6cf451f$export$26ba6eab5e20cd7d {
|
|
|
2297
2287
|
];
|
|
2298
2288
|
}
|
|
2299
2289
|
constructor(){
|
|
2300
|
-
|
|
2290
|
+
this.identifier = "ethiopic";
|
|
2301
2291
|
}
|
|
2302
2292
|
}
|
|
2303
2293
|
class $b956b2d7a6cf451f$export$d72e0c37005a4914 extends $b956b2d7a6cf451f$export$26ba6eab5e20cd7d {
|
|
@@ -2317,7 +2307,7 @@ class $b956b2d7a6cf451f$export$d72e0c37005a4914 extends $b956b2d7a6cf451f$export
|
|
|
2317
2307
|
}
|
|
2318
2308
|
constructor(...args){
|
|
2319
2309
|
super(...args);
|
|
2320
|
-
|
|
2310
|
+
this.identifier = "ethioaa" // also known as 'ethiopic-amete-alem' in ICU
|
|
2321
2311
|
;
|
|
2322
2312
|
}
|
|
2323
2313
|
}
|
|
@@ -2364,7 +2354,7 @@ class $b956b2d7a6cf451f$export$fe6243cbe1a4b7c1 extends $b956b2d7a6cf451f$export
|
|
|
2364
2354
|
}
|
|
2365
2355
|
constructor(...args){
|
|
2366
2356
|
super(...args);
|
|
2367
|
-
|
|
2357
|
+
this.identifier = "coptic";
|
|
2368
2358
|
}
|
|
2369
2359
|
}
|
|
2370
2360
|
|