@js-joda/core 6.0.0 → 6.0.1
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 +202 -216
- package/dist/js-joda.cjs.js.map +1 -1
- package/dist/js-joda.esm.js +202 -216
- package/dist/js-joda.esm.js.map +1 -1
- package/dist/js-joda.js +202 -216
- package/dist/js-joda.js.map +1 -1
- package/dist/js-joda.min.js +2 -2
- package/package.json +2 -2
package/dist/js-joda.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//! @version @js-joda/core - 6.0.
|
|
1
|
+
//! @version @js-joda/core - 6.0.1
|
|
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)
|
|
@@ -76,23 +76,17 @@
|
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
function
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
_setPrototypeOf(subClass, superClass);
|
|
79
|
+
function _assertThisInitialized(e) {
|
|
80
|
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
81
|
+
return e;
|
|
83
82
|
}
|
|
84
|
-
function
|
|
85
|
-
|
|
86
|
-
o.__proto__ = p;
|
|
87
|
-
return o;
|
|
88
|
-
};
|
|
89
|
-
return _setPrototypeOf(o, p);
|
|
83
|
+
function _inheritsLoose(t, o) {
|
|
84
|
+
t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
|
|
90
85
|
}
|
|
91
|
-
function
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
return self;
|
|
86
|
+
function _setPrototypeOf(t, e) {
|
|
87
|
+
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
|
88
|
+
return t.__proto__ = e, t;
|
|
89
|
+
}, _setPrototypeOf(t, e);
|
|
96
90
|
}
|
|
97
91
|
|
|
98
92
|
/**
|
|
@@ -211,18 +205,10 @@
|
|
|
211
205
|
}
|
|
212
206
|
return r;
|
|
213
207
|
};
|
|
214
|
-
MathUtil.parseInt = function (
|
|
215
|
-
function parseInt(_x) {
|
|
216
|
-
return _parseInt.apply(this, arguments);
|
|
217
|
-
}
|
|
218
|
-
parseInt.toString = function () {
|
|
219
|
-
return _parseInt.toString();
|
|
220
|
-
};
|
|
221
|
-
return parseInt;
|
|
222
|
-
}(function (value) {
|
|
208
|
+
MathUtil.parseInt = function (value) {
|
|
223
209
|
var r = parseInt(value);
|
|
224
210
|
return MathUtil.safeToInt(r);
|
|
225
|
-
}
|
|
211
|
+
};
|
|
226
212
|
MathUtil.safeToInt = function safeToInt(value) {
|
|
227
213
|
MathUtil.verifyInt(value);
|
|
228
214
|
return MathUtil.safeZero(value);
|
|
@@ -369,7 +355,6 @@
|
|
|
369
355
|
}();
|
|
370
356
|
|
|
371
357
|
var Duration = function (_TemporalAmount) {
|
|
372
|
-
_inheritsLoose(Duration, _TemporalAmount);
|
|
373
358
|
function Duration(seconds, nanos) {
|
|
374
359
|
var _this;
|
|
375
360
|
_this = _TemporalAmount.call(this) || this;
|
|
@@ -377,6 +362,7 @@
|
|
|
377
362
|
_this._nanos = MathUtil.safeToInt(nanos);
|
|
378
363
|
return _this;
|
|
379
364
|
}
|
|
365
|
+
_inheritsLoose(Duration, _TemporalAmount);
|
|
380
366
|
Duration.ofDays = function ofDays(days) {
|
|
381
367
|
return Duration._create(MathUtil.safeMultiply(days, LocalTime.SECONDS_PER_DAY), 0);
|
|
382
368
|
};
|
|
@@ -825,7 +811,6 @@
|
|
|
825
811
|
}
|
|
826
812
|
|
|
827
813
|
var ChronoUnit = function (_TemporalUnit) {
|
|
828
|
-
_inheritsLoose(ChronoUnit, _TemporalUnit);
|
|
829
814
|
function ChronoUnit(name, estimatedDuration) {
|
|
830
815
|
var _this;
|
|
831
816
|
_this = _TemporalUnit.call(this) || this;
|
|
@@ -833,6 +818,7 @@
|
|
|
833
818
|
_this._duration = estimatedDuration;
|
|
834
819
|
return _this;
|
|
835
820
|
}
|
|
821
|
+
_inheritsLoose(ChronoUnit, _TemporalUnit);
|
|
836
822
|
var _proto = ChronoUnit.prototype;
|
|
837
823
|
_proto.duration = function duration() {
|
|
838
824
|
return this._duration;
|
|
@@ -1034,6 +1020,15 @@
|
|
|
1034
1020
|
}();
|
|
1035
1021
|
|
|
1036
1022
|
var ChronoField = function (_TemporalField) {
|
|
1023
|
+
function ChronoField(name, baseUnit, rangeUnit, range) {
|
|
1024
|
+
var _this;
|
|
1025
|
+
_this = _TemporalField.call(this) || this;
|
|
1026
|
+
_this._name = name;
|
|
1027
|
+
_this._baseUnit = baseUnit;
|
|
1028
|
+
_this._rangeUnit = rangeUnit;
|
|
1029
|
+
_this._range = range;
|
|
1030
|
+
return _this;
|
|
1031
|
+
}
|
|
1037
1032
|
_inheritsLoose(ChronoField, _TemporalField);
|
|
1038
1033
|
ChronoField.byName = function byName(fieldName) {
|
|
1039
1034
|
for (var prop in ChronoField) {
|
|
@@ -1044,15 +1039,6 @@
|
|
|
1044
1039
|
}
|
|
1045
1040
|
}
|
|
1046
1041
|
};
|
|
1047
|
-
function ChronoField(name, baseUnit, rangeUnit, range) {
|
|
1048
|
-
var _this;
|
|
1049
|
-
_this = _TemporalField.call(this) || this;
|
|
1050
|
-
_this._name = name;
|
|
1051
|
-
_this._baseUnit = baseUnit;
|
|
1052
|
-
_this._rangeUnit = rangeUnit;
|
|
1053
|
-
_this._range = range;
|
|
1054
|
-
return _this;
|
|
1055
|
-
}
|
|
1056
1042
|
var _proto = ChronoField.prototype;
|
|
1057
1043
|
_proto.name = function name() {
|
|
1058
1044
|
return this._name;
|
|
@@ -1203,10 +1189,10 @@
|
|
|
1203
1189
|
}();
|
|
1204
1190
|
|
|
1205
1191
|
var TemporalQuery = function (_Enum) {
|
|
1206
|
-
_inheritsLoose(TemporalQuery, _Enum);
|
|
1207
1192
|
function TemporalQuery() {
|
|
1208
1193
|
return _Enum.apply(this, arguments) || this;
|
|
1209
1194
|
}
|
|
1195
|
+
_inheritsLoose(TemporalQuery, _Enum);
|
|
1210
1196
|
var _proto = TemporalQuery.prototype;
|
|
1211
1197
|
_proto.queryFrom = function queryFrom(temporal) {
|
|
1212
1198
|
abstractMethodFail('queryFrom');
|
|
@@ -1215,10 +1201,10 @@
|
|
|
1215
1201
|
}(Enum);
|
|
1216
1202
|
function createTemporalQuery(name, queryFromFunction) {
|
|
1217
1203
|
var ExtendedTemporalQuery = function (_TemporalQuery) {
|
|
1218
|
-
_inheritsLoose(ExtendedTemporalQuery, _TemporalQuery);
|
|
1219
1204
|
function ExtendedTemporalQuery() {
|
|
1220
1205
|
return _TemporalQuery.apply(this, arguments) || this;
|
|
1221
1206
|
}
|
|
1207
|
+
_inheritsLoose(ExtendedTemporalQuery, _TemporalQuery);
|
|
1222
1208
|
return ExtendedTemporalQuery;
|
|
1223
1209
|
}(TemporalQuery);
|
|
1224
1210
|
ExtendedTemporalQuery.prototype.queryFrom = queryFromFunction;
|
|
@@ -1226,7 +1212,6 @@
|
|
|
1226
1212
|
}
|
|
1227
1213
|
|
|
1228
1214
|
var DayOfWeek = function (_TemporalAccessor) {
|
|
1229
|
-
_inheritsLoose(DayOfWeek, _TemporalAccessor);
|
|
1230
1215
|
function DayOfWeek(ordinal, name) {
|
|
1231
1216
|
var _this;
|
|
1232
1217
|
_this = _TemporalAccessor.call(this) || this;
|
|
@@ -1234,6 +1219,7 @@
|
|
|
1234
1219
|
_this._name = name;
|
|
1235
1220
|
return _this;
|
|
1236
1221
|
}
|
|
1222
|
+
_inheritsLoose(DayOfWeek, _TemporalAccessor);
|
|
1237
1223
|
var _proto = DayOfWeek.prototype;
|
|
1238
1224
|
_proto.ordinal = function ordinal() {
|
|
1239
1225
|
return this._ordinal;
|
|
@@ -1360,7 +1346,6 @@
|
|
|
1360
1346
|
}
|
|
1361
1347
|
|
|
1362
1348
|
var Month = function (_TemporalAccessor) {
|
|
1363
|
-
_inheritsLoose(Month, _TemporalAccessor);
|
|
1364
1349
|
function Month(value, name) {
|
|
1365
1350
|
var _this;
|
|
1366
1351
|
_this = _TemporalAccessor.call(this) || this;
|
|
@@ -1368,6 +1353,7 @@
|
|
|
1368
1353
|
_this._name = name;
|
|
1369
1354
|
return _this;
|
|
1370
1355
|
}
|
|
1356
|
+
_inheritsLoose(Month, _TemporalAccessor);
|
|
1371
1357
|
var _proto = Month.prototype;
|
|
1372
1358
|
_proto.value = function value() {
|
|
1373
1359
|
return this._value;
|
|
@@ -1605,7 +1591,6 @@
|
|
|
1605
1591
|
|
|
1606
1592
|
var PATTERN = /([-+]?)P(?:([-+]?[0-9]+)Y)?(?:([-+]?[0-9]+)M)?(?:([-+]?[0-9]+)W)?(?:([-+]?[0-9]+)D)?/;
|
|
1607
1593
|
var Period = function (_TemporalAmount) {
|
|
1608
|
-
_inheritsLoose(Period, _TemporalAmount);
|
|
1609
1594
|
function Period(years, months, days) {
|
|
1610
1595
|
var _this;
|
|
1611
1596
|
_this = _TemporalAmount.call(this) || this;
|
|
@@ -1617,7 +1602,7 @@
|
|
|
1617
1602
|
_this._years = _years;
|
|
1618
1603
|
_this._months = _months;
|
|
1619
1604
|
_this._days = _days;
|
|
1620
|
-
Period.ZERO =
|
|
1605
|
+
Period.ZERO = _this;
|
|
1621
1606
|
}
|
|
1622
1607
|
return Period.ZERO || _assertThisInitialized(_this);
|
|
1623
1608
|
}
|
|
@@ -1626,6 +1611,7 @@
|
|
|
1626
1611
|
_this._days = _days;
|
|
1627
1612
|
return _this;
|
|
1628
1613
|
}
|
|
1614
|
+
_inheritsLoose(Period, _TemporalAmount);
|
|
1629
1615
|
Period.ofYears = function ofYears(years) {
|
|
1630
1616
|
return Period.create(years, 0, 0);
|
|
1631
1617
|
};
|
|
@@ -1969,10 +1955,10 @@
|
|
|
1969
1955
|
}();
|
|
1970
1956
|
|
|
1971
1957
|
var ResolverStyle = function (_Enum) {
|
|
1972
|
-
_inheritsLoose(ResolverStyle, _Enum);
|
|
1973
1958
|
function ResolverStyle() {
|
|
1974
1959
|
return _Enum.apply(this, arguments) || this;
|
|
1975
1960
|
}
|
|
1961
|
+
_inheritsLoose(ResolverStyle, _Enum);
|
|
1976
1962
|
return ResolverStyle;
|
|
1977
1963
|
}(Enum);
|
|
1978
1964
|
ResolverStyle.STRICT = new ResolverStyle('STRICT');
|
|
@@ -1980,10 +1966,10 @@
|
|
|
1980
1966
|
ResolverStyle.LENIENT = new ResolverStyle('LENIENT');
|
|
1981
1967
|
|
|
1982
1968
|
var Temporal = function (_TemporalAccessor) {
|
|
1983
|
-
_inheritsLoose(Temporal, _TemporalAccessor);
|
|
1984
1969
|
function Temporal() {
|
|
1985
1970
|
return _TemporalAccessor.apply(this, arguments) || this;
|
|
1986
1971
|
}
|
|
1972
|
+
_inheritsLoose(Temporal, _TemporalAccessor);
|
|
1987
1973
|
var _proto = Temporal.prototype;
|
|
1988
1974
|
_proto.isSupported = function isSupported(fieldOrUnit) {
|
|
1989
1975
|
abstractMethodFail('isSupported');
|
|
@@ -2051,10 +2037,10 @@
|
|
|
2051
2037
|
}
|
|
2052
2038
|
|
|
2053
2039
|
var ChronoLocalDate = function (_Temporal) {
|
|
2054
|
-
_inheritsLoose(ChronoLocalDate, _Temporal);
|
|
2055
2040
|
function ChronoLocalDate() {
|
|
2056
2041
|
return _Temporal.apply(this, arguments) || this;
|
|
2057
2042
|
}
|
|
2043
|
+
_inheritsLoose(ChronoLocalDate, _Temporal);
|
|
2058
2044
|
var _proto = ChronoLocalDate.prototype;
|
|
2059
2045
|
_proto.isSupported = function isSupported(fieldOrUnit) {
|
|
2060
2046
|
if (fieldOrUnit instanceof ChronoField) {
|
|
@@ -2236,13 +2222,13 @@
|
|
|
2236
2222
|
return ZoneRules;
|
|
2237
2223
|
}();
|
|
2238
2224
|
var Fixed = function (_ZoneRules) {
|
|
2239
|
-
_inheritsLoose(Fixed, _ZoneRules);
|
|
2240
2225
|
function Fixed(offset) {
|
|
2241
2226
|
var _this;
|
|
2242
2227
|
_this = _ZoneRules.call(this) || this;
|
|
2243
2228
|
_this._offset = offset;
|
|
2244
2229
|
return _this;
|
|
2245
2230
|
}
|
|
2231
|
+
_inheritsLoose(Fixed, _ZoneRules);
|
|
2246
2232
|
var _proto2 = Fixed.prototype;
|
|
2247
2233
|
_proto2.isFixedOffset = function isFixedOffset() {
|
|
2248
2234
|
return true;
|
|
@@ -2304,16 +2290,16 @@
|
|
|
2304
2290
|
var SECONDS_CACHE = {};
|
|
2305
2291
|
var ID_CACHE = {};
|
|
2306
2292
|
var ZoneOffset = function (_ZoneId) {
|
|
2307
|
-
_inheritsLoose(ZoneOffset, _ZoneId);
|
|
2308
2293
|
function ZoneOffset(totalSeconds) {
|
|
2309
2294
|
var _this;
|
|
2310
2295
|
_this = _ZoneId.call(this) || this;
|
|
2311
2296
|
ZoneOffset._validateTotalSeconds(totalSeconds);
|
|
2312
2297
|
_this._totalSeconds = MathUtil.safeToInt(totalSeconds);
|
|
2313
|
-
_this._rules = ZoneRules.of(
|
|
2298
|
+
_this._rules = ZoneRules.of(_this);
|
|
2314
2299
|
_this._id = ZoneOffset._buildId(totalSeconds);
|
|
2315
2300
|
return _this;
|
|
2316
2301
|
}
|
|
2302
|
+
_inheritsLoose(ZoneOffset, _ZoneId);
|
|
2317
2303
|
var _proto = ZoneOffset.prototype;
|
|
2318
2304
|
_proto.totalSeconds = function totalSeconds() {
|
|
2319
2305
|
return this._totalSeconds;
|
|
@@ -2509,12 +2495,6 @@
|
|
|
2509
2495
|
}
|
|
2510
2496
|
|
|
2511
2497
|
var DateTimeBuilder = function (_TemporalAccessor) {
|
|
2512
|
-
_inheritsLoose(DateTimeBuilder, _TemporalAccessor);
|
|
2513
|
-
DateTimeBuilder.create = function create(field, value) {
|
|
2514
|
-
var dtb = new DateTimeBuilder();
|
|
2515
|
-
dtb._addFieldValue(field, value);
|
|
2516
|
-
return dtb;
|
|
2517
|
-
};
|
|
2518
2498
|
function DateTimeBuilder() {
|
|
2519
2499
|
var _this;
|
|
2520
2500
|
_this = _TemporalAccessor.call(this) || this;
|
|
@@ -2527,6 +2507,12 @@
|
|
|
2527
2507
|
_this.excessDays = null;
|
|
2528
2508
|
return _this;
|
|
2529
2509
|
}
|
|
2510
|
+
_inheritsLoose(DateTimeBuilder, _TemporalAccessor);
|
|
2511
|
+
DateTimeBuilder.create = function create(field, value) {
|
|
2512
|
+
var dtb = new DateTimeBuilder();
|
|
2513
|
+
dtb._addFieldValue(field, value);
|
|
2514
|
+
return dtb;
|
|
2515
|
+
};
|
|
2530
2516
|
var _proto = DateTimeBuilder.prototype;
|
|
2531
2517
|
_proto.getFieldValue0 = function getFieldValue0(field) {
|
|
2532
2518
|
return this.fieldValues.get(field);
|
|
@@ -2964,7 +2950,6 @@
|
|
|
2964
2950
|
return DateTimeParseContext;
|
|
2965
2951
|
}();
|
|
2966
2952
|
var Parsed = function (_Temporal) {
|
|
2967
|
-
_inheritsLoose(Parsed, _Temporal);
|
|
2968
2953
|
function Parsed(dateTimeParseContext) {
|
|
2969
2954
|
var _this;
|
|
2970
2955
|
_this = _Temporal.call(this) || this;
|
|
@@ -2975,6 +2960,7 @@
|
|
|
2975
2960
|
_this.dateTimeParseContext = dateTimeParseContext;
|
|
2976
2961
|
return _this;
|
|
2977
2962
|
}
|
|
2963
|
+
_inheritsLoose(Parsed, _Temporal);
|
|
2978
2964
|
var _proto2 = Parsed.prototype;
|
|
2979
2965
|
_proto2.copy = function copy() {
|
|
2980
2966
|
var cloned = new Parsed();
|
|
@@ -3088,10 +3074,10 @@
|
|
|
3088
3074
|
var IsoFields = {};
|
|
3089
3075
|
var QUARTER_DAYS = [0, 90, 181, 273, 0, 91, 182, 274];
|
|
3090
3076
|
var Field = function (_TemporalField) {
|
|
3091
|
-
_inheritsLoose(Field, _TemporalField);
|
|
3092
3077
|
function Field() {
|
|
3093
3078
|
return _TemporalField.apply(this, arguments) || this;
|
|
3094
3079
|
}
|
|
3080
|
+
_inheritsLoose(Field, _TemporalField);
|
|
3095
3081
|
var _proto = Field.prototype;
|
|
3096
3082
|
_proto.isDateBased = function isDateBased() {
|
|
3097
3083
|
return true;
|
|
@@ -3163,10 +3149,10 @@
|
|
|
3163
3149
|
return Field;
|
|
3164
3150
|
}(TemporalField);
|
|
3165
3151
|
var DAY_OF_QUARTER_FIELD = function (_Field) {
|
|
3166
|
-
_inheritsLoose(DAY_OF_QUARTER_FIELD, _Field);
|
|
3167
3152
|
function DAY_OF_QUARTER_FIELD() {
|
|
3168
3153
|
return _Field.apply(this, arguments) || this;
|
|
3169
3154
|
}
|
|
3155
|
+
_inheritsLoose(DAY_OF_QUARTER_FIELD, _Field);
|
|
3170
3156
|
var _proto2 = DAY_OF_QUARTER_FIELD.prototype;
|
|
3171
3157
|
_proto2.toString = function toString() {
|
|
3172
3158
|
return 'DayOfQuarter';
|
|
@@ -3249,10 +3235,10 @@
|
|
|
3249
3235
|
return DAY_OF_QUARTER_FIELD;
|
|
3250
3236
|
}(Field);
|
|
3251
3237
|
var QUARTER_OF_YEAR_FIELD = function (_Field2) {
|
|
3252
|
-
_inheritsLoose(QUARTER_OF_YEAR_FIELD, _Field2);
|
|
3253
3238
|
function QUARTER_OF_YEAR_FIELD() {
|
|
3254
3239
|
return _Field2.apply(this, arguments) || this;
|
|
3255
3240
|
}
|
|
3241
|
+
_inheritsLoose(QUARTER_OF_YEAR_FIELD, _Field2);
|
|
3256
3242
|
var _proto3 = QUARTER_OF_YEAR_FIELD.prototype;
|
|
3257
3243
|
_proto3.toString = function toString() {
|
|
3258
3244
|
return 'QuarterOfYear';
|
|
@@ -3287,10 +3273,10 @@
|
|
|
3287
3273
|
return QUARTER_OF_YEAR_FIELD;
|
|
3288
3274
|
}(Field);
|
|
3289
3275
|
var WEEK_OF_WEEK_BASED_YEAR_FIELD = function (_Field3) {
|
|
3290
|
-
_inheritsLoose(WEEK_OF_WEEK_BASED_YEAR_FIELD, _Field3);
|
|
3291
3276
|
function WEEK_OF_WEEK_BASED_YEAR_FIELD() {
|
|
3292
3277
|
return _Field3.apply(this, arguments) || this;
|
|
3293
3278
|
}
|
|
3279
|
+
_inheritsLoose(WEEK_OF_WEEK_BASED_YEAR_FIELD, _Field3);
|
|
3294
3280
|
var _proto4 = WEEK_OF_WEEK_BASED_YEAR_FIELD.prototype;
|
|
3295
3281
|
_proto4.toString = function toString() {
|
|
3296
3282
|
return 'WeekOfWeekBasedYear';
|
|
@@ -3365,10 +3351,10 @@
|
|
|
3365
3351
|
return WEEK_OF_WEEK_BASED_YEAR_FIELD;
|
|
3366
3352
|
}(Field);
|
|
3367
3353
|
var WEEK_BASED_YEAR_FIELD = function (_Field4) {
|
|
3368
|
-
_inheritsLoose(WEEK_BASED_YEAR_FIELD, _Field4);
|
|
3369
3354
|
function WEEK_BASED_YEAR_FIELD() {
|
|
3370
3355
|
return _Field4.apply(this, arguments) || this;
|
|
3371
3356
|
}
|
|
3357
|
+
_inheritsLoose(WEEK_BASED_YEAR_FIELD, _Field4);
|
|
3372
3358
|
var _proto5 = WEEK_BASED_YEAR_FIELD.prototype;
|
|
3373
3359
|
_proto5.toString = function toString() {
|
|
3374
3360
|
return 'WeekBasedYear';
|
|
@@ -3413,7 +3399,6 @@
|
|
|
3413
3399
|
return WEEK_BASED_YEAR_FIELD;
|
|
3414
3400
|
}(Field);
|
|
3415
3401
|
var Unit = function (_TemporalUnit) {
|
|
3416
|
-
_inheritsLoose(Unit, _TemporalUnit);
|
|
3417
3402
|
function Unit(name, estimatedDuration) {
|
|
3418
3403
|
var _this;
|
|
3419
3404
|
_this = _TemporalUnit.call(this) || this;
|
|
@@ -3421,6 +3406,7 @@
|
|
|
3421
3406
|
_this._duration = estimatedDuration;
|
|
3422
3407
|
return _this;
|
|
3423
3408
|
}
|
|
3409
|
+
_inheritsLoose(Unit, _TemporalUnit);
|
|
3424
3410
|
var _proto6 = Unit.prototype;
|
|
3425
3411
|
_proto6.duration = function duration() {
|
|
3426
3412
|
return this._duration;
|
|
@@ -3584,10 +3570,10 @@
|
|
|
3584
3570
|
DecimalStyle.STANDARD = new DecimalStyle('0', '+', '-', '.');
|
|
3585
3571
|
|
|
3586
3572
|
var SignStyle = function (_Enum) {
|
|
3587
|
-
_inheritsLoose(SignStyle, _Enum);
|
|
3588
3573
|
function SignStyle() {
|
|
3589
3574
|
return _Enum.apply(this, arguments) || this;
|
|
3590
3575
|
}
|
|
3576
|
+
_inheritsLoose(SignStyle, _Enum);
|
|
3591
3577
|
var _proto = SignStyle.prototype;
|
|
3592
3578
|
_proto.parse = function parse(positive, strict, fixedWidth) {
|
|
3593
3579
|
switch (this) {
|
|
@@ -3609,10 +3595,10 @@
|
|
|
3609
3595
|
SignStyle.NOT_NEGATIVE = new SignStyle('NOT_NEGATIVE');
|
|
3610
3596
|
|
|
3611
3597
|
var TextStyle = function (_Enum) {
|
|
3612
|
-
_inheritsLoose(TextStyle, _Enum);
|
|
3613
3598
|
function TextStyle() {
|
|
3614
3599
|
return _Enum.apply(this, arguments) || this;
|
|
3615
3600
|
}
|
|
3601
|
+
_inheritsLoose(TextStyle, _Enum);
|
|
3616
3602
|
var _proto = TextStyle.prototype;
|
|
3617
3603
|
_proto.isStandalone = function isStandalone() {
|
|
3618
3604
|
switch (this) {
|
|
@@ -4073,7 +4059,6 @@
|
|
|
4073
4059
|
return NumberPrinterParser;
|
|
4074
4060
|
}();
|
|
4075
4061
|
var ReducedPrinterParser = function (_NumberPrinterParser) {
|
|
4076
|
-
_inheritsLoose(ReducedPrinterParser, _NumberPrinterParser);
|
|
4077
4062
|
function ReducedPrinterParser(field, width, maxWidth, baseValue, baseDate) {
|
|
4078
4063
|
var _this;
|
|
4079
4064
|
_this = _NumberPrinterParser.call(this, field, width, maxWidth, SignStyle.NOT_NEGATIVE) || this;
|
|
@@ -4098,6 +4083,7 @@
|
|
|
4098
4083
|
_this._baseDate = baseDate;
|
|
4099
4084
|
return _this;
|
|
4100
4085
|
}
|
|
4086
|
+
_inheritsLoose(ReducedPrinterParser, _NumberPrinterParser);
|
|
4101
4087
|
var _proto2 = ReducedPrinterParser.prototype;
|
|
4102
4088
|
_proto2._getValue = function _getValue(context, value) {
|
|
4103
4089
|
var absValue = Math.abs(value);
|
|
@@ -4334,10 +4320,10 @@
|
|
|
4334
4320
|
}();
|
|
4335
4321
|
|
|
4336
4322
|
var SettingsParser = function (_Enum) {
|
|
4337
|
-
_inheritsLoose(SettingsParser, _Enum);
|
|
4338
4323
|
function SettingsParser() {
|
|
4339
4324
|
return _Enum.apply(this, arguments) || this;
|
|
4340
4325
|
}
|
|
4326
|
+
_inheritsLoose(SettingsParser, _Enum);
|
|
4341
4327
|
var _proto = SettingsParser.prototype;
|
|
4342
4328
|
_proto.print = function print() {
|
|
4343
4329
|
return true;
|
|
@@ -4426,11 +4412,6 @@
|
|
|
4426
4412
|
}();
|
|
4427
4413
|
|
|
4428
4414
|
var ZoneRegion = function (_ZoneId) {
|
|
4429
|
-
_inheritsLoose(ZoneRegion, _ZoneId);
|
|
4430
|
-
ZoneRegion.ofId = function ofId(zoneId) {
|
|
4431
|
-
var rules = ZoneRulesProvider.getRules(zoneId);
|
|
4432
|
-
return new ZoneRegion(zoneId, rules);
|
|
4433
|
-
};
|
|
4434
4415
|
function ZoneRegion(id, rules) {
|
|
4435
4416
|
var _this;
|
|
4436
4417
|
_this = _ZoneId.call(this) || this;
|
|
@@ -4438,6 +4419,11 @@
|
|
|
4438
4419
|
_this._rules = rules;
|
|
4439
4420
|
return _this;
|
|
4440
4421
|
}
|
|
4422
|
+
_inheritsLoose(ZoneRegion, _ZoneId);
|
|
4423
|
+
ZoneRegion.ofId = function ofId(zoneId) {
|
|
4424
|
+
var rules = ZoneRulesProvider.getRules(zoneId);
|
|
4425
|
+
return new ZoneRegion(zoneId, rules);
|
|
4426
|
+
};
|
|
4441
4427
|
var _proto = ZoneRegion.prototype;
|
|
4442
4428
|
_proto.id = function id() {
|
|
4443
4429
|
return this._id;
|
|
@@ -4551,6 +4537,10 @@
|
|
|
4551
4537
|
return ZoneIdPrinterParser;
|
|
4552
4538
|
}();
|
|
4553
4539
|
var ZoneIdTree = function () {
|
|
4540
|
+
function ZoneIdTree(size, treeMap) {
|
|
4541
|
+
this.size = size;
|
|
4542
|
+
this.treeMap = treeMap;
|
|
4543
|
+
}
|
|
4554
4544
|
ZoneIdTree.createTreeMap = function createTreeMap(availableZoneIds) {
|
|
4555
4545
|
var sortedZoneIds = availableZoneIds.sort(function (a, b) {
|
|
4556
4546
|
return a.length - b.length;
|
|
@@ -4561,10 +4551,6 @@
|
|
|
4561
4551
|
}
|
|
4562
4552
|
return new ZoneIdTree(sortedZoneIds.length, treeMap);
|
|
4563
4553
|
};
|
|
4564
|
-
function ZoneIdTree(size, treeMap) {
|
|
4565
|
-
this.size = size;
|
|
4566
|
-
this.treeMap = treeMap;
|
|
4567
|
-
}
|
|
4568
4554
|
return ZoneIdTree;
|
|
4569
4555
|
}();
|
|
4570
4556
|
var ZoneIdTreeMap = function () {
|
|
@@ -5365,15 +5351,6 @@
|
|
|
5365
5351
|
*/
|
|
5366
5352
|
|
|
5367
5353
|
var DateTimeFormatter = function () {
|
|
5368
|
-
DateTimeFormatter.parsedExcessDays = function parsedExcessDays() {
|
|
5369
|
-
return DateTimeFormatter.PARSED_EXCESS_DAYS;
|
|
5370
|
-
};
|
|
5371
|
-
DateTimeFormatter.parsedLeapSecond = function parsedLeapSecond() {
|
|
5372
|
-
return DateTimeFormatter.PARSED_LEAP_SECOND;
|
|
5373
|
-
};
|
|
5374
|
-
DateTimeFormatter.ofPattern = function ofPattern(pattern) {
|
|
5375
|
-
return new DateTimeFormatterBuilder().appendPattern(pattern).toFormatter();
|
|
5376
|
-
};
|
|
5377
5354
|
function DateTimeFormatter(printerParser, locale, decimalStyle, resolverStyle, resolverFields, chrono, zone) {
|
|
5378
5355
|
if (chrono === void 0) {
|
|
5379
5356
|
chrono = IsoChronology.INSTANCE;
|
|
@@ -5389,6 +5366,15 @@
|
|
|
5389
5366
|
this._chrono = chrono;
|
|
5390
5367
|
this._zone = zone;
|
|
5391
5368
|
}
|
|
5369
|
+
DateTimeFormatter.parsedExcessDays = function parsedExcessDays() {
|
|
5370
|
+
return DateTimeFormatter.PARSED_EXCESS_DAYS;
|
|
5371
|
+
};
|
|
5372
|
+
DateTimeFormatter.parsedLeapSecond = function parsedLeapSecond() {
|
|
5373
|
+
return DateTimeFormatter.PARSED_LEAP_SECOND;
|
|
5374
|
+
};
|
|
5375
|
+
DateTimeFormatter.ofPattern = function ofPattern(pattern) {
|
|
5376
|
+
return new DateTimeFormatterBuilder().appendPattern(pattern).toFormatter();
|
|
5377
|
+
};
|
|
5392
5378
|
var _proto = DateTimeFormatter.prototype;
|
|
5393
5379
|
_proto.locale = function locale() {
|
|
5394
5380
|
return this._locale;
|
|
@@ -5543,6 +5529,13 @@
|
|
|
5543
5529
|
}
|
|
5544
5530
|
|
|
5545
5531
|
var MonthDay = function (_TemporalAccessor) {
|
|
5532
|
+
function MonthDay(month, dayOfMonth) {
|
|
5533
|
+
var _this;
|
|
5534
|
+
_this = _TemporalAccessor.call(this) || this;
|
|
5535
|
+
_this._month = MathUtil.safeToInt(month);
|
|
5536
|
+
_this._day = MathUtil.safeToInt(dayOfMonth);
|
|
5537
|
+
return _this;
|
|
5538
|
+
}
|
|
5546
5539
|
_inheritsLoose(MonthDay, _TemporalAccessor);
|
|
5547
5540
|
MonthDay.now = function now(zoneIdOrClock) {
|
|
5548
5541
|
if (arguments.length === 0) {
|
|
@@ -5613,13 +5606,6 @@
|
|
|
5613
5606
|
requireInstance(formatter, DateTimeFormatter, 'formatter');
|
|
5614
5607
|
return formatter.parse(text, MonthDay.FROM);
|
|
5615
5608
|
};
|
|
5616
|
-
function MonthDay(month, dayOfMonth) {
|
|
5617
|
-
var _this;
|
|
5618
|
-
_this = _TemporalAccessor.call(this) || this;
|
|
5619
|
-
_this._month = MathUtil.safeToInt(month);
|
|
5620
|
-
_this._day = MathUtil.safeToInt(dayOfMonth);
|
|
5621
|
-
return _this;
|
|
5622
|
-
}
|
|
5623
5609
|
var _proto = MonthDay.prototype;
|
|
5624
5610
|
_proto.monthValue = function monthValue() {
|
|
5625
5611
|
return this._month;
|
|
@@ -5747,6 +5733,13 @@
|
|
|
5747
5733
|
}
|
|
5748
5734
|
|
|
5749
5735
|
var YearMonth = function (_Temporal) {
|
|
5736
|
+
function YearMonth(year, month) {
|
|
5737
|
+
var _this;
|
|
5738
|
+
_this = _Temporal.call(this) || this;
|
|
5739
|
+
_this._year = MathUtil.safeToInt(year);
|
|
5740
|
+
_this._month = MathUtil.safeToInt(month);
|
|
5741
|
+
return _this;
|
|
5742
|
+
}
|
|
5750
5743
|
_inheritsLoose(YearMonth, _Temporal);
|
|
5751
5744
|
YearMonth.now = function now(zoneIdOrClock) {
|
|
5752
5745
|
if (arguments.length === 0) {
|
|
@@ -5811,13 +5804,6 @@
|
|
|
5811
5804
|
requireNonNull(formatter, 'formatter');
|
|
5812
5805
|
return formatter.parse(text, YearMonth.FROM);
|
|
5813
5806
|
};
|
|
5814
|
-
function YearMonth(year, month) {
|
|
5815
|
-
var _this;
|
|
5816
|
-
_this = _Temporal.call(this) || this;
|
|
5817
|
-
_this._year = MathUtil.safeToInt(year);
|
|
5818
|
-
_this._month = MathUtil.safeToInt(month);
|
|
5819
|
-
return _this;
|
|
5820
|
-
}
|
|
5821
5807
|
var _proto = YearMonth.prototype;
|
|
5822
5808
|
_proto.isSupported = function isSupported(fieldOrUnit) {
|
|
5823
5809
|
if (arguments.length === 1 && fieldOrUnit instanceof TemporalField) {
|
|
@@ -6071,13 +6057,13 @@
|
|
|
6071
6057
|
}
|
|
6072
6058
|
|
|
6073
6059
|
var Year = function (_Temporal) {
|
|
6074
|
-
_inheritsLoose(Year, _Temporal);
|
|
6075
6060
|
function Year(value) {
|
|
6076
6061
|
var _this;
|
|
6077
6062
|
_this = _Temporal.call(this) || this;
|
|
6078
6063
|
_this._year = MathUtil.safeToInt(value);
|
|
6079
6064
|
return _this;
|
|
6080
6065
|
}
|
|
6066
|
+
_inheritsLoose(Year, _Temporal);
|
|
6081
6067
|
var _proto = Year.prototype;
|
|
6082
6068
|
_proto.value = function value() {
|
|
6083
6069
|
return this._year;
|
|
@@ -6418,13 +6404,13 @@
|
|
|
6418
6404
|
return TemporalAdjusters;
|
|
6419
6405
|
}();
|
|
6420
6406
|
var Impl = function (_TemporalAdjuster) {
|
|
6421
|
-
_inheritsLoose(Impl, _TemporalAdjuster);
|
|
6422
6407
|
function Impl(ordinal) {
|
|
6423
6408
|
var _this;
|
|
6424
6409
|
_this = _TemporalAdjuster.call(this) || this;
|
|
6425
6410
|
_this._ordinal = ordinal;
|
|
6426
6411
|
return _this;
|
|
6427
6412
|
}
|
|
6413
|
+
_inheritsLoose(Impl, _TemporalAdjuster);
|
|
6428
6414
|
var _proto = Impl.prototype;
|
|
6429
6415
|
_proto.adjustInto = function adjustInto(temporal) {
|
|
6430
6416
|
switch (this._ordinal) {
|
|
@@ -6452,7 +6438,6 @@
|
|
|
6452
6438
|
Impl.LAST_DAY_OF_YEAR = new Impl(4);
|
|
6453
6439
|
Impl.FIRST_DAY_OF_NEXT_YEAR = new Impl(5);
|
|
6454
6440
|
var DayOfWeekInMonth = function (_TemporalAdjuster2) {
|
|
6455
|
-
_inheritsLoose(DayOfWeekInMonth, _TemporalAdjuster2);
|
|
6456
6441
|
function DayOfWeekInMonth(ordinal, dow) {
|
|
6457
6442
|
var _this2;
|
|
6458
6443
|
_this2 = _TemporalAdjuster2.call(this) || this;
|
|
@@ -6460,6 +6445,7 @@
|
|
|
6460
6445
|
_this2._dowValue = dow.value();
|
|
6461
6446
|
return _this2;
|
|
6462
6447
|
}
|
|
6448
|
+
_inheritsLoose(DayOfWeekInMonth, _TemporalAdjuster2);
|
|
6463
6449
|
var _proto2 = DayOfWeekInMonth.prototype;
|
|
6464
6450
|
_proto2.adjustInto = function adjustInto(temporal) {
|
|
6465
6451
|
if (this._ordinal >= 0) {
|
|
@@ -6480,7 +6466,6 @@
|
|
|
6480
6466
|
return DayOfWeekInMonth;
|
|
6481
6467
|
}(TemporalAdjuster);
|
|
6482
6468
|
var RelativeDayOfWeek = function (_TemporalAdjuster3) {
|
|
6483
|
-
_inheritsLoose(RelativeDayOfWeek, _TemporalAdjuster3);
|
|
6484
6469
|
function RelativeDayOfWeek(relative, dayOfWeek) {
|
|
6485
6470
|
var _this3;
|
|
6486
6471
|
_this3 = _TemporalAdjuster3.call(this) || this;
|
|
@@ -6489,6 +6474,7 @@
|
|
|
6489
6474
|
_this3._dowValue = dayOfWeek.value();
|
|
6490
6475
|
return _this3;
|
|
6491
6476
|
}
|
|
6477
|
+
_inheritsLoose(RelativeDayOfWeek, _TemporalAdjuster3);
|
|
6492
6478
|
var _proto3 = RelativeDayOfWeek.prototype;
|
|
6493
6479
|
_proto3.adjustInto = function adjustInto(temporal) {
|
|
6494
6480
|
var calDow = temporal.get(ChronoField.DAY_OF_WEEK);
|
|
@@ -6507,10 +6493,10 @@
|
|
|
6507
6493
|
}(TemporalAdjuster);
|
|
6508
6494
|
|
|
6509
6495
|
var IsoChronology = function (_Enum) {
|
|
6510
|
-
_inheritsLoose(IsoChronology, _Enum);
|
|
6511
6496
|
function IsoChronology() {
|
|
6512
6497
|
return _Enum.apply(this, arguments) || this;
|
|
6513
6498
|
}
|
|
6499
|
+
_inheritsLoose(IsoChronology, _Enum);
|
|
6514
6500
|
IsoChronology.isLeapYear = function isLeapYear(prolepticYear) {
|
|
6515
6501
|
return (prolepticYear & 3) === 0 && (prolepticYear % 100 !== 0 || prolepticYear % 400 === 0);
|
|
6516
6502
|
};
|
|
@@ -6640,6 +6626,17 @@
|
|
|
6640
6626
|
}
|
|
6641
6627
|
|
|
6642
6628
|
var OffsetTime = function (_Temporal) {
|
|
6629
|
+
function OffsetTime(time, offset) {
|
|
6630
|
+
var _this;
|
|
6631
|
+
_this = _Temporal.call(this) || this;
|
|
6632
|
+
requireNonNull(time, 'time');
|
|
6633
|
+
requireInstance(time, LocalTime, 'time');
|
|
6634
|
+
requireNonNull(offset, 'offset');
|
|
6635
|
+
requireInstance(offset, ZoneOffset, 'offset');
|
|
6636
|
+
_this._time = time;
|
|
6637
|
+
_this._offset = offset;
|
|
6638
|
+
return _this;
|
|
6639
|
+
}
|
|
6643
6640
|
_inheritsLoose(OffsetTime, _Temporal);
|
|
6644
6641
|
OffsetTime.from = function from(temporal) {
|
|
6645
6642
|
requireNonNull(temporal, 'temporal');
|
|
@@ -6706,17 +6703,6 @@
|
|
|
6706
6703
|
requireNonNull(formatter, 'formatter');
|
|
6707
6704
|
return formatter.parse(text, OffsetTime.FROM);
|
|
6708
6705
|
};
|
|
6709
|
-
function OffsetTime(time, offset) {
|
|
6710
|
-
var _this;
|
|
6711
|
-
_this = _Temporal.call(this) || this;
|
|
6712
|
-
requireNonNull(time, 'time');
|
|
6713
|
-
requireInstance(time, LocalTime, 'time');
|
|
6714
|
-
requireNonNull(offset, 'offset');
|
|
6715
|
-
requireInstance(offset, ZoneOffset, 'offset');
|
|
6716
|
-
_this._time = time;
|
|
6717
|
-
_this._offset = offset;
|
|
6718
|
-
return _this;
|
|
6719
|
-
}
|
|
6720
6706
|
var _proto = OffsetTime.prototype;
|
|
6721
6707
|
_proto.adjustInto = function adjustInto(temporal) {
|
|
6722
6708
|
return temporal.with(ChronoField.NANO_OF_DAY, this._time.toNanoOfDay()).with(ChronoField.OFFSET_SECONDS, this.offset().totalSeconds());
|
|
@@ -6967,10 +6953,10 @@
|
|
|
6967
6953
|
}
|
|
6968
6954
|
|
|
6969
6955
|
var ChronoZonedDateTime = function (_Temporal) {
|
|
6970
|
-
_inheritsLoose(ChronoZonedDateTime, _Temporal);
|
|
6971
6956
|
function ChronoZonedDateTime() {
|
|
6972
6957
|
return _Temporal.apply(this, arguments) || this;
|
|
6973
6958
|
}
|
|
6959
|
+
_inheritsLoose(ChronoZonedDateTime, _Temporal);
|
|
6974
6960
|
var _proto = ChronoZonedDateTime.prototype;
|
|
6975
6961
|
_proto.query = function query(_query) {
|
|
6976
6962
|
if (_query === TemporalQueries.zoneId() || _query === TemporalQueries.zone()) {
|
|
@@ -7053,6 +7039,17 @@
|
|
|
7053
7039
|
}
|
|
7054
7040
|
|
|
7055
7041
|
var ZonedDateTime = function (_ChronoZonedDateTime) {
|
|
7042
|
+
function ZonedDateTime(dateTime, offset, zone) {
|
|
7043
|
+
var _this;
|
|
7044
|
+
requireNonNull(dateTime, 'dateTime');
|
|
7045
|
+
requireNonNull(offset, 'offset');
|
|
7046
|
+
requireNonNull(zone, 'zone');
|
|
7047
|
+
_this = _ChronoZonedDateTime.call(this) || this;
|
|
7048
|
+
_this._dateTime = dateTime;
|
|
7049
|
+
_this._offset = offset;
|
|
7050
|
+
_this._zone = zone;
|
|
7051
|
+
return _this;
|
|
7052
|
+
}
|
|
7056
7053
|
_inheritsLoose(ZonedDateTime, _ChronoZonedDateTime);
|
|
7057
7054
|
ZonedDateTime.now = function now(clockOrZone) {
|
|
7058
7055
|
var clock;
|
|
@@ -7188,17 +7185,6 @@
|
|
|
7188
7185
|
requireNonNull(formatter, 'formatter');
|
|
7189
7186
|
return formatter.parse(text, ZonedDateTime.FROM);
|
|
7190
7187
|
};
|
|
7191
|
-
function ZonedDateTime(dateTime, offset, zone) {
|
|
7192
|
-
var _this;
|
|
7193
|
-
requireNonNull(dateTime, 'dateTime');
|
|
7194
|
-
requireNonNull(offset, 'offset');
|
|
7195
|
-
requireNonNull(zone, 'zone');
|
|
7196
|
-
_this = _ChronoZonedDateTime.call(this) || this;
|
|
7197
|
-
_this._dateTime = dateTime;
|
|
7198
|
-
_this._offset = offset;
|
|
7199
|
-
_this._zone = zone;
|
|
7200
|
-
return _this;
|
|
7201
|
-
}
|
|
7202
7188
|
var _proto = ZonedDateTime.prototype;
|
|
7203
7189
|
_proto._resolveLocal = function _resolveLocal(newDateTime) {
|
|
7204
7190
|
requireNonNull(newDateTime, 'newDateTime');
|
|
@@ -7499,6 +7485,17 @@
|
|
|
7499
7485
|
}
|
|
7500
7486
|
|
|
7501
7487
|
var OffsetDateTime = function (_Temporal) {
|
|
7488
|
+
function OffsetDateTime(dateTime, offset) {
|
|
7489
|
+
var _this;
|
|
7490
|
+
_this = _Temporal.call(this) || this;
|
|
7491
|
+
requireNonNull(dateTime, 'dateTime');
|
|
7492
|
+
requireInstance(dateTime, LocalDateTime, 'dateTime');
|
|
7493
|
+
requireNonNull(offset, 'offset');
|
|
7494
|
+
requireInstance(offset, ZoneOffset, 'offset');
|
|
7495
|
+
_this._dateTime = dateTime;
|
|
7496
|
+
_this._offset = offset;
|
|
7497
|
+
return _this;
|
|
7498
|
+
}
|
|
7502
7499
|
_inheritsLoose(OffsetDateTime, _Temporal);
|
|
7503
7500
|
OffsetDateTime.from = function from(temporal) {
|
|
7504
7501
|
requireNonNull(temporal, 'temporal');
|
|
@@ -7526,8 +7523,8 @@
|
|
|
7526
7523
|
if (clockOrZone instanceof ZoneId) {
|
|
7527
7524
|
return OffsetDateTime.now(Clock.system(clockOrZone));
|
|
7528
7525
|
} else if (clockOrZone instanceof Clock) {
|
|
7529
|
-
var
|
|
7530
|
-
return OffsetDateTime.ofInstant(
|
|
7526
|
+
var _now = clockOrZone.instant();
|
|
7527
|
+
return OffsetDateTime.ofInstant(_now, clockOrZone.zone().rules().offset(_now));
|
|
7531
7528
|
} else {
|
|
7532
7529
|
throw new IllegalArgumentException('clockOrZone must be an instance of ZoneId or Clock');
|
|
7533
7530
|
}
|
|
@@ -7580,17 +7577,6 @@
|
|
|
7580
7577
|
requireNonNull(formatter, 'formatter');
|
|
7581
7578
|
return formatter.parse(text, OffsetDateTime.FROM);
|
|
7582
7579
|
};
|
|
7583
|
-
function OffsetDateTime(dateTime, offset) {
|
|
7584
|
-
var _this;
|
|
7585
|
-
_this = _Temporal.call(this) || this;
|
|
7586
|
-
requireNonNull(dateTime, 'dateTime');
|
|
7587
|
-
requireInstance(dateTime, LocalDateTime, 'dateTime');
|
|
7588
|
-
requireNonNull(offset, 'offset');
|
|
7589
|
-
requireInstance(offset, ZoneOffset, 'offset');
|
|
7590
|
-
_this._dateTime = dateTime;
|
|
7591
|
-
_this._offset = offset;
|
|
7592
|
-
return _this;
|
|
7593
|
-
}
|
|
7594
7580
|
var _proto = OffsetDateTime.prototype;
|
|
7595
7581
|
_proto.adjustInto = function adjustInto(temporal) {
|
|
7596
7582
|
return temporal.with(ChronoField.EPOCH_DAY, this.toLocalDate().toEpochDay()).with(ChronoField.NANO_OF_DAY, this.toLocalTime().toNanoOfDay()).with(ChronoField.OFFSET_SECONDS, this.offset().totalSeconds());
|
|
@@ -7928,6 +7914,21 @@
|
|
|
7928
7914
|
var DAYS_PER_CYCLE = 146097;
|
|
7929
7915
|
var DAYS_0000_TO_1970 = DAYS_PER_CYCLE * 5 - (30 * 365 + 7);
|
|
7930
7916
|
var LocalDate = function (_ChronoLocalDate) {
|
|
7917
|
+
function LocalDate(year, month, dayOfMonth) {
|
|
7918
|
+
var _this;
|
|
7919
|
+
_this = _ChronoLocalDate.call(this) || this;
|
|
7920
|
+
requireNonNull(year, 'year');
|
|
7921
|
+
requireNonNull(month, 'month');
|
|
7922
|
+
requireNonNull(dayOfMonth, 'dayOfMonth');
|
|
7923
|
+
if (month instanceof Month) {
|
|
7924
|
+
month = month.value();
|
|
7925
|
+
}
|
|
7926
|
+
_this._year = MathUtil.safeToInt(year);
|
|
7927
|
+
_this._month = MathUtil.safeToInt(month);
|
|
7928
|
+
_this._day = MathUtil.safeToInt(dayOfMonth);
|
|
7929
|
+
LocalDate._validate(_this._year, _this._month, _this._day);
|
|
7930
|
+
return _this;
|
|
7931
|
+
}
|
|
7931
7932
|
_inheritsLoose(LocalDate, _ChronoLocalDate);
|
|
7932
7933
|
LocalDate.now = function now(clockOrZone) {
|
|
7933
7934
|
var clock;
|
|
@@ -8024,21 +8025,6 @@
|
|
|
8024
8025
|
}
|
|
8025
8026
|
return LocalDate.of(year, month, day);
|
|
8026
8027
|
};
|
|
8027
|
-
function LocalDate(year, month, dayOfMonth) {
|
|
8028
|
-
var _this;
|
|
8029
|
-
_this = _ChronoLocalDate.call(this) || this;
|
|
8030
|
-
requireNonNull(year, 'year');
|
|
8031
|
-
requireNonNull(month, 'month');
|
|
8032
|
-
requireNonNull(dayOfMonth, 'dayOfMonth');
|
|
8033
|
-
if (month instanceof Month) {
|
|
8034
|
-
month = month.value();
|
|
8035
|
-
}
|
|
8036
|
-
_this._year = MathUtil.safeToInt(year);
|
|
8037
|
-
_this._month = MathUtil.safeToInt(month);
|
|
8038
|
-
_this._day = MathUtil.safeToInt(dayOfMonth);
|
|
8039
|
-
LocalDate._validate(_this._year, _this._month, _this._day);
|
|
8040
|
-
return _this;
|
|
8041
|
-
}
|
|
8042
8028
|
LocalDate._validate = function _validate(year, month, dayOfMonth) {
|
|
8043
8029
|
var dom;
|
|
8044
8030
|
ChronoField.YEAR.checkValidValue(year);
|
|
@@ -8537,10 +8523,10 @@
|
|
|
8537
8523
|
}
|
|
8538
8524
|
|
|
8539
8525
|
var ChronoLocalDateTime = function (_Temporal) {
|
|
8540
|
-
_inheritsLoose(ChronoLocalDateTime, _Temporal);
|
|
8541
8526
|
function ChronoLocalDateTime() {
|
|
8542
8527
|
return _Temporal.apply(this, arguments) || this;
|
|
8543
8528
|
}
|
|
8529
|
+
_inheritsLoose(ChronoLocalDateTime, _Temporal);
|
|
8544
8530
|
var _proto = ChronoLocalDateTime.prototype;
|
|
8545
8531
|
_proto.chronology = function chronology() {
|
|
8546
8532
|
return this.toLocalDate().chronology();
|
|
@@ -8577,6 +8563,15 @@
|
|
|
8577
8563
|
}(Temporal);
|
|
8578
8564
|
|
|
8579
8565
|
var LocalDateTime = function (_ChronoLocalDateTime) {
|
|
8566
|
+
function LocalDateTime(date, time) {
|
|
8567
|
+
var _this;
|
|
8568
|
+
_this = _ChronoLocalDateTime.call(this) || this;
|
|
8569
|
+
requireInstance(date, LocalDate, 'date');
|
|
8570
|
+
requireInstance(time, LocalTime, 'time');
|
|
8571
|
+
_this._date = date;
|
|
8572
|
+
_this._time = time;
|
|
8573
|
+
return _this;
|
|
8574
|
+
}
|
|
8580
8575
|
_inheritsLoose(LocalDateTime, _ChronoLocalDateTime);
|
|
8581
8576
|
LocalDateTime.now = function now(clockOrZone) {
|
|
8582
8577
|
if (clockOrZone == null) {
|
|
@@ -8680,15 +8675,6 @@
|
|
|
8680
8675
|
requireNonNull(formatter, 'formatter');
|
|
8681
8676
|
return formatter.parse(text, LocalDateTime.FROM);
|
|
8682
8677
|
};
|
|
8683
|
-
function LocalDateTime(date, time) {
|
|
8684
|
-
var _this;
|
|
8685
|
-
_this = _ChronoLocalDateTime.call(this) || this;
|
|
8686
|
-
requireInstance(date, LocalDate, 'date');
|
|
8687
|
-
requireInstance(time, LocalTime, 'time');
|
|
8688
|
-
_this._date = date;
|
|
8689
|
-
_this._time = time;
|
|
8690
|
-
return _this;
|
|
8691
|
-
}
|
|
8692
8678
|
var _proto = LocalDateTime.prototype;
|
|
8693
8679
|
_proto._withDateTime = function _withDateTime(newDate, newTime) {
|
|
8694
8680
|
if (this._date.equals(newDate) && this._time.equals(newTime)) {
|
|
@@ -9027,6 +9013,42 @@
|
|
|
9027
9013
|
}
|
|
9028
9014
|
|
|
9029
9015
|
var LocalTime = function (_Temporal) {
|
|
9016
|
+
function LocalTime(hour, minute, second, nanoOfSecond) {
|
|
9017
|
+
var _this;
|
|
9018
|
+
if (hour === void 0) {
|
|
9019
|
+
hour = 0;
|
|
9020
|
+
}
|
|
9021
|
+
if (minute === void 0) {
|
|
9022
|
+
minute = 0;
|
|
9023
|
+
}
|
|
9024
|
+
if (second === void 0) {
|
|
9025
|
+
second = 0;
|
|
9026
|
+
}
|
|
9027
|
+
if (nanoOfSecond === void 0) {
|
|
9028
|
+
nanoOfSecond = 0;
|
|
9029
|
+
}
|
|
9030
|
+
_this = _Temporal.call(this) || this;
|
|
9031
|
+
var _hour = MathUtil.safeToInt(hour);
|
|
9032
|
+
var _minute = MathUtil.safeToInt(minute);
|
|
9033
|
+
var _second = MathUtil.safeToInt(second);
|
|
9034
|
+
var _nanoOfSecond = MathUtil.safeToInt(nanoOfSecond);
|
|
9035
|
+
LocalTime._validate(_hour, _minute, _second, _nanoOfSecond);
|
|
9036
|
+
if (_minute === 0 && _second === 0 && _nanoOfSecond === 0) {
|
|
9037
|
+
if (!LocalTime.HOURS[_hour]) {
|
|
9038
|
+
_this._hour = _hour;
|
|
9039
|
+
_this._minute = _minute;
|
|
9040
|
+
_this._second = _second;
|
|
9041
|
+
_this._nano = _nanoOfSecond;
|
|
9042
|
+
LocalTime.HOURS[_hour] = _this;
|
|
9043
|
+
}
|
|
9044
|
+
return LocalTime.HOURS[_hour] || _assertThisInitialized(_this);
|
|
9045
|
+
}
|
|
9046
|
+
_this._hour = _hour;
|
|
9047
|
+
_this._minute = _minute;
|
|
9048
|
+
_this._second = _second;
|
|
9049
|
+
_this._nano = _nanoOfSecond;
|
|
9050
|
+
return _this;
|
|
9051
|
+
}
|
|
9030
9052
|
_inheritsLoose(LocalTime, _Temporal);
|
|
9031
9053
|
LocalTime.now = function now(clockOrZone) {
|
|
9032
9054
|
if (clockOrZone == null) {
|
|
@@ -9102,42 +9124,6 @@
|
|
|
9102
9124
|
requireNonNull(formatter, 'formatter');
|
|
9103
9125
|
return formatter.parse(text, LocalTime.FROM);
|
|
9104
9126
|
};
|
|
9105
|
-
function LocalTime(hour, minute, second, nanoOfSecond) {
|
|
9106
|
-
var _this;
|
|
9107
|
-
if (hour === void 0) {
|
|
9108
|
-
hour = 0;
|
|
9109
|
-
}
|
|
9110
|
-
if (minute === void 0) {
|
|
9111
|
-
minute = 0;
|
|
9112
|
-
}
|
|
9113
|
-
if (second === void 0) {
|
|
9114
|
-
second = 0;
|
|
9115
|
-
}
|
|
9116
|
-
if (nanoOfSecond === void 0) {
|
|
9117
|
-
nanoOfSecond = 0;
|
|
9118
|
-
}
|
|
9119
|
-
_this = _Temporal.call(this) || this;
|
|
9120
|
-
var _hour = MathUtil.safeToInt(hour);
|
|
9121
|
-
var _minute = MathUtil.safeToInt(minute);
|
|
9122
|
-
var _second = MathUtil.safeToInt(second);
|
|
9123
|
-
var _nanoOfSecond = MathUtil.safeToInt(nanoOfSecond);
|
|
9124
|
-
LocalTime._validate(_hour, _minute, _second, _nanoOfSecond);
|
|
9125
|
-
if (_minute === 0 && _second === 0 && _nanoOfSecond === 0) {
|
|
9126
|
-
if (!LocalTime.HOURS[_hour]) {
|
|
9127
|
-
_this._hour = _hour;
|
|
9128
|
-
_this._minute = _minute;
|
|
9129
|
-
_this._second = _second;
|
|
9130
|
-
_this._nano = _nanoOfSecond;
|
|
9131
|
-
LocalTime.HOURS[_hour] = _assertThisInitialized(_this);
|
|
9132
|
-
}
|
|
9133
|
-
return LocalTime.HOURS[_hour] || _assertThisInitialized(_this);
|
|
9134
|
-
}
|
|
9135
|
-
_this._hour = _hour;
|
|
9136
|
-
_this._minute = _minute;
|
|
9137
|
-
_this._second = _second;
|
|
9138
|
-
_this._nano = _nanoOfSecond;
|
|
9139
|
-
return _this;
|
|
9140
|
-
}
|
|
9141
9127
|
LocalTime._validate = function _validate(hour, minute, second, nanoOfSecond) {
|
|
9142
9128
|
ChronoField.HOUR_OF_DAY.checkValidValue(hour);
|
|
9143
9129
|
ChronoField.MINUTE_OF_HOUR.checkValidValue(minute);
|
|
@@ -9562,6 +9548,14 @@
|
|
|
9562
9548
|
|
|
9563
9549
|
var NANOS_PER_MILLI = 1000000;
|
|
9564
9550
|
var Instant = function (_Temporal) {
|
|
9551
|
+
function Instant(seconds, nanoOfSecond) {
|
|
9552
|
+
var _this;
|
|
9553
|
+
_this = _Temporal.call(this) || this;
|
|
9554
|
+
Instant._validate(seconds, nanoOfSecond);
|
|
9555
|
+
_this._seconds = MathUtil.safeToInt(seconds);
|
|
9556
|
+
_this._nanos = MathUtil.safeToInt(nanoOfSecond);
|
|
9557
|
+
return _this;
|
|
9558
|
+
}
|
|
9565
9559
|
_inheritsLoose(Instant, _Temporal);
|
|
9566
9560
|
Instant.now = function now(clock) {
|
|
9567
9561
|
if (clock === void 0) {
|
|
@@ -9613,14 +9607,6 @@
|
|
|
9613
9607
|
throw new DateTimeException('Instant exceeds minimum or maximum instant');
|
|
9614
9608
|
}
|
|
9615
9609
|
};
|
|
9616
|
-
function Instant(seconds, nanoOfSecond) {
|
|
9617
|
-
var _this;
|
|
9618
|
-
_this = _Temporal.call(this) || this;
|
|
9619
|
-
Instant._validate(seconds, nanoOfSecond);
|
|
9620
|
-
_this._seconds = MathUtil.safeToInt(seconds);
|
|
9621
|
-
_this._nanos = MathUtil.safeToInt(nanoOfSecond);
|
|
9622
|
-
return _this;
|
|
9623
|
-
}
|
|
9624
9610
|
var _proto = Instant.prototype;
|
|
9625
9611
|
_proto.isSupported = function isSupported(fieldOrUnit) {
|
|
9626
9612
|
if (fieldOrUnit instanceof ChronoField) {
|
|
@@ -9913,7 +9899,6 @@
|
|
|
9913
9899
|
return Clock;
|
|
9914
9900
|
}();
|
|
9915
9901
|
var SystemClock = function (_Clock) {
|
|
9916
|
-
_inheritsLoose(SystemClock, _Clock);
|
|
9917
9902
|
function SystemClock(zone) {
|
|
9918
9903
|
var _this;
|
|
9919
9904
|
requireNonNull(zone, 'zone');
|
|
@@ -9921,6 +9906,7 @@
|
|
|
9921
9906
|
_this._zone = zone;
|
|
9922
9907
|
return _this;
|
|
9923
9908
|
}
|
|
9909
|
+
_inheritsLoose(SystemClock, _Clock);
|
|
9924
9910
|
var _proto2 = SystemClock.prototype;
|
|
9925
9911
|
_proto2.zone = function zone() {
|
|
9926
9912
|
return this._zone;
|
|
@@ -9949,7 +9935,6 @@
|
|
|
9949
9935
|
return SystemClock;
|
|
9950
9936
|
}(Clock);
|
|
9951
9937
|
var FixedClock = function (_Clock2) {
|
|
9952
|
-
_inheritsLoose(FixedClock, _Clock2);
|
|
9953
9938
|
function FixedClock(fixedInstant, zoneId) {
|
|
9954
9939
|
var _this2;
|
|
9955
9940
|
_this2 = _Clock2.call(this) || this;
|
|
@@ -9957,6 +9942,7 @@
|
|
|
9957
9942
|
_this2._zoneId = zoneId;
|
|
9958
9943
|
return _this2;
|
|
9959
9944
|
}
|
|
9945
|
+
_inheritsLoose(FixedClock, _Clock2);
|
|
9960
9946
|
var _proto3 = FixedClock.prototype;
|
|
9961
9947
|
_proto3.instant = function instant() {
|
|
9962
9948
|
return this._instant;
|
|
@@ -9985,7 +9971,6 @@
|
|
|
9985
9971
|
return FixedClock;
|
|
9986
9972
|
}(Clock);
|
|
9987
9973
|
var OffsetClock = function (_Clock3) {
|
|
9988
|
-
_inheritsLoose(OffsetClock, _Clock3);
|
|
9989
9974
|
function OffsetClock(baseClock, offset) {
|
|
9990
9975
|
var _this3;
|
|
9991
9976
|
_this3 = _Clock3.call(this) || this;
|
|
@@ -9993,6 +9978,7 @@
|
|
|
9993
9978
|
_this3._offset = offset;
|
|
9994
9979
|
return _this3;
|
|
9995
9980
|
}
|
|
9981
|
+
_inheritsLoose(OffsetClock, _Clock3);
|
|
9996
9982
|
var _proto4 = OffsetClock.prototype;
|
|
9997
9983
|
_proto4.zone = function zone() {
|
|
9998
9984
|
return this._baseClock.zone();
|
|
@@ -10028,9 +10014,6 @@
|
|
|
10028
10014
|
*/
|
|
10029
10015
|
|
|
10030
10016
|
var ZoneOffsetTransition = function () {
|
|
10031
|
-
ZoneOffsetTransition.of = function of(transition, offsetBefore, offsetAfter) {
|
|
10032
|
-
return new ZoneOffsetTransition(transition, offsetBefore, offsetAfter);
|
|
10033
|
-
};
|
|
10034
10017
|
function ZoneOffsetTransition(transition, offsetBefore, offsetAfter) {
|
|
10035
10018
|
requireNonNull(transition, 'transition');
|
|
10036
10019
|
requireNonNull(offsetBefore, 'offsetBefore');
|
|
@@ -10049,6 +10032,9 @@
|
|
|
10049
10032
|
this._offsetBefore = offsetBefore;
|
|
10050
10033
|
this._offsetAfter = offsetAfter;
|
|
10051
10034
|
}
|
|
10035
|
+
ZoneOffsetTransition.of = function of(transition, offsetBefore, offsetAfter) {
|
|
10036
|
+
return new ZoneOffsetTransition(transition, offsetBefore, offsetAfter);
|
|
10037
|
+
};
|
|
10052
10038
|
var _proto = ZoneOffsetTransition.prototype;
|
|
10053
10039
|
_proto.instant = function instant() {
|
|
10054
10040
|
return this._transition.toInstant(this._offsetBefore);
|
|
@@ -10153,10 +10139,10 @@
|
|
|
10153
10139
|
}
|
|
10154
10140
|
|
|
10155
10141
|
var SystemDefaultZoneRules = function (_ZoneRules) {
|
|
10156
|
-
_inheritsLoose(SystemDefaultZoneRules, _ZoneRules);
|
|
10157
10142
|
function SystemDefaultZoneRules() {
|
|
10158
10143
|
return _ZoneRules.apply(this, arguments) || this;
|
|
10159
10144
|
}
|
|
10145
|
+
_inheritsLoose(SystemDefaultZoneRules, _ZoneRules);
|
|
10160
10146
|
var _proto = SystemDefaultZoneRules.prototype;
|
|
10161
10147
|
_proto.isFixedOffset = function isFixedOffset() {
|
|
10162
10148
|
return false;
|
|
@@ -10223,13 +10209,13 @@
|
|
|
10223
10209
|
}(ZoneRules);
|
|
10224
10210
|
|
|
10225
10211
|
var SystemDefaultZoneId = function (_ZoneId) {
|
|
10226
|
-
_inheritsLoose(SystemDefaultZoneId, _ZoneId);
|
|
10227
10212
|
function SystemDefaultZoneId() {
|
|
10228
10213
|
var _this;
|
|
10229
10214
|
_this = _ZoneId.call(this) || this;
|
|
10230
10215
|
_this._rules = new SystemDefaultZoneRules();
|
|
10231
10216
|
return _this;
|
|
10232
10217
|
}
|
|
10218
|
+
_inheritsLoose(SystemDefaultZoneId, _ZoneId);
|
|
10233
10219
|
var _proto = SystemDefaultZoneId.prototype;
|
|
10234
10220
|
_proto.rules = function rules() {
|
|
10235
10221
|
return this._rules;
|