@js-joda/core 6.0.0 → 6.1.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/README.md +0 -2
- package/dist/js-joda.cjs.js +265 -263
- package/dist/js-joda.cjs.js.map +1 -1
- package/dist/js-joda.esm.js +265 -263
- package/dist/js-joda.esm.js.map +1 -1
- package/dist/js-joda.js +265 -263
- package/dist/js-joda.js.map +1 -1
- package/dist/js-joda.min.js +2 -2
- package/package.json +2 -2
- package/src/Duration.js +32 -23
- package/src/Instant.js +1 -1
- package/src/format/DateTimeFormatterBuilder.js +6 -2
- package/src/format/DateTimeParseContext.js +2 -0
- package/src/format/parser/ZoneIdPrinterParser.js +62 -28
- package/typings/js-joda.flow.js +1 -1
package/dist/js-joda.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//! @version @js-joda/core - 6.
|
|
1
|
+
//! @version @js-joda/core - 6.1.0
|
|
2
2
|
//! @copyright (c) 2015-present, Philipp Thürwächter, Pattrick Hüper & js-joda contributors
|
|
3
3
|
//! @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
4
4
|
//! @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
@@ -72,23 +72,17 @@ function messageForDateTimeParseException(message, text, index, cause) {
|
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
function
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
_setPrototypeOf(subClass, superClass);
|
|
75
|
+
function _assertThisInitialized(e) {
|
|
76
|
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
77
|
+
return e;
|
|
79
78
|
}
|
|
80
|
-
function
|
|
81
|
-
|
|
82
|
-
o.__proto__ = p;
|
|
83
|
-
return o;
|
|
84
|
-
};
|
|
85
|
-
return _setPrototypeOf(o, p);
|
|
79
|
+
function _inheritsLoose(t, o) {
|
|
80
|
+
t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
|
|
86
81
|
}
|
|
87
|
-
function
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
return self;
|
|
82
|
+
function _setPrototypeOf(t, e) {
|
|
83
|
+
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
|
84
|
+
return t.__proto__ = e, t;
|
|
85
|
+
}, _setPrototypeOf(t, e);
|
|
92
86
|
}
|
|
93
87
|
|
|
94
88
|
/**
|
|
@@ -207,18 +201,10 @@ var MathUtil = function () {
|
|
|
207
201
|
}
|
|
208
202
|
return r;
|
|
209
203
|
};
|
|
210
|
-
MathUtil.parseInt = function (
|
|
211
|
-
function parseInt(_x) {
|
|
212
|
-
return _parseInt.apply(this, arguments);
|
|
213
|
-
}
|
|
214
|
-
parseInt.toString = function () {
|
|
215
|
-
return _parseInt.toString();
|
|
216
|
-
};
|
|
217
|
-
return parseInt;
|
|
218
|
-
}(function (value) {
|
|
204
|
+
MathUtil.parseInt = function (value) {
|
|
219
205
|
var r = parseInt(value);
|
|
220
206
|
return MathUtil.safeToInt(r);
|
|
221
|
-
}
|
|
207
|
+
};
|
|
222
208
|
MathUtil.safeToInt = function safeToInt(value) {
|
|
223
209
|
MathUtil.verifyInt(value);
|
|
224
210
|
return MathUtil.safeZero(value);
|
|
@@ -365,7 +351,6 @@ var TemporalUnit = function () {
|
|
|
365
351
|
}();
|
|
366
352
|
|
|
367
353
|
var Duration = function (_TemporalAmount) {
|
|
368
|
-
_inheritsLoose(Duration, _TemporalAmount);
|
|
369
354
|
function Duration(seconds, nanos) {
|
|
370
355
|
var _this;
|
|
371
356
|
_this = _TemporalAmount.call(this) || this;
|
|
@@ -373,6 +358,7 @@ var Duration = function (_TemporalAmount) {
|
|
|
373
358
|
_this._nanos = MathUtil.safeToInt(nanos);
|
|
374
359
|
return _this;
|
|
375
360
|
}
|
|
361
|
+
_inheritsLoose(Duration, _TemporalAmount);
|
|
376
362
|
Duration.ofDays = function ofDays(days) {
|
|
377
363
|
return Duration._create(MathUtil.safeMultiply(days, LocalTime.SECONDS_PER_DAY), 0);
|
|
378
364
|
};
|
|
@@ -763,9 +749,12 @@ var Duration = function (_TemporalAmount) {
|
|
|
763
749
|
if (this === Duration.ZERO) {
|
|
764
750
|
return 'PT0S';
|
|
765
751
|
}
|
|
766
|
-
var
|
|
767
|
-
var
|
|
768
|
-
var
|
|
752
|
+
var negativeFraction = this._seconds < 0 && this._nanos > 0;
|
|
753
|
+
var wholeSeconds = negativeFraction ? this._seconds + 1 : this._seconds;
|
|
754
|
+
var fractionNanos = negativeFraction ? LocalTime.NANOS_PER_SECOND - this._nanos : this._nanos;
|
|
755
|
+
var hours = MathUtil.intDiv(wholeSeconds, LocalTime.SECONDS_PER_HOUR);
|
|
756
|
+
var minutes = MathUtil.intDiv(MathUtil.intMod(wholeSeconds, LocalTime.SECONDS_PER_HOUR), LocalTime.SECONDS_PER_MINUTE);
|
|
757
|
+
var secs = MathUtil.intMod(wholeSeconds, LocalTime.SECONDS_PER_MINUTE);
|
|
769
758
|
var rval = 'PT';
|
|
770
759
|
if (hours !== 0) {
|
|
771
760
|
rval += hours + "H";
|
|
@@ -773,31 +762,23 @@ var Duration = function (_TemporalAmount) {
|
|
|
773
762
|
if (minutes !== 0) {
|
|
774
763
|
rval += minutes + "M";
|
|
775
764
|
}
|
|
776
|
-
if (secs === 0 &&
|
|
765
|
+
if (secs === 0 && fractionNanos === 0 && rval.length > 2) {
|
|
777
766
|
return rval;
|
|
778
767
|
}
|
|
779
|
-
if (secs
|
|
780
|
-
|
|
781
|
-
rval += '-0';
|
|
782
|
-
} else {
|
|
783
|
-
rval += secs + 1;
|
|
784
|
-
}
|
|
768
|
+
if (secs === 0 && negativeFraction) {
|
|
769
|
+
rval += '-0';
|
|
785
770
|
} else {
|
|
786
|
-
rval += secs;
|
|
771
|
+
rval += "" + secs;
|
|
787
772
|
}
|
|
788
|
-
if (
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
nanoString = "" + (2 * LocalTime.NANOS_PER_SECOND - this._nanos);
|
|
793
|
-
} else {
|
|
794
|
-
nanoString = "" + (LocalTime.NANOS_PER_SECOND + this._nanos);
|
|
773
|
+
if (fractionNanos > 0) {
|
|
774
|
+
var fraction = "" + fractionNanos;
|
|
775
|
+
while (fraction.length < 9) {
|
|
776
|
+
fraction = "0" + fraction;
|
|
795
777
|
}
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
while (rval.charAt(rval.length - 1) === '0') {
|
|
799
|
-
rval = rval.slice(0, rval.length - 1);
|
|
778
|
+
while (fraction.charAt(fraction.length - 1) === '0') {
|
|
779
|
+
fraction = fraction.slice(0, fraction.length - 1);
|
|
800
780
|
}
|
|
781
|
+
rval += "." + fraction;
|
|
801
782
|
}
|
|
802
783
|
rval += 'S';
|
|
803
784
|
return rval;
|
|
@@ -821,7 +802,6 @@ function _init$m() {
|
|
|
821
802
|
}
|
|
822
803
|
|
|
823
804
|
var ChronoUnit = function (_TemporalUnit) {
|
|
824
|
-
_inheritsLoose(ChronoUnit, _TemporalUnit);
|
|
825
805
|
function ChronoUnit(name, estimatedDuration) {
|
|
826
806
|
var _this;
|
|
827
807
|
_this = _TemporalUnit.call(this) || this;
|
|
@@ -829,6 +809,7 @@ var ChronoUnit = function (_TemporalUnit) {
|
|
|
829
809
|
_this._duration = estimatedDuration;
|
|
830
810
|
return _this;
|
|
831
811
|
}
|
|
812
|
+
_inheritsLoose(ChronoUnit, _TemporalUnit);
|
|
832
813
|
var _proto = ChronoUnit.prototype;
|
|
833
814
|
_proto.duration = function duration() {
|
|
834
815
|
return this._duration;
|
|
@@ -1030,6 +1011,15 @@ var ValueRange = function () {
|
|
|
1030
1011
|
}();
|
|
1031
1012
|
|
|
1032
1013
|
var ChronoField = function (_TemporalField) {
|
|
1014
|
+
function ChronoField(name, baseUnit, rangeUnit, range) {
|
|
1015
|
+
var _this;
|
|
1016
|
+
_this = _TemporalField.call(this) || this;
|
|
1017
|
+
_this._name = name;
|
|
1018
|
+
_this._baseUnit = baseUnit;
|
|
1019
|
+
_this._rangeUnit = rangeUnit;
|
|
1020
|
+
_this._range = range;
|
|
1021
|
+
return _this;
|
|
1022
|
+
}
|
|
1033
1023
|
_inheritsLoose(ChronoField, _TemporalField);
|
|
1034
1024
|
ChronoField.byName = function byName(fieldName) {
|
|
1035
1025
|
for (var prop in ChronoField) {
|
|
@@ -1040,15 +1030,6 @@ var ChronoField = function (_TemporalField) {
|
|
|
1040
1030
|
}
|
|
1041
1031
|
}
|
|
1042
1032
|
};
|
|
1043
|
-
function ChronoField(name, baseUnit, rangeUnit, range) {
|
|
1044
|
-
var _this;
|
|
1045
|
-
_this = _TemporalField.call(this) || this;
|
|
1046
|
-
_this._name = name;
|
|
1047
|
-
_this._baseUnit = baseUnit;
|
|
1048
|
-
_this._rangeUnit = rangeUnit;
|
|
1049
|
-
_this._range = range;
|
|
1050
|
-
return _this;
|
|
1051
|
-
}
|
|
1052
1033
|
var _proto = ChronoField.prototype;
|
|
1053
1034
|
_proto.name = function name() {
|
|
1054
1035
|
return this._name;
|
|
@@ -1199,10 +1180,10 @@ var TemporalAccessor = function () {
|
|
|
1199
1180
|
}();
|
|
1200
1181
|
|
|
1201
1182
|
var TemporalQuery = function (_Enum) {
|
|
1202
|
-
_inheritsLoose(TemporalQuery, _Enum);
|
|
1203
1183
|
function TemporalQuery() {
|
|
1204
1184
|
return _Enum.apply(this, arguments) || this;
|
|
1205
1185
|
}
|
|
1186
|
+
_inheritsLoose(TemporalQuery, _Enum);
|
|
1206
1187
|
var _proto = TemporalQuery.prototype;
|
|
1207
1188
|
_proto.queryFrom = function queryFrom(temporal) {
|
|
1208
1189
|
abstractMethodFail('queryFrom');
|
|
@@ -1211,10 +1192,10 @@ var TemporalQuery = function (_Enum) {
|
|
|
1211
1192
|
}(Enum);
|
|
1212
1193
|
function createTemporalQuery(name, queryFromFunction) {
|
|
1213
1194
|
var ExtendedTemporalQuery = function (_TemporalQuery) {
|
|
1214
|
-
_inheritsLoose(ExtendedTemporalQuery, _TemporalQuery);
|
|
1215
1195
|
function ExtendedTemporalQuery() {
|
|
1216
1196
|
return _TemporalQuery.apply(this, arguments) || this;
|
|
1217
1197
|
}
|
|
1198
|
+
_inheritsLoose(ExtendedTemporalQuery, _TemporalQuery);
|
|
1218
1199
|
return ExtendedTemporalQuery;
|
|
1219
1200
|
}(TemporalQuery);
|
|
1220
1201
|
ExtendedTemporalQuery.prototype.queryFrom = queryFromFunction;
|
|
@@ -1222,7 +1203,6 @@ function createTemporalQuery(name, queryFromFunction) {
|
|
|
1222
1203
|
}
|
|
1223
1204
|
|
|
1224
1205
|
var DayOfWeek = function (_TemporalAccessor) {
|
|
1225
|
-
_inheritsLoose(DayOfWeek, _TemporalAccessor);
|
|
1226
1206
|
function DayOfWeek(ordinal, name) {
|
|
1227
1207
|
var _this;
|
|
1228
1208
|
_this = _TemporalAccessor.call(this) || this;
|
|
@@ -1230,6 +1210,7 @@ var DayOfWeek = function (_TemporalAccessor) {
|
|
|
1230
1210
|
_this._name = name;
|
|
1231
1211
|
return _this;
|
|
1232
1212
|
}
|
|
1213
|
+
_inheritsLoose(DayOfWeek, _TemporalAccessor);
|
|
1233
1214
|
var _proto = DayOfWeek.prototype;
|
|
1234
1215
|
_proto.ordinal = function ordinal() {
|
|
1235
1216
|
return this._ordinal;
|
|
@@ -1356,7 +1337,6 @@ function _init$j() {
|
|
|
1356
1337
|
}
|
|
1357
1338
|
|
|
1358
1339
|
var Month = function (_TemporalAccessor) {
|
|
1359
|
-
_inheritsLoose(Month, _TemporalAccessor);
|
|
1360
1340
|
function Month(value, name) {
|
|
1361
1341
|
var _this;
|
|
1362
1342
|
_this = _TemporalAccessor.call(this) || this;
|
|
@@ -1364,6 +1344,7 @@ var Month = function (_TemporalAccessor) {
|
|
|
1364
1344
|
_this._name = name;
|
|
1365
1345
|
return _this;
|
|
1366
1346
|
}
|
|
1347
|
+
_inheritsLoose(Month, _TemporalAccessor);
|
|
1367
1348
|
var _proto = Month.prototype;
|
|
1368
1349
|
_proto.value = function value() {
|
|
1369
1350
|
return this._value;
|
|
@@ -1601,7 +1582,6 @@ function _init$i() {
|
|
|
1601
1582
|
|
|
1602
1583
|
var PATTERN = /([-+]?)P(?:([-+]?[0-9]+)Y)?(?:([-+]?[0-9]+)M)?(?:([-+]?[0-9]+)W)?(?:([-+]?[0-9]+)D)?/;
|
|
1603
1584
|
var Period = function (_TemporalAmount) {
|
|
1604
|
-
_inheritsLoose(Period, _TemporalAmount);
|
|
1605
1585
|
function Period(years, months, days) {
|
|
1606
1586
|
var _this;
|
|
1607
1587
|
_this = _TemporalAmount.call(this) || this;
|
|
@@ -1613,7 +1593,7 @@ var Period = function (_TemporalAmount) {
|
|
|
1613
1593
|
_this._years = _years;
|
|
1614
1594
|
_this._months = _months;
|
|
1615
1595
|
_this._days = _days;
|
|
1616
|
-
Period.ZERO =
|
|
1596
|
+
Period.ZERO = _this;
|
|
1617
1597
|
}
|
|
1618
1598
|
return Period.ZERO || _assertThisInitialized(_this);
|
|
1619
1599
|
}
|
|
@@ -1622,6 +1602,7 @@ var Period = function (_TemporalAmount) {
|
|
|
1622
1602
|
_this._days = _days;
|
|
1623
1603
|
return _this;
|
|
1624
1604
|
}
|
|
1605
|
+
_inheritsLoose(Period, _TemporalAmount);
|
|
1625
1606
|
Period.ofYears = function ofYears(years) {
|
|
1626
1607
|
return Period.create(years, 0, 0);
|
|
1627
1608
|
};
|
|
@@ -1965,10 +1946,10 @@ function _init$h() {
|
|
|
1965
1946
|
}();
|
|
1966
1947
|
|
|
1967
1948
|
var ResolverStyle = function (_Enum) {
|
|
1968
|
-
_inheritsLoose(ResolverStyle, _Enum);
|
|
1969
1949
|
function ResolverStyle() {
|
|
1970
1950
|
return _Enum.apply(this, arguments) || this;
|
|
1971
1951
|
}
|
|
1952
|
+
_inheritsLoose(ResolverStyle, _Enum);
|
|
1972
1953
|
return ResolverStyle;
|
|
1973
1954
|
}(Enum);
|
|
1974
1955
|
ResolverStyle.STRICT = new ResolverStyle('STRICT');
|
|
@@ -1976,10 +1957,10 @@ ResolverStyle.SMART = new ResolverStyle('SMART');
|
|
|
1976
1957
|
ResolverStyle.LENIENT = new ResolverStyle('LENIENT');
|
|
1977
1958
|
|
|
1978
1959
|
var Temporal = function (_TemporalAccessor) {
|
|
1979
|
-
_inheritsLoose(Temporal, _TemporalAccessor);
|
|
1980
1960
|
function Temporal() {
|
|
1981
1961
|
return _TemporalAccessor.apply(this, arguments) || this;
|
|
1982
1962
|
}
|
|
1963
|
+
_inheritsLoose(Temporal, _TemporalAccessor);
|
|
1983
1964
|
var _proto = Temporal.prototype;
|
|
1984
1965
|
_proto.isSupported = function isSupported(fieldOrUnit) {
|
|
1985
1966
|
abstractMethodFail('isSupported');
|
|
@@ -2047,10 +2028,10 @@ if (typeof Symbol !== 'undefined' && Symbol.toPrimitive) {
|
|
|
2047
2028
|
}
|
|
2048
2029
|
|
|
2049
2030
|
var ChronoLocalDate = function (_Temporal) {
|
|
2050
|
-
_inheritsLoose(ChronoLocalDate, _Temporal);
|
|
2051
2031
|
function ChronoLocalDate() {
|
|
2052
2032
|
return _Temporal.apply(this, arguments) || this;
|
|
2053
2033
|
}
|
|
2034
|
+
_inheritsLoose(ChronoLocalDate, _Temporal);
|
|
2054
2035
|
var _proto = ChronoLocalDate.prototype;
|
|
2055
2036
|
_proto.isSupported = function isSupported(fieldOrUnit) {
|
|
2056
2037
|
if (fieldOrUnit instanceof ChronoField) {
|
|
@@ -2232,13 +2213,13 @@ var ZoneRules = function () {
|
|
|
2232
2213
|
return ZoneRules;
|
|
2233
2214
|
}();
|
|
2234
2215
|
var Fixed = function (_ZoneRules) {
|
|
2235
|
-
_inheritsLoose(Fixed, _ZoneRules);
|
|
2236
2216
|
function Fixed(offset) {
|
|
2237
2217
|
var _this;
|
|
2238
2218
|
_this = _ZoneRules.call(this) || this;
|
|
2239
2219
|
_this._offset = offset;
|
|
2240
2220
|
return _this;
|
|
2241
2221
|
}
|
|
2222
|
+
_inheritsLoose(Fixed, _ZoneRules);
|
|
2242
2223
|
var _proto2 = Fixed.prototype;
|
|
2243
2224
|
_proto2.isFixedOffset = function isFixedOffset() {
|
|
2244
2225
|
return true;
|
|
@@ -2300,16 +2281,16 @@ var Fixed = function (_ZoneRules) {
|
|
|
2300
2281
|
var SECONDS_CACHE = {};
|
|
2301
2282
|
var ID_CACHE = {};
|
|
2302
2283
|
var ZoneOffset = function (_ZoneId) {
|
|
2303
|
-
_inheritsLoose(ZoneOffset, _ZoneId);
|
|
2304
2284
|
function ZoneOffset(totalSeconds) {
|
|
2305
2285
|
var _this;
|
|
2306
2286
|
_this = _ZoneId.call(this) || this;
|
|
2307
2287
|
ZoneOffset._validateTotalSeconds(totalSeconds);
|
|
2308
2288
|
_this._totalSeconds = MathUtil.safeToInt(totalSeconds);
|
|
2309
|
-
_this._rules = ZoneRules.of(
|
|
2289
|
+
_this._rules = ZoneRules.of(_this);
|
|
2310
2290
|
_this._id = ZoneOffset._buildId(totalSeconds);
|
|
2311
2291
|
return _this;
|
|
2312
2292
|
}
|
|
2293
|
+
_inheritsLoose(ZoneOffset, _ZoneId);
|
|
2313
2294
|
var _proto = ZoneOffset.prototype;
|
|
2314
2295
|
_proto.totalSeconds = function totalSeconds() {
|
|
2315
2296
|
return this._totalSeconds;
|
|
@@ -2505,12 +2486,6 @@ function _init$g() {
|
|
|
2505
2486
|
}
|
|
2506
2487
|
|
|
2507
2488
|
var DateTimeBuilder = function (_TemporalAccessor) {
|
|
2508
|
-
_inheritsLoose(DateTimeBuilder, _TemporalAccessor);
|
|
2509
|
-
DateTimeBuilder.create = function create(field, value) {
|
|
2510
|
-
var dtb = new DateTimeBuilder();
|
|
2511
|
-
dtb._addFieldValue(field, value);
|
|
2512
|
-
return dtb;
|
|
2513
|
-
};
|
|
2514
2489
|
function DateTimeBuilder() {
|
|
2515
2490
|
var _this;
|
|
2516
2491
|
_this = _TemporalAccessor.call(this) || this;
|
|
@@ -2523,6 +2498,12 @@ var DateTimeBuilder = function (_TemporalAccessor) {
|
|
|
2523
2498
|
_this.excessDays = null;
|
|
2524
2499
|
return _this;
|
|
2525
2500
|
}
|
|
2501
|
+
_inheritsLoose(DateTimeBuilder, _TemporalAccessor);
|
|
2502
|
+
DateTimeBuilder.create = function create(field, value) {
|
|
2503
|
+
var dtb = new DateTimeBuilder();
|
|
2504
|
+
dtb._addFieldValue(field, value);
|
|
2505
|
+
return dtb;
|
|
2506
|
+
};
|
|
2526
2507
|
var _proto = DateTimeBuilder.prototype;
|
|
2527
2508
|
_proto.getFieldValue0 = function getFieldValue0(field) {
|
|
2528
2509
|
return this.fieldValues.get(field);
|
|
@@ -2960,7 +2941,6 @@ var DateTimeParseContext = function () {
|
|
|
2960
2941
|
return DateTimeParseContext;
|
|
2961
2942
|
}();
|
|
2962
2943
|
var Parsed = function (_Temporal) {
|
|
2963
|
-
_inheritsLoose(Parsed, _Temporal);
|
|
2964
2944
|
function Parsed(dateTimeParseContext) {
|
|
2965
2945
|
var _this;
|
|
2966
2946
|
_this = _Temporal.call(this) || this;
|
|
@@ -2968,9 +2948,11 @@ var Parsed = function (_Temporal) {
|
|
|
2968
2948
|
_this.zone = null;
|
|
2969
2949
|
_this.fieldValues = new EnumMap();
|
|
2970
2950
|
_this.leapSecond = false;
|
|
2951
|
+
_this.excessDays = Period.ZERO;
|
|
2971
2952
|
_this.dateTimeParseContext = dateTimeParseContext;
|
|
2972
2953
|
return _this;
|
|
2973
2954
|
}
|
|
2955
|
+
_inheritsLoose(Parsed, _Temporal);
|
|
2974
2956
|
var _proto2 = Parsed.prototype;
|
|
2975
2957
|
_proto2.copy = function copy() {
|
|
2976
2958
|
var cloned = new Parsed();
|
|
@@ -3084,10 +3066,10 @@ var DateTimePrintContext = function () {
|
|
|
3084
3066
|
var IsoFields = {};
|
|
3085
3067
|
var QUARTER_DAYS = [0, 90, 181, 273, 0, 91, 182, 274];
|
|
3086
3068
|
var Field = function (_TemporalField) {
|
|
3087
|
-
_inheritsLoose(Field, _TemporalField);
|
|
3088
3069
|
function Field() {
|
|
3089
3070
|
return _TemporalField.apply(this, arguments) || this;
|
|
3090
3071
|
}
|
|
3072
|
+
_inheritsLoose(Field, _TemporalField);
|
|
3091
3073
|
var _proto = Field.prototype;
|
|
3092
3074
|
_proto.isDateBased = function isDateBased() {
|
|
3093
3075
|
return true;
|
|
@@ -3159,10 +3141,10 @@ var Field = function (_TemporalField) {
|
|
|
3159
3141
|
return Field;
|
|
3160
3142
|
}(TemporalField);
|
|
3161
3143
|
var DAY_OF_QUARTER_FIELD = function (_Field) {
|
|
3162
|
-
_inheritsLoose(DAY_OF_QUARTER_FIELD, _Field);
|
|
3163
3144
|
function DAY_OF_QUARTER_FIELD() {
|
|
3164
3145
|
return _Field.apply(this, arguments) || this;
|
|
3165
3146
|
}
|
|
3147
|
+
_inheritsLoose(DAY_OF_QUARTER_FIELD, _Field);
|
|
3166
3148
|
var _proto2 = DAY_OF_QUARTER_FIELD.prototype;
|
|
3167
3149
|
_proto2.toString = function toString() {
|
|
3168
3150
|
return 'DayOfQuarter';
|
|
@@ -3245,10 +3227,10 @@ var DAY_OF_QUARTER_FIELD = function (_Field) {
|
|
|
3245
3227
|
return DAY_OF_QUARTER_FIELD;
|
|
3246
3228
|
}(Field);
|
|
3247
3229
|
var QUARTER_OF_YEAR_FIELD = function (_Field2) {
|
|
3248
|
-
_inheritsLoose(QUARTER_OF_YEAR_FIELD, _Field2);
|
|
3249
3230
|
function QUARTER_OF_YEAR_FIELD() {
|
|
3250
3231
|
return _Field2.apply(this, arguments) || this;
|
|
3251
3232
|
}
|
|
3233
|
+
_inheritsLoose(QUARTER_OF_YEAR_FIELD, _Field2);
|
|
3252
3234
|
var _proto3 = QUARTER_OF_YEAR_FIELD.prototype;
|
|
3253
3235
|
_proto3.toString = function toString() {
|
|
3254
3236
|
return 'QuarterOfYear';
|
|
@@ -3283,10 +3265,10 @@ var QUARTER_OF_YEAR_FIELD = function (_Field2) {
|
|
|
3283
3265
|
return QUARTER_OF_YEAR_FIELD;
|
|
3284
3266
|
}(Field);
|
|
3285
3267
|
var WEEK_OF_WEEK_BASED_YEAR_FIELD = function (_Field3) {
|
|
3286
|
-
_inheritsLoose(WEEK_OF_WEEK_BASED_YEAR_FIELD, _Field3);
|
|
3287
3268
|
function WEEK_OF_WEEK_BASED_YEAR_FIELD() {
|
|
3288
3269
|
return _Field3.apply(this, arguments) || this;
|
|
3289
3270
|
}
|
|
3271
|
+
_inheritsLoose(WEEK_OF_WEEK_BASED_YEAR_FIELD, _Field3);
|
|
3290
3272
|
var _proto4 = WEEK_OF_WEEK_BASED_YEAR_FIELD.prototype;
|
|
3291
3273
|
_proto4.toString = function toString() {
|
|
3292
3274
|
return 'WeekOfWeekBasedYear';
|
|
@@ -3361,10 +3343,10 @@ var WEEK_OF_WEEK_BASED_YEAR_FIELD = function (_Field3) {
|
|
|
3361
3343
|
return WEEK_OF_WEEK_BASED_YEAR_FIELD;
|
|
3362
3344
|
}(Field);
|
|
3363
3345
|
var WEEK_BASED_YEAR_FIELD = function (_Field4) {
|
|
3364
|
-
_inheritsLoose(WEEK_BASED_YEAR_FIELD, _Field4);
|
|
3365
3346
|
function WEEK_BASED_YEAR_FIELD() {
|
|
3366
3347
|
return _Field4.apply(this, arguments) || this;
|
|
3367
3348
|
}
|
|
3349
|
+
_inheritsLoose(WEEK_BASED_YEAR_FIELD, _Field4);
|
|
3368
3350
|
var _proto5 = WEEK_BASED_YEAR_FIELD.prototype;
|
|
3369
3351
|
_proto5.toString = function toString() {
|
|
3370
3352
|
return 'WeekBasedYear';
|
|
@@ -3409,7 +3391,6 @@ var WEEK_BASED_YEAR_FIELD = function (_Field4) {
|
|
|
3409
3391
|
return WEEK_BASED_YEAR_FIELD;
|
|
3410
3392
|
}(Field);
|
|
3411
3393
|
var Unit = function (_TemporalUnit) {
|
|
3412
|
-
_inheritsLoose(Unit, _TemporalUnit);
|
|
3413
3394
|
function Unit(name, estimatedDuration) {
|
|
3414
3395
|
var _this;
|
|
3415
3396
|
_this = _TemporalUnit.call(this) || this;
|
|
@@ -3417,6 +3398,7 @@ var Unit = function (_TemporalUnit) {
|
|
|
3417
3398
|
_this._duration = estimatedDuration;
|
|
3418
3399
|
return _this;
|
|
3419
3400
|
}
|
|
3401
|
+
_inheritsLoose(Unit, _TemporalUnit);
|
|
3420
3402
|
var _proto6 = Unit.prototype;
|
|
3421
3403
|
_proto6.duration = function duration() {
|
|
3422
3404
|
return this._duration;
|
|
@@ -3580,10 +3562,10 @@ var DecimalStyle = function () {
|
|
|
3580
3562
|
DecimalStyle.STANDARD = new DecimalStyle('0', '+', '-', '.');
|
|
3581
3563
|
|
|
3582
3564
|
var SignStyle = function (_Enum) {
|
|
3583
|
-
_inheritsLoose(SignStyle, _Enum);
|
|
3584
3565
|
function SignStyle() {
|
|
3585
3566
|
return _Enum.apply(this, arguments) || this;
|
|
3586
3567
|
}
|
|
3568
|
+
_inheritsLoose(SignStyle, _Enum);
|
|
3587
3569
|
var _proto = SignStyle.prototype;
|
|
3588
3570
|
_proto.parse = function parse(positive, strict, fixedWidth) {
|
|
3589
3571
|
switch (this) {
|
|
@@ -3605,10 +3587,10 @@ SignStyle.EXCEEDS_PAD = new SignStyle('EXCEEDS_PAD');
|
|
|
3605
3587
|
SignStyle.NOT_NEGATIVE = new SignStyle('NOT_NEGATIVE');
|
|
3606
3588
|
|
|
3607
3589
|
var TextStyle = function (_Enum) {
|
|
3608
|
-
_inheritsLoose(TextStyle, _Enum);
|
|
3609
3590
|
function TextStyle() {
|
|
3610
3591
|
return _Enum.apply(this, arguments) || this;
|
|
3611
3592
|
}
|
|
3593
|
+
_inheritsLoose(TextStyle, _Enum);
|
|
3612
3594
|
var _proto = TextStyle.prototype;
|
|
3613
3595
|
_proto.isStandalone = function isStandalone() {
|
|
3614
3596
|
switch (this) {
|
|
@@ -4069,7 +4051,6 @@ var NumberPrinterParser = function () {
|
|
|
4069
4051
|
return NumberPrinterParser;
|
|
4070
4052
|
}();
|
|
4071
4053
|
var ReducedPrinterParser = function (_NumberPrinterParser) {
|
|
4072
|
-
_inheritsLoose(ReducedPrinterParser, _NumberPrinterParser);
|
|
4073
4054
|
function ReducedPrinterParser(field, width, maxWidth, baseValue, baseDate) {
|
|
4074
4055
|
var _this;
|
|
4075
4056
|
_this = _NumberPrinterParser.call(this, field, width, maxWidth, SignStyle.NOT_NEGATIVE) || this;
|
|
@@ -4094,6 +4075,7 @@ var ReducedPrinterParser = function (_NumberPrinterParser) {
|
|
|
4094
4075
|
_this._baseDate = baseDate;
|
|
4095
4076
|
return _this;
|
|
4096
4077
|
}
|
|
4078
|
+
_inheritsLoose(ReducedPrinterParser, _NumberPrinterParser);
|
|
4097
4079
|
var _proto2 = ReducedPrinterParser.prototype;
|
|
4098
4080
|
_proto2._getValue = function _getValue(context, value) {
|
|
4099
4081
|
var absValue = Math.abs(value);
|
|
@@ -4330,10 +4312,10 @@ var PadPrinterParserDecorator = function () {
|
|
|
4330
4312
|
}();
|
|
4331
4313
|
|
|
4332
4314
|
var SettingsParser = function (_Enum) {
|
|
4333
|
-
_inheritsLoose(SettingsParser, _Enum);
|
|
4334
4315
|
function SettingsParser() {
|
|
4335
4316
|
return _Enum.apply(this, arguments) || this;
|
|
4336
4317
|
}
|
|
4318
|
+
_inheritsLoose(SettingsParser, _Enum);
|
|
4337
4319
|
var _proto = SettingsParser.prototype;
|
|
4338
4320
|
_proto.print = function print() {
|
|
4339
4321
|
return true;
|
|
@@ -4422,11 +4404,6 @@ var ZoneRulesProvider = function () {
|
|
|
4422
4404
|
}();
|
|
4423
4405
|
|
|
4424
4406
|
var ZoneRegion = function (_ZoneId) {
|
|
4425
|
-
_inheritsLoose(ZoneRegion, _ZoneId);
|
|
4426
|
-
ZoneRegion.ofId = function ofId(zoneId) {
|
|
4427
|
-
var rules = ZoneRulesProvider.getRules(zoneId);
|
|
4428
|
-
return new ZoneRegion(zoneId, rules);
|
|
4429
|
-
};
|
|
4430
4407
|
function ZoneRegion(id, rules) {
|
|
4431
4408
|
var _this;
|
|
4432
4409
|
_this = _ZoneId.call(this) || this;
|
|
@@ -4434,6 +4411,11 @@ var ZoneRegion = function (_ZoneId) {
|
|
|
4434
4411
|
_this._rules = rules;
|
|
4435
4412
|
return _this;
|
|
4436
4413
|
}
|
|
4414
|
+
_inheritsLoose(ZoneRegion, _ZoneId);
|
|
4415
|
+
ZoneRegion.ofId = function ofId(zoneId) {
|
|
4416
|
+
var rules = ZoneRulesProvider.getRules(zoneId);
|
|
4417
|
+
return new ZoneRegion(zoneId, rules);
|
|
4418
|
+
};
|
|
4437
4419
|
var _proto = ZoneRegion.prototype;
|
|
4438
4420
|
_proto.id = function id() {
|
|
4439
4421
|
return this._id;
|
|
@@ -4472,6 +4454,45 @@ var ZoneIdPrinterParser = function () {
|
|
|
4472
4454
|
if (position === length) {
|
|
4473
4455
|
return ~position;
|
|
4474
4456
|
}
|
|
4457
|
+
var region = this._parseRegion(text, position);
|
|
4458
|
+
var fixedEndPos = this._parseFixedId(context, text, position);
|
|
4459
|
+
var fixedLength = fixedEndPos >= 0 ? fixedEndPos - position : 0;
|
|
4460
|
+
if (region != null && region.parseLength > fixedLength) {
|
|
4461
|
+
context.setParsedZone(ZoneRegion.ofId(region.parsedZoneId));
|
|
4462
|
+
return position + region.parseLength;
|
|
4463
|
+
}
|
|
4464
|
+
return fixedEndPos;
|
|
4465
|
+
};
|
|
4466
|
+
_proto._parseRegion = function _parseRegion(text, position) {
|
|
4467
|
+
var availableZoneIds = ZoneRulesProvider.getAvailableZoneIds();
|
|
4468
|
+
if (availableZoneIds.length === 0) {
|
|
4469
|
+
return null;
|
|
4470
|
+
}
|
|
4471
|
+
if (zoneIdTree.size !== availableZoneIds.length) {
|
|
4472
|
+
zoneIdTree = ZoneIdTree.createTreeMap(availableZoneIds);
|
|
4473
|
+
}
|
|
4474
|
+
var maxParseLength = text.length - position;
|
|
4475
|
+
var treeMap = zoneIdTree.treeMap;
|
|
4476
|
+
var parsedZoneId = null;
|
|
4477
|
+
var parseLength = 0;
|
|
4478
|
+
while (treeMap != null) {
|
|
4479
|
+
var parsedSubZoneId = text.substr(position, Math.min(treeMap.length, maxParseLength));
|
|
4480
|
+
treeMap = treeMap.get(parsedSubZoneId);
|
|
4481
|
+
if (treeMap != null && treeMap.isLeaf) {
|
|
4482
|
+
parsedZoneId = parsedSubZoneId;
|
|
4483
|
+
parseLength = treeMap.length;
|
|
4484
|
+
}
|
|
4485
|
+
}
|
|
4486
|
+
if (parsedZoneId == null) {
|
|
4487
|
+
return null;
|
|
4488
|
+
}
|
|
4489
|
+
return {
|
|
4490
|
+
parsedZoneId: parsedZoneId,
|
|
4491
|
+
parseLength: parseLength
|
|
4492
|
+
};
|
|
4493
|
+
};
|
|
4494
|
+
_proto._parseFixedId = function _parseFixedId(context, text, position) {
|
|
4495
|
+
var length = text.length;
|
|
4475
4496
|
var nextChar = text.charAt(position);
|
|
4476
4497
|
if (nextChar === '+' || nextChar === '-') {
|
|
4477
4498
|
var newContext = context.copy();
|
|
@@ -4480,8 +4501,7 @@ var ZoneIdPrinterParser = function () {
|
|
|
4480
4501
|
return endPos;
|
|
4481
4502
|
}
|
|
4482
4503
|
var offset = newContext.getParsed(ChronoField.OFFSET_SECONDS);
|
|
4483
|
-
|
|
4484
|
-
context.setParsedZone(zone);
|
|
4504
|
+
context.setParsedZone(ZoneOffset.ofTotalSeconds(offset));
|
|
4485
4505
|
return endPos;
|
|
4486
4506
|
} else if (length >= position + 2) {
|
|
4487
4507
|
var nextNextChar = text.charAt(position + 1);
|
|
@@ -4502,26 +4522,6 @@ var ZoneIdPrinterParser = function () {
|
|
|
4502
4522
|
context.setParsedZone(ZoneOffset.UTC);
|
|
4503
4523
|
return position + 1;
|
|
4504
4524
|
}
|
|
4505
|
-
var availableZoneIds = ZoneRulesProvider.getAvailableZoneIds();
|
|
4506
|
-
if (zoneIdTree.size !== availableZoneIds.length) {
|
|
4507
|
-
zoneIdTree = ZoneIdTree.createTreeMap(availableZoneIds);
|
|
4508
|
-
}
|
|
4509
|
-
var maxParseLength = length - position;
|
|
4510
|
-
var treeMap = zoneIdTree.treeMap;
|
|
4511
|
-
var parsedZoneId = null;
|
|
4512
|
-
var parseLength = 0;
|
|
4513
|
-
while (treeMap != null) {
|
|
4514
|
-
var parsedSubZoneId = text.substr(position, Math.min(treeMap.length, maxParseLength));
|
|
4515
|
-
treeMap = treeMap.get(parsedSubZoneId);
|
|
4516
|
-
if (treeMap != null && treeMap.isLeaf) {
|
|
4517
|
-
parsedZoneId = parsedSubZoneId;
|
|
4518
|
-
parseLength = treeMap.length;
|
|
4519
|
-
}
|
|
4520
|
-
}
|
|
4521
|
-
if (parsedZoneId != null) {
|
|
4522
|
-
context.setParsedZone(ZoneRegion.ofId(parsedZoneId));
|
|
4523
|
-
return position + parseLength;
|
|
4524
|
-
}
|
|
4525
4525
|
return ~position;
|
|
4526
4526
|
};
|
|
4527
4527
|
_proto._parsePrefixedOffset = function _parsePrefixedOffset(context, text, prefixPos, position) {
|
|
@@ -4547,6 +4547,10 @@ var ZoneIdPrinterParser = function () {
|
|
|
4547
4547
|
return ZoneIdPrinterParser;
|
|
4548
4548
|
}();
|
|
4549
4549
|
var ZoneIdTree = function () {
|
|
4550
|
+
function ZoneIdTree(size, treeMap) {
|
|
4551
|
+
this.size = size;
|
|
4552
|
+
this.treeMap = treeMap;
|
|
4553
|
+
}
|
|
4550
4554
|
ZoneIdTree.createTreeMap = function createTreeMap(availableZoneIds) {
|
|
4551
4555
|
var sortedZoneIds = availableZoneIds.sort(function (a, b) {
|
|
4552
4556
|
return a.length - b.length;
|
|
@@ -4557,10 +4561,6 @@ var ZoneIdTree = function () {
|
|
|
4557
4561
|
}
|
|
4558
4562
|
return new ZoneIdTree(sortedZoneIds.length, treeMap);
|
|
4559
4563
|
};
|
|
4560
|
-
function ZoneIdTree(size, treeMap) {
|
|
4561
|
-
this.size = size;
|
|
4562
|
-
this.treeMap = treeMap;
|
|
4563
|
-
}
|
|
4564
4564
|
return ZoneIdTree;
|
|
4565
4565
|
}();
|
|
4566
4566
|
var ZoneIdTreeMap = function () {
|
|
@@ -5245,7 +5245,7 @@ var InstantPrinterParser = function () {
|
|
|
5245
5245
|
var newContext = context.copy();
|
|
5246
5246
|
var minDigits = this.fractionalDigits < 0 ? 0 : this.fractionalDigits;
|
|
5247
5247
|
var maxDigits = this.fractionalDigits < 0 ? 9 : this.fractionalDigits;
|
|
5248
|
-
var parser = new DateTimeFormatterBuilder().append(DateTimeFormatter.ISO_LOCAL_DATE).appendLiteral('T').appendValue(ChronoField.HOUR_OF_DAY, 2).appendLiteral(':').appendValue(ChronoField.MINUTE_OF_HOUR, 2).appendLiteral(':').appendValue(ChronoField.SECOND_OF_MINUTE, 2).appendFraction(ChronoField.NANO_OF_SECOND, minDigits, maxDigits, true).
|
|
5248
|
+
var parser = new DateTimeFormatterBuilder().append(DateTimeFormatter.ISO_LOCAL_DATE).appendLiteral('T').appendValue(ChronoField.HOUR_OF_DAY, 2).appendLiteral(':').appendValue(ChronoField.MINUTE_OF_HOUR, 2).appendLiteral(':').appendValue(ChronoField.SECOND_OF_MINUTE, 2).appendFraction(ChronoField.NANO_OF_SECOND, minDigits, maxDigits, true).appendOffsetId().toFormatter()._toPrinterParser(false);
|
|
5249
5249
|
var pos = parser.parse(newContext, text, position);
|
|
5250
5250
|
if (pos < 0) {
|
|
5251
5251
|
return pos;
|
|
@@ -5257,6 +5257,8 @@ var InstantPrinterParser = function () {
|
|
|
5257
5257
|
var min = newContext.getParsed(ChronoField.MINUTE_OF_HOUR);
|
|
5258
5258
|
var secVal = newContext.getParsed(ChronoField.SECOND_OF_MINUTE);
|
|
5259
5259
|
var nanoVal = newContext.getParsed(ChronoField.NANO_OF_SECOND);
|
|
5260
|
+
var offsetSecs = newContext.getParsed(ChronoField.OFFSET_SECONDS);
|
|
5261
|
+
var offset = offsetSecs != null ? offsetSecs : 0;
|
|
5260
5262
|
var sec = secVal != null ? secVal : 0;
|
|
5261
5263
|
var nano = nanoVal != null ? nanoVal : 0;
|
|
5262
5264
|
var year = MathUtil.intMod(yearParsed, 10000);
|
|
@@ -5271,7 +5273,7 @@ var InstantPrinterParser = function () {
|
|
|
5271
5273
|
var instantSecs;
|
|
5272
5274
|
try {
|
|
5273
5275
|
var ldt = LocalDateTime.of(year, month, day, hour, min, sec, 0).plusDays(days);
|
|
5274
|
-
instantSecs = ldt.toEpochSecond(ZoneOffset.
|
|
5276
|
+
instantSecs = ldt.toEpochSecond(ZoneOffset.ofTotalSeconds(offset));
|
|
5275
5277
|
instantSecs += MathUtil.safeMultiply(MathUtil.intDiv(yearParsed, 10000), SECONDS_PER_10000_YEARS);
|
|
5276
5278
|
} catch (ex) {
|
|
5277
5279
|
return ~position;
|
|
@@ -5361,15 +5363,6 @@ function _init$e() {
|
|
|
5361
5363
|
*/
|
|
5362
5364
|
|
|
5363
5365
|
var DateTimeFormatter = function () {
|
|
5364
|
-
DateTimeFormatter.parsedExcessDays = function parsedExcessDays() {
|
|
5365
|
-
return DateTimeFormatter.PARSED_EXCESS_DAYS;
|
|
5366
|
-
};
|
|
5367
|
-
DateTimeFormatter.parsedLeapSecond = function parsedLeapSecond() {
|
|
5368
|
-
return DateTimeFormatter.PARSED_LEAP_SECOND;
|
|
5369
|
-
};
|
|
5370
|
-
DateTimeFormatter.ofPattern = function ofPattern(pattern) {
|
|
5371
|
-
return new DateTimeFormatterBuilder().appendPattern(pattern).toFormatter();
|
|
5372
|
-
};
|
|
5373
5366
|
function DateTimeFormatter(printerParser, locale, decimalStyle, resolverStyle, resolverFields, chrono, zone) {
|
|
5374
5367
|
if (chrono === void 0) {
|
|
5375
5368
|
chrono = IsoChronology.INSTANCE;
|
|
@@ -5385,6 +5378,15 @@ var DateTimeFormatter = function () {
|
|
|
5385
5378
|
this._chrono = chrono;
|
|
5386
5379
|
this._zone = zone;
|
|
5387
5380
|
}
|
|
5381
|
+
DateTimeFormatter.parsedExcessDays = function parsedExcessDays() {
|
|
5382
|
+
return DateTimeFormatter.PARSED_EXCESS_DAYS;
|
|
5383
|
+
};
|
|
5384
|
+
DateTimeFormatter.parsedLeapSecond = function parsedLeapSecond() {
|
|
5385
|
+
return DateTimeFormatter.PARSED_LEAP_SECOND;
|
|
5386
|
+
};
|
|
5387
|
+
DateTimeFormatter.ofPattern = function ofPattern(pattern) {
|
|
5388
|
+
return new DateTimeFormatterBuilder().appendPattern(pattern).toFormatter();
|
|
5389
|
+
};
|
|
5388
5390
|
var _proto = DateTimeFormatter.prototype;
|
|
5389
5391
|
_proto.locale = function locale() {
|
|
5390
5392
|
return this._locale;
|
|
@@ -5539,6 +5541,13 @@ function _init$d() {
|
|
|
5539
5541
|
}
|
|
5540
5542
|
|
|
5541
5543
|
var MonthDay = function (_TemporalAccessor) {
|
|
5544
|
+
function MonthDay(month, dayOfMonth) {
|
|
5545
|
+
var _this;
|
|
5546
|
+
_this = _TemporalAccessor.call(this) || this;
|
|
5547
|
+
_this._month = MathUtil.safeToInt(month);
|
|
5548
|
+
_this._day = MathUtil.safeToInt(dayOfMonth);
|
|
5549
|
+
return _this;
|
|
5550
|
+
}
|
|
5542
5551
|
_inheritsLoose(MonthDay, _TemporalAccessor);
|
|
5543
5552
|
MonthDay.now = function now(zoneIdOrClock) {
|
|
5544
5553
|
if (arguments.length === 0) {
|
|
@@ -5609,13 +5618,6 @@ var MonthDay = function (_TemporalAccessor) {
|
|
|
5609
5618
|
requireInstance(formatter, DateTimeFormatter, 'formatter');
|
|
5610
5619
|
return formatter.parse(text, MonthDay.FROM);
|
|
5611
5620
|
};
|
|
5612
|
-
function MonthDay(month, dayOfMonth) {
|
|
5613
|
-
var _this;
|
|
5614
|
-
_this = _TemporalAccessor.call(this) || this;
|
|
5615
|
-
_this._month = MathUtil.safeToInt(month);
|
|
5616
|
-
_this._day = MathUtil.safeToInt(dayOfMonth);
|
|
5617
|
-
return _this;
|
|
5618
|
-
}
|
|
5619
5621
|
var _proto = MonthDay.prototype;
|
|
5620
5622
|
_proto.monthValue = function monthValue() {
|
|
5621
5623
|
return this._month;
|
|
@@ -5743,6 +5745,13 @@ function _init$c() {
|
|
|
5743
5745
|
}
|
|
5744
5746
|
|
|
5745
5747
|
var YearMonth = function (_Temporal) {
|
|
5748
|
+
function YearMonth(year, month) {
|
|
5749
|
+
var _this;
|
|
5750
|
+
_this = _Temporal.call(this) || this;
|
|
5751
|
+
_this._year = MathUtil.safeToInt(year);
|
|
5752
|
+
_this._month = MathUtil.safeToInt(month);
|
|
5753
|
+
return _this;
|
|
5754
|
+
}
|
|
5746
5755
|
_inheritsLoose(YearMonth, _Temporal);
|
|
5747
5756
|
YearMonth.now = function now(zoneIdOrClock) {
|
|
5748
5757
|
if (arguments.length === 0) {
|
|
@@ -5807,13 +5816,6 @@ var YearMonth = function (_Temporal) {
|
|
|
5807
5816
|
requireNonNull(formatter, 'formatter');
|
|
5808
5817
|
return formatter.parse(text, YearMonth.FROM);
|
|
5809
5818
|
};
|
|
5810
|
-
function YearMonth(year, month) {
|
|
5811
|
-
var _this;
|
|
5812
|
-
_this = _Temporal.call(this) || this;
|
|
5813
|
-
_this._year = MathUtil.safeToInt(year);
|
|
5814
|
-
_this._month = MathUtil.safeToInt(month);
|
|
5815
|
-
return _this;
|
|
5816
|
-
}
|
|
5817
5819
|
var _proto = YearMonth.prototype;
|
|
5818
5820
|
_proto.isSupported = function isSupported(fieldOrUnit) {
|
|
5819
5821
|
if (arguments.length === 1 && fieldOrUnit instanceof TemporalField) {
|
|
@@ -6067,13 +6069,13 @@ function _init$b() {
|
|
|
6067
6069
|
}
|
|
6068
6070
|
|
|
6069
6071
|
var Year = function (_Temporal) {
|
|
6070
|
-
_inheritsLoose(Year, _Temporal);
|
|
6071
6072
|
function Year(value) {
|
|
6072
6073
|
var _this;
|
|
6073
6074
|
_this = _Temporal.call(this) || this;
|
|
6074
6075
|
_this._year = MathUtil.safeToInt(value);
|
|
6075
6076
|
return _this;
|
|
6076
6077
|
}
|
|
6078
|
+
_inheritsLoose(Year, _Temporal);
|
|
6077
6079
|
var _proto = Year.prototype;
|
|
6078
6080
|
_proto.value = function value() {
|
|
6079
6081
|
return this._year;
|
|
@@ -6414,13 +6416,13 @@ var TemporalAdjusters = function () {
|
|
|
6414
6416
|
return TemporalAdjusters;
|
|
6415
6417
|
}();
|
|
6416
6418
|
var Impl = function (_TemporalAdjuster) {
|
|
6417
|
-
_inheritsLoose(Impl, _TemporalAdjuster);
|
|
6418
6419
|
function Impl(ordinal) {
|
|
6419
6420
|
var _this;
|
|
6420
6421
|
_this = _TemporalAdjuster.call(this) || this;
|
|
6421
6422
|
_this._ordinal = ordinal;
|
|
6422
6423
|
return _this;
|
|
6423
6424
|
}
|
|
6425
|
+
_inheritsLoose(Impl, _TemporalAdjuster);
|
|
6424
6426
|
var _proto = Impl.prototype;
|
|
6425
6427
|
_proto.adjustInto = function adjustInto(temporal) {
|
|
6426
6428
|
switch (this._ordinal) {
|
|
@@ -6448,7 +6450,6 @@ Impl.FIRST_DAY_OF_YEAR = new Impl(3);
|
|
|
6448
6450
|
Impl.LAST_DAY_OF_YEAR = new Impl(4);
|
|
6449
6451
|
Impl.FIRST_DAY_OF_NEXT_YEAR = new Impl(5);
|
|
6450
6452
|
var DayOfWeekInMonth = function (_TemporalAdjuster2) {
|
|
6451
|
-
_inheritsLoose(DayOfWeekInMonth, _TemporalAdjuster2);
|
|
6452
6453
|
function DayOfWeekInMonth(ordinal, dow) {
|
|
6453
6454
|
var _this2;
|
|
6454
6455
|
_this2 = _TemporalAdjuster2.call(this) || this;
|
|
@@ -6456,6 +6457,7 @@ var DayOfWeekInMonth = function (_TemporalAdjuster2) {
|
|
|
6456
6457
|
_this2._dowValue = dow.value();
|
|
6457
6458
|
return _this2;
|
|
6458
6459
|
}
|
|
6460
|
+
_inheritsLoose(DayOfWeekInMonth, _TemporalAdjuster2);
|
|
6459
6461
|
var _proto2 = DayOfWeekInMonth.prototype;
|
|
6460
6462
|
_proto2.adjustInto = function adjustInto(temporal) {
|
|
6461
6463
|
if (this._ordinal >= 0) {
|
|
@@ -6476,7 +6478,6 @@ var DayOfWeekInMonth = function (_TemporalAdjuster2) {
|
|
|
6476
6478
|
return DayOfWeekInMonth;
|
|
6477
6479
|
}(TemporalAdjuster);
|
|
6478
6480
|
var RelativeDayOfWeek = function (_TemporalAdjuster3) {
|
|
6479
|
-
_inheritsLoose(RelativeDayOfWeek, _TemporalAdjuster3);
|
|
6480
6481
|
function RelativeDayOfWeek(relative, dayOfWeek) {
|
|
6481
6482
|
var _this3;
|
|
6482
6483
|
_this3 = _TemporalAdjuster3.call(this) || this;
|
|
@@ -6485,6 +6486,7 @@ var RelativeDayOfWeek = function (_TemporalAdjuster3) {
|
|
|
6485
6486
|
_this3._dowValue = dayOfWeek.value();
|
|
6486
6487
|
return _this3;
|
|
6487
6488
|
}
|
|
6489
|
+
_inheritsLoose(RelativeDayOfWeek, _TemporalAdjuster3);
|
|
6488
6490
|
var _proto3 = RelativeDayOfWeek.prototype;
|
|
6489
6491
|
_proto3.adjustInto = function adjustInto(temporal) {
|
|
6490
6492
|
var calDow = temporal.get(ChronoField.DAY_OF_WEEK);
|
|
@@ -6503,10 +6505,10 @@ var RelativeDayOfWeek = function (_TemporalAdjuster3) {
|
|
|
6503
6505
|
}(TemporalAdjuster);
|
|
6504
6506
|
|
|
6505
6507
|
var IsoChronology = function (_Enum) {
|
|
6506
|
-
_inheritsLoose(IsoChronology, _Enum);
|
|
6507
6508
|
function IsoChronology() {
|
|
6508
6509
|
return _Enum.apply(this, arguments) || this;
|
|
6509
6510
|
}
|
|
6511
|
+
_inheritsLoose(IsoChronology, _Enum);
|
|
6510
6512
|
IsoChronology.isLeapYear = function isLeapYear(prolepticYear) {
|
|
6511
6513
|
return (prolepticYear & 3) === 0 && (prolepticYear % 100 !== 0 || prolepticYear % 400 === 0);
|
|
6512
6514
|
};
|
|
@@ -6636,6 +6638,17 @@ function _init$9() {
|
|
|
6636
6638
|
}
|
|
6637
6639
|
|
|
6638
6640
|
var OffsetTime = function (_Temporal) {
|
|
6641
|
+
function OffsetTime(time, offset) {
|
|
6642
|
+
var _this;
|
|
6643
|
+
_this = _Temporal.call(this) || this;
|
|
6644
|
+
requireNonNull(time, 'time');
|
|
6645
|
+
requireInstance(time, LocalTime, 'time');
|
|
6646
|
+
requireNonNull(offset, 'offset');
|
|
6647
|
+
requireInstance(offset, ZoneOffset, 'offset');
|
|
6648
|
+
_this._time = time;
|
|
6649
|
+
_this._offset = offset;
|
|
6650
|
+
return _this;
|
|
6651
|
+
}
|
|
6639
6652
|
_inheritsLoose(OffsetTime, _Temporal);
|
|
6640
6653
|
OffsetTime.from = function from(temporal) {
|
|
6641
6654
|
requireNonNull(temporal, 'temporal');
|
|
@@ -6702,17 +6715,6 @@ var OffsetTime = function (_Temporal) {
|
|
|
6702
6715
|
requireNonNull(formatter, 'formatter');
|
|
6703
6716
|
return formatter.parse(text, OffsetTime.FROM);
|
|
6704
6717
|
};
|
|
6705
|
-
function OffsetTime(time, offset) {
|
|
6706
|
-
var _this;
|
|
6707
|
-
_this = _Temporal.call(this) || this;
|
|
6708
|
-
requireNonNull(time, 'time');
|
|
6709
|
-
requireInstance(time, LocalTime, 'time');
|
|
6710
|
-
requireNonNull(offset, 'offset');
|
|
6711
|
-
requireInstance(offset, ZoneOffset, 'offset');
|
|
6712
|
-
_this._time = time;
|
|
6713
|
-
_this._offset = offset;
|
|
6714
|
-
return _this;
|
|
6715
|
-
}
|
|
6716
6718
|
var _proto = OffsetTime.prototype;
|
|
6717
6719
|
_proto.adjustInto = function adjustInto(temporal) {
|
|
6718
6720
|
return temporal.with(ChronoField.NANO_OF_DAY, this._time.toNanoOfDay()).with(ChronoField.OFFSET_SECONDS, this.offset().totalSeconds());
|
|
@@ -6963,10 +6965,10 @@ function _init$8() {
|
|
|
6963
6965
|
}
|
|
6964
6966
|
|
|
6965
6967
|
var ChronoZonedDateTime = function (_Temporal) {
|
|
6966
|
-
_inheritsLoose(ChronoZonedDateTime, _Temporal);
|
|
6967
6968
|
function ChronoZonedDateTime() {
|
|
6968
6969
|
return _Temporal.apply(this, arguments) || this;
|
|
6969
6970
|
}
|
|
6971
|
+
_inheritsLoose(ChronoZonedDateTime, _Temporal);
|
|
6970
6972
|
var _proto = ChronoZonedDateTime.prototype;
|
|
6971
6973
|
_proto.query = function query(_query) {
|
|
6972
6974
|
if (_query === TemporalQueries.zoneId() || _query === TemporalQueries.zone()) {
|
|
@@ -7049,6 +7051,17 @@ function strcmp(a, b) {
|
|
|
7049
7051
|
}
|
|
7050
7052
|
|
|
7051
7053
|
var ZonedDateTime = function (_ChronoZonedDateTime) {
|
|
7054
|
+
function ZonedDateTime(dateTime, offset, zone) {
|
|
7055
|
+
var _this;
|
|
7056
|
+
requireNonNull(dateTime, 'dateTime');
|
|
7057
|
+
requireNonNull(offset, 'offset');
|
|
7058
|
+
requireNonNull(zone, 'zone');
|
|
7059
|
+
_this = _ChronoZonedDateTime.call(this) || this;
|
|
7060
|
+
_this._dateTime = dateTime;
|
|
7061
|
+
_this._offset = offset;
|
|
7062
|
+
_this._zone = zone;
|
|
7063
|
+
return _this;
|
|
7064
|
+
}
|
|
7052
7065
|
_inheritsLoose(ZonedDateTime, _ChronoZonedDateTime);
|
|
7053
7066
|
ZonedDateTime.now = function now(clockOrZone) {
|
|
7054
7067
|
var clock;
|
|
@@ -7184,17 +7197,6 @@ var ZonedDateTime = function (_ChronoZonedDateTime) {
|
|
|
7184
7197
|
requireNonNull(formatter, 'formatter');
|
|
7185
7198
|
return formatter.parse(text, ZonedDateTime.FROM);
|
|
7186
7199
|
};
|
|
7187
|
-
function ZonedDateTime(dateTime, offset, zone) {
|
|
7188
|
-
var _this;
|
|
7189
|
-
requireNonNull(dateTime, 'dateTime');
|
|
7190
|
-
requireNonNull(offset, 'offset');
|
|
7191
|
-
requireNonNull(zone, 'zone');
|
|
7192
|
-
_this = _ChronoZonedDateTime.call(this) || this;
|
|
7193
|
-
_this._dateTime = dateTime;
|
|
7194
|
-
_this._offset = offset;
|
|
7195
|
-
_this._zone = zone;
|
|
7196
|
-
return _this;
|
|
7197
|
-
}
|
|
7198
7200
|
var _proto = ZonedDateTime.prototype;
|
|
7199
7201
|
_proto._resolveLocal = function _resolveLocal(newDateTime) {
|
|
7200
7202
|
requireNonNull(newDateTime, 'newDateTime');
|
|
@@ -7495,6 +7497,17 @@ function _init$7() {
|
|
|
7495
7497
|
}
|
|
7496
7498
|
|
|
7497
7499
|
var OffsetDateTime = function (_Temporal) {
|
|
7500
|
+
function OffsetDateTime(dateTime, offset) {
|
|
7501
|
+
var _this;
|
|
7502
|
+
_this = _Temporal.call(this) || this;
|
|
7503
|
+
requireNonNull(dateTime, 'dateTime');
|
|
7504
|
+
requireInstance(dateTime, LocalDateTime, 'dateTime');
|
|
7505
|
+
requireNonNull(offset, 'offset');
|
|
7506
|
+
requireInstance(offset, ZoneOffset, 'offset');
|
|
7507
|
+
_this._dateTime = dateTime;
|
|
7508
|
+
_this._offset = offset;
|
|
7509
|
+
return _this;
|
|
7510
|
+
}
|
|
7498
7511
|
_inheritsLoose(OffsetDateTime, _Temporal);
|
|
7499
7512
|
OffsetDateTime.from = function from(temporal) {
|
|
7500
7513
|
requireNonNull(temporal, 'temporal');
|
|
@@ -7522,8 +7535,8 @@ var OffsetDateTime = function (_Temporal) {
|
|
|
7522
7535
|
if (clockOrZone instanceof ZoneId) {
|
|
7523
7536
|
return OffsetDateTime.now(Clock.system(clockOrZone));
|
|
7524
7537
|
} else if (clockOrZone instanceof Clock) {
|
|
7525
|
-
var
|
|
7526
|
-
return OffsetDateTime.ofInstant(
|
|
7538
|
+
var _now = clockOrZone.instant();
|
|
7539
|
+
return OffsetDateTime.ofInstant(_now, clockOrZone.zone().rules().offset(_now));
|
|
7527
7540
|
} else {
|
|
7528
7541
|
throw new IllegalArgumentException('clockOrZone must be an instance of ZoneId or Clock');
|
|
7529
7542
|
}
|
|
@@ -7576,17 +7589,6 @@ var OffsetDateTime = function (_Temporal) {
|
|
|
7576
7589
|
requireNonNull(formatter, 'formatter');
|
|
7577
7590
|
return formatter.parse(text, OffsetDateTime.FROM);
|
|
7578
7591
|
};
|
|
7579
|
-
function OffsetDateTime(dateTime, offset) {
|
|
7580
|
-
var _this;
|
|
7581
|
-
_this = _Temporal.call(this) || this;
|
|
7582
|
-
requireNonNull(dateTime, 'dateTime');
|
|
7583
|
-
requireInstance(dateTime, LocalDateTime, 'dateTime');
|
|
7584
|
-
requireNonNull(offset, 'offset');
|
|
7585
|
-
requireInstance(offset, ZoneOffset, 'offset');
|
|
7586
|
-
_this._dateTime = dateTime;
|
|
7587
|
-
_this._offset = offset;
|
|
7588
|
-
return _this;
|
|
7589
|
-
}
|
|
7590
7592
|
var _proto = OffsetDateTime.prototype;
|
|
7591
7593
|
_proto.adjustInto = function adjustInto(temporal) {
|
|
7592
7594
|
return temporal.with(ChronoField.EPOCH_DAY, this.toLocalDate().toEpochDay()).with(ChronoField.NANO_OF_DAY, this.toLocalTime().toNanoOfDay()).with(ChronoField.OFFSET_SECONDS, this.offset().totalSeconds());
|
|
@@ -7924,6 +7926,21 @@ function _init$6() {
|
|
|
7924
7926
|
var DAYS_PER_CYCLE = 146097;
|
|
7925
7927
|
var DAYS_0000_TO_1970 = DAYS_PER_CYCLE * 5 - (30 * 365 + 7);
|
|
7926
7928
|
var LocalDate = function (_ChronoLocalDate) {
|
|
7929
|
+
function LocalDate(year, month, dayOfMonth) {
|
|
7930
|
+
var _this;
|
|
7931
|
+
_this = _ChronoLocalDate.call(this) || this;
|
|
7932
|
+
requireNonNull(year, 'year');
|
|
7933
|
+
requireNonNull(month, 'month');
|
|
7934
|
+
requireNonNull(dayOfMonth, 'dayOfMonth');
|
|
7935
|
+
if (month instanceof Month) {
|
|
7936
|
+
month = month.value();
|
|
7937
|
+
}
|
|
7938
|
+
_this._year = MathUtil.safeToInt(year);
|
|
7939
|
+
_this._month = MathUtil.safeToInt(month);
|
|
7940
|
+
_this._day = MathUtil.safeToInt(dayOfMonth);
|
|
7941
|
+
LocalDate._validate(_this._year, _this._month, _this._day);
|
|
7942
|
+
return _this;
|
|
7943
|
+
}
|
|
7927
7944
|
_inheritsLoose(LocalDate, _ChronoLocalDate);
|
|
7928
7945
|
LocalDate.now = function now(clockOrZone) {
|
|
7929
7946
|
var clock;
|
|
@@ -8020,21 +8037,6 @@ var LocalDate = function (_ChronoLocalDate) {
|
|
|
8020
8037
|
}
|
|
8021
8038
|
return LocalDate.of(year, month, day);
|
|
8022
8039
|
};
|
|
8023
|
-
function LocalDate(year, month, dayOfMonth) {
|
|
8024
|
-
var _this;
|
|
8025
|
-
_this = _ChronoLocalDate.call(this) || this;
|
|
8026
|
-
requireNonNull(year, 'year');
|
|
8027
|
-
requireNonNull(month, 'month');
|
|
8028
|
-
requireNonNull(dayOfMonth, 'dayOfMonth');
|
|
8029
|
-
if (month instanceof Month) {
|
|
8030
|
-
month = month.value();
|
|
8031
|
-
}
|
|
8032
|
-
_this._year = MathUtil.safeToInt(year);
|
|
8033
|
-
_this._month = MathUtil.safeToInt(month);
|
|
8034
|
-
_this._day = MathUtil.safeToInt(dayOfMonth);
|
|
8035
|
-
LocalDate._validate(_this._year, _this._month, _this._day);
|
|
8036
|
-
return _this;
|
|
8037
|
-
}
|
|
8038
8040
|
LocalDate._validate = function _validate(year, month, dayOfMonth) {
|
|
8039
8041
|
var dom;
|
|
8040
8042
|
ChronoField.YEAR.checkValidValue(year);
|
|
@@ -8533,10 +8535,10 @@ function _init$5() {
|
|
|
8533
8535
|
}
|
|
8534
8536
|
|
|
8535
8537
|
var ChronoLocalDateTime = function (_Temporal) {
|
|
8536
|
-
_inheritsLoose(ChronoLocalDateTime, _Temporal);
|
|
8537
8538
|
function ChronoLocalDateTime() {
|
|
8538
8539
|
return _Temporal.apply(this, arguments) || this;
|
|
8539
8540
|
}
|
|
8541
|
+
_inheritsLoose(ChronoLocalDateTime, _Temporal);
|
|
8540
8542
|
var _proto = ChronoLocalDateTime.prototype;
|
|
8541
8543
|
_proto.chronology = function chronology() {
|
|
8542
8544
|
return this.toLocalDate().chronology();
|
|
@@ -8573,6 +8575,15 @@ var ChronoLocalDateTime = function (_Temporal) {
|
|
|
8573
8575
|
}(Temporal);
|
|
8574
8576
|
|
|
8575
8577
|
var LocalDateTime = function (_ChronoLocalDateTime) {
|
|
8578
|
+
function LocalDateTime(date, time) {
|
|
8579
|
+
var _this;
|
|
8580
|
+
_this = _ChronoLocalDateTime.call(this) || this;
|
|
8581
|
+
requireInstance(date, LocalDate, 'date');
|
|
8582
|
+
requireInstance(time, LocalTime, 'time');
|
|
8583
|
+
_this._date = date;
|
|
8584
|
+
_this._time = time;
|
|
8585
|
+
return _this;
|
|
8586
|
+
}
|
|
8576
8587
|
_inheritsLoose(LocalDateTime, _ChronoLocalDateTime);
|
|
8577
8588
|
LocalDateTime.now = function now(clockOrZone) {
|
|
8578
8589
|
if (clockOrZone == null) {
|
|
@@ -8676,15 +8687,6 @@ var LocalDateTime = function (_ChronoLocalDateTime) {
|
|
|
8676
8687
|
requireNonNull(formatter, 'formatter');
|
|
8677
8688
|
return formatter.parse(text, LocalDateTime.FROM);
|
|
8678
8689
|
};
|
|
8679
|
-
function LocalDateTime(date, time) {
|
|
8680
|
-
var _this;
|
|
8681
|
-
_this = _ChronoLocalDateTime.call(this) || this;
|
|
8682
|
-
requireInstance(date, LocalDate, 'date');
|
|
8683
|
-
requireInstance(time, LocalTime, 'time');
|
|
8684
|
-
_this._date = date;
|
|
8685
|
-
_this._time = time;
|
|
8686
|
-
return _this;
|
|
8687
|
-
}
|
|
8688
8690
|
var _proto = LocalDateTime.prototype;
|
|
8689
8691
|
_proto._withDateTime = function _withDateTime(newDate, newTime) {
|
|
8690
8692
|
if (this._date.equals(newDate) && this._time.equals(newTime)) {
|
|
@@ -9023,6 +9025,42 @@ function _init$4() {
|
|
|
9023
9025
|
}
|
|
9024
9026
|
|
|
9025
9027
|
var LocalTime = function (_Temporal) {
|
|
9028
|
+
function LocalTime(hour, minute, second, nanoOfSecond) {
|
|
9029
|
+
var _this;
|
|
9030
|
+
if (hour === void 0) {
|
|
9031
|
+
hour = 0;
|
|
9032
|
+
}
|
|
9033
|
+
if (minute === void 0) {
|
|
9034
|
+
minute = 0;
|
|
9035
|
+
}
|
|
9036
|
+
if (second === void 0) {
|
|
9037
|
+
second = 0;
|
|
9038
|
+
}
|
|
9039
|
+
if (nanoOfSecond === void 0) {
|
|
9040
|
+
nanoOfSecond = 0;
|
|
9041
|
+
}
|
|
9042
|
+
_this = _Temporal.call(this) || this;
|
|
9043
|
+
var _hour = MathUtil.safeToInt(hour);
|
|
9044
|
+
var _minute = MathUtil.safeToInt(minute);
|
|
9045
|
+
var _second = MathUtil.safeToInt(second);
|
|
9046
|
+
var _nanoOfSecond = MathUtil.safeToInt(nanoOfSecond);
|
|
9047
|
+
LocalTime._validate(_hour, _minute, _second, _nanoOfSecond);
|
|
9048
|
+
if (_minute === 0 && _second === 0 && _nanoOfSecond === 0) {
|
|
9049
|
+
if (!LocalTime.HOURS[_hour]) {
|
|
9050
|
+
_this._hour = _hour;
|
|
9051
|
+
_this._minute = _minute;
|
|
9052
|
+
_this._second = _second;
|
|
9053
|
+
_this._nano = _nanoOfSecond;
|
|
9054
|
+
LocalTime.HOURS[_hour] = _this;
|
|
9055
|
+
}
|
|
9056
|
+
return LocalTime.HOURS[_hour] || _assertThisInitialized(_this);
|
|
9057
|
+
}
|
|
9058
|
+
_this._hour = _hour;
|
|
9059
|
+
_this._minute = _minute;
|
|
9060
|
+
_this._second = _second;
|
|
9061
|
+
_this._nano = _nanoOfSecond;
|
|
9062
|
+
return _this;
|
|
9063
|
+
}
|
|
9026
9064
|
_inheritsLoose(LocalTime, _Temporal);
|
|
9027
9065
|
LocalTime.now = function now(clockOrZone) {
|
|
9028
9066
|
if (clockOrZone == null) {
|
|
@@ -9098,42 +9136,6 @@ var LocalTime = function (_Temporal) {
|
|
|
9098
9136
|
requireNonNull(formatter, 'formatter');
|
|
9099
9137
|
return formatter.parse(text, LocalTime.FROM);
|
|
9100
9138
|
};
|
|
9101
|
-
function LocalTime(hour, minute, second, nanoOfSecond) {
|
|
9102
|
-
var _this;
|
|
9103
|
-
if (hour === void 0) {
|
|
9104
|
-
hour = 0;
|
|
9105
|
-
}
|
|
9106
|
-
if (minute === void 0) {
|
|
9107
|
-
minute = 0;
|
|
9108
|
-
}
|
|
9109
|
-
if (second === void 0) {
|
|
9110
|
-
second = 0;
|
|
9111
|
-
}
|
|
9112
|
-
if (nanoOfSecond === void 0) {
|
|
9113
|
-
nanoOfSecond = 0;
|
|
9114
|
-
}
|
|
9115
|
-
_this = _Temporal.call(this) || this;
|
|
9116
|
-
var _hour = MathUtil.safeToInt(hour);
|
|
9117
|
-
var _minute = MathUtil.safeToInt(minute);
|
|
9118
|
-
var _second = MathUtil.safeToInt(second);
|
|
9119
|
-
var _nanoOfSecond = MathUtil.safeToInt(nanoOfSecond);
|
|
9120
|
-
LocalTime._validate(_hour, _minute, _second, _nanoOfSecond);
|
|
9121
|
-
if (_minute === 0 && _second === 0 && _nanoOfSecond === 0) {
|
|
9122
|
-
if (!LocalTime.HOURS[_hour]) {
|
|
9123
|
-
_this._hour = _hour;
|
|
9124
|
-
_this._minute = _minute;
|
|
9125
|
-
_this._second = _second;
|
|
9126
|
-
_this._nano = _nanoOfSecond;
|
|
9127
|
-
LocalTime.HOURS[_hour] = _assertThisInitialized(_this);
|
|
9128
|
-
}
|
|
9129
|
-
return LocalTime.HOURS[_hour] || _assertThisInitialized(_this);
|
|
9130
|
-
}
|
|
9131
|
-
_this._hour = _hour;
|
|
9132
|
-
_this._minute = _minute;
|
|
9133
|
-
_this._second = _second;
|
|
9134
|
-
_this._nano = _nanoOfSecond;
|
|
9135
|
-
return _this;
|
|
9136
|
-
}
|
|
9137
9139
|
LocalTime._validate = function _validate(hour, minute, second, nanoOfSecond) {
|
|
9138
9140
|
ChronoField.HOUR_OF_DAY.checkValidValue(hour);
|
|
9139
9141
|
ChronoField.MINUTE_OF_HOUR.checkValidValue(minute);
|
|
@@ -9558,6 +9560,14 @@ LocalTime.NANOS_PER_DAY = LocalTime.NANOS_PER_HOUR * LocalTime.HOURS_PER_DAY;
|
|
|
9558
9560
|
|
|
9559
9561
|
var NANOS_PER_MILLI = 1000000;
|
|
9560
9562
|
var Instant = function (_Temporal) {
|
|
9563
|
+
function Instant(seconds, nanoOfSecond) {
|
|
9564
|
+
var _this;
|
|
9565
|
+
_this = _Temporal.call(this) || this;
|
|
9566
|
+
Instant._validate(seconds, nanoOfSecond);
|
|
9567
|
+
_this._seconds = MathUtil.safeToInt(seconds);
|
|
9568
|
+
_this._nanos = MathUtil.safeToInt(nanoOfSecond);
|
|
9569
|
+
return _this;
|
|
9570
|
+
}
|
|
9561
9571
|
_inheritsLoose(Instant, _Temporal);
|
|
9562
9572
|
Instant.now = function now(clock) {
|
|
9563
9573
|
if (clock === void 0) {
|
|
@@ -9609,14 +9619,6 @@ var Instant = function (_Temporal) {
|
|
|
9609
9619
|
throw new DateTimeException('Instant exceeds minimum or maximum instant');
|
|
9610
9620
|
}
|
|
9611
9621
|
};
|
|
9612
|
-
function Instant(seconds, nanoOfSecond) {
|
|
9613
|
-
var _this;
|
|
9614
|
-
_this = _Temporal.call(this) || this;
|
|
9615
|
-
Instant._validate(seconds, nanoOfSecond);
|
|
9616
|
-
_this._seconds = MathUtil.safeToInt(seconds);
|
|
9617
|
-
_this._nanos = MathUtil.safeToInt(nanoOfSecond);
|
|
9618
|
-
return _this;
|
|
9619
|
-
}
|
|
9620
9622
|
var _proto = Instant.prototype;
|
|
9621
9623
|
_proto.isSupported = function isSupported(fieldOrUnit) {
|
|
9622
9624
|
if (fieldOrUnit instanceof ChronoField) {
|
|
@@ -9693,7 +9695,7 @@ var Instant = function (_Temporal) {
|
|
|
9693
9695
|
throw new DateTimeException('Unit must divide into a standard day without remainder');
|
|
9694
9696
|
}
|
|
9695
9697
|
var nod = MathUtil.intMod(this._seconds, LocalTime.SECONDS_PER_DAY) * LocalTime.NANOS_PER_SECOND + this._nanos;
|
|
9696
|
-
var result = MathUtil.
|
|
9698
|
+
var result = MathUtil.floorDiv(nod, dur) * dur;
|
|
9697
9699
|
return this.plusNanos(result - nod);
|
|
9698
9700
|
};
|
|
9699
9701
|
_proto._plusUnit = function _plusUnit(amountToAdd, unit) {
|
|
@@ -9909,7 +9911,6 @@ var Clock = function () {
|
|
|
9909
9911
|
return Clock;
|
|
9910
9912
|
}();
|
|
9911
9913
|
var SystemClock = function (_Clock) {
|
|
9912
|
-
_inheritsLoose(SystemClock, _Clock);
|
|
9913
9914
|
function SystemClock(zone) {
|
|
9914
9915
|
var _this;
|
|
9915
9916
|
requireNonNull(zone, 'zone');
|
|
@@ -9917,6 +9918,7 @@ var SystemClock = function (_Clock) {
|
|
|
9917
9918
|
_this._zone = zone;
|
|
9918
9919
|
return _this;
|
|
9919
9920
|
}
|
|
9921
|
+
_inheritsLoose(SystemClock, _Clock);
|
|
9920
9922
|
var _proto2 = SystemClock.prototype;
|
|
9921
9923
|
_proto2.zone = function zone() {
|
|
9922
9924
|
return this._zone;
|
|
@@ -9945,7 +9947,6 @@ var SystemClock = function (_Clock) {
|
|
|
9945
9947
|
return SystemClock;
|
|
9946
9948
|
}(Clock);
|
|
9947
9949
|
var FixedClock = function (_Clock2) {
|
|
9948
|
-
_inheritsLoose(FixedClock, _Clock2);
|
|
9949
9950
|
function FixedClock(fixedInstant, zoneId) {
|
|
9950
9951
|
var _this2;
|
|
9951
9952
|
_this2 = _Clock2.call(this) || this;
|
|
@@ -9953,6 +9954,7 @@ var FixedClock = function (_Clock2) {
|
|
|
9953
9954
|
_this2._zoneId = zoneId;
|
|
9954
9955
|
return _this2;
|
|
9955
9956
|
}
|
|
9957
|
+
_inheritsLoose(FixedClock, _Clock2);
|
|
9956
9958
|
var _proto3 = FixedClock.prototype;
|
|
9957
9959
|
_proto3.instant = function instant() {
|
|
9958
9960
|
return this._instant;
|
|
@@ -9981,7 +9983,6 @@ var FixedClock = function (_Clock2) {
|
|
|
9981
9983
|
return FixedClock;
|
|
9982
9984
|
}(Clock);
|
|
9983
9985
|
var OffsetClock = function (_Clock3) {
|
|
9984
|
-
_inheritsLoose(OffsetClock, _Clock3);
|
|
9985
9986
|
function OffsetClock(baseClock, offset) {
|
|
9986
9987
|
var _this3;
|
|
9987
9988
|
_this3 = _Clock3.call(this) || this;
|
|
@@ -9989,6 +9990,7 @@ var OffsetClock = function (_Clock3) {
|
|
|
9989
9990
|
_this3._offset = offset;
|
|
9990
9991
|
return _this3;
|
|
9991
9992
|
}
|
|
9993
|
+
_inheritsLoose(OffsetClock, _Clock3);
|
|
9992
9994
|
var _proto4 = OffsetClock.prototype;
|
|
9993
9995
|
_proto4.zone = function zone() {
|
|
9994
9996
|
return this._baseClock.zone();
|
|
@@ -10024,9 +10026,6 @@ var OffsetClock = function (_Clock3) {
|
|
|
10024
10026
|
*/
|
|
10025
10027
|
|
|
10026
10028
|
var ZoneOffsetTransition = function () {
|
|
10027
|
-
ZoneOffsetTransition.of = function of(transition, offsetBefore, offsetAfter) {
|
|
10028
|
-
return new ZoneOffsetTransition(transition, offsetBefore, offsetAfter);
|
|
10029
|
-
};
|
|
10030
10029
|
function ZoneOffsetTransition(transition, offsetBefore, offsetAfter) {
|
|
10031
10030
|
requireNonNull(transition, 'transition');
|
|
10032
10031
|
requireNonNull(offsetBefore, 'offsetBefore');
|
|
@@ -10045,6 +10044,9 @@ var ZoneOffsetTransition = function () {
|
|
|
10045
10044
|
this._offsetBefore = offsetBefore;
|
|
10046
10045
|
this._offsetAfter = offsetAfter;
|
|
10047
10046
|
}
|
|
10047
|
+
ZoneOffsetTransition.of = function of(transition, offsetBefore, offsetAfter) {
|
|
10048
|
+
return new ZoneOffsetTransition(transition, offsetBefore, offsetAfter);
|
|
10049
|
+
};
|
|
10048
10050
|
var _proto = ZoneOffsetTransition.prototype;
|
|
10049
10051
|
_proto.instant = function instant() {
|
|
10050
10052
|
return this._transition.toInstant(this._offsetBefore);
|
|
@@ -10149,10 +10151,10 @@ function _init$1() {
|
|
|
10149
10151
|
}
|
|
10150
10152
|
|
|
10151
10153
|
var SystemDefaultZoneRules = function (_ZoneRules) {
|
|
10152
|
-
_inheritsLoose(SystemDefaultZoneRules, _ZoneRules);
|
|
10153
10154
|
function SystemDefaultZoneRules() {
|
|
10154
10155
|
return _ZoneRules.apply(this, arguments) || this;
|
|
10155
10156
|
}
|
|
10157
|
+
_inheritsLoose(SystemDefaultZoneRules, _ZoneRules);
|
|
10156
10158
|
var _proto = SystemDefaultZoneRules.prototype;
|
|
10157
10159
|
_proto.isFixedOffset = function isFixedOffset() {
|
|
10158
10160
|
return false;
|
|
@@ -10219,13 +10221,13 @@ var SystemDefaultZoneRules = function (_ZoneRules) {
|
|
|
10219
10221
|
}(ZoneRules);
|
|
10220
10222
|
|
|
10221
10223
|
var SystemDefaultZoneId = function (_ZoneId) {
|
|
10222
|
-
_inheritsLoose(SystemDefaultZoneId, _ZoneId);
|
|
10223
10224
|
function SystemDefaultZoneId() {
|
|
10224
10225
|
var _this;
|
|
10225
10226
|
_this = _ZoneId.call(this) || this;
|
|
10226
10227
|
_this._rules = new SystemDefaultZoneRules();
|
|
10227
10228
|
return _this;
|
|
10228
10229
|
}
|
|
10230
|
+
_inheritsLoose(SystemDefaultZoneId, _ZoneId);
|
|
10229
10231
|
var _proto = SystemDefaultZoneId.prototype;
|
|
10230
10232
|
_proto.rules = function rules() {
|
|
10231
10233
|
return this._rules;
|