@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/dist/js-joda.js CHANGED
@@ -1,4 +1,4 @@
1
- //! @version @js-joda/core - 6.0.0
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)
@@ -76,23 +76,17 @@
76
76
  };
77
77
  }
78
78
 
79
- function _inheritsLoose(subClass, superClass) {
80
- subClass.prototype = Object.create(superClass.prototype);
81
- subClass.prototype.constructor = subClass;
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 _setPrototypeOf(o, p) {
85
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
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 _assertThisInitialized(self) {
92
- if (self === void 0) {
93
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
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 (_parseInt) {
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
  };
@@ -767,9 +753,12 @@
767
753
  if (this === Duration.ZERO) {
768
754
  return 'PT0S';
769
755
  }
770
- var hours = MathUtil.intDiv(this._seconds, LocalTime.SECONDS_PER_HOUR);
771
- var minutes = MathUtil.intDiv(MathUtil.intMod(this._seconds, LocalTime.SECONDS_PER_HOUR), LocalTime.SECONDS_PER_MINUTE);
772
- var secs = MathUtil.intMod(this._seconds, LocalTime.SECONDS_PER_MINUTE);
756
+ var negativeFraction = this._seconds < 0 && this._nanos > 0;
757
+ var wholeSeconds = negativeFraction ? this._seconds + 1 : this._seconds;
758
+ var fractionNanos = negativeFraction ? LocalTime.NANOS_PER_SECOND - this._nanos : this._nanos;
759
+ var hours = MathUtil.intDiv(wholeSeconds, LocalTime.SECONDS_PER_HOUR);
760
+ var minutes = MathUtil.intDiv(MathUtil.intMod(wholeSeconds, LocalTime.SECONDS_PER_HOUR), LocalTime.SECONDS_PER_MINUTE);
761
+ var secs = MathUtil.intMod(wholeSeconds, LocalTime.SECONDS_PER_MINUTE);
773
762
  var rval = 'PT';
774
763
  if (hours !== 0) {
775
764
  rval += hours + "H";
@@ -777,31 +766,23 @@
777
766
  if (minutes !== 0) {
778
767
  rval += minutes + "M";
779
768
  }
780
- if (secs === 0 && this._nanos === 0 && rval.length > 2) {
769
+ if (secs === 0 && fractionNanos === 0 && rval.length > 2) {
781
770
  return rval;
782
771
  }
783
- if (secs < 0 && this._nanos > 0) {
784
- if (secs === -1) {
785
- rval += '-0';
786
- } else {
787
- rval += secs + 1;
788
- }
772
+ if (secs === 0 && negativeFraction) {
773
+ rval += '-0';
789
774
  } else {
790
- rval += secs;
775
+ rval += "" + secs;
791
776
  }
792
- if (this._nanos > 0) {
793
- rval += '.';
794
- var nanoString;
795
- if (secs < 0) {
796
- nanoString = "" + (2 * LocalTime.NANOS_PER_SECOND - this._nanos);
797
- } else {
798
- nanoString = "" + (LocalTime.NANOS_PER_SECOND + this._nanos);
777
+ if (fractionNanos > 0) {
778
+ var fraction = "" + fractionNanos;
779
+ while (fraction.length < 9) {
780
+ fraction = "0" + fraction;
799
781
  }
800
- nanoString = nanoString.slice(1, nanoString.length);
801
- rval += nanoString;
802
- while (rval.charAt(rval.length - 1) === '0') {
803
- rval = rval.slice(0, rval.length - 1);
782
+ while (fraction.charAt(fraction.length - 1) === '0') {
783
+ fraction = fraction.slice(0, fraction.length - 1);
804
784
  }
785
+ rval += "." + fraction;
805
786
  }
806
787
  rval += 'S';
807
788
  return rval;
@@ -825,7 +806,6 @@
825
806
  }
826
807
 
827
808
  var ChronoUnit = function (_TemporalUnit) {
828
- _inheritsLoose(ChronoUnit, _TemporalUnit);
829
809
  function ChronoUnit(name, estimatedDuration) {
830
810
  var _this;
831
811
  _this = _TemporalUnit.call(this) || this;
@@ -833,6 +813,7 @@
833
813
  _this._duration = estimatedDuration;
834
814
  return _this;
835
815
  }
816
+ _inheritsLoose(ChronoUnit, _TemporalUnit);
836
817
  var _proto = ChronoUnit.prototype;
837
818
  _proto.duration = function duration() {
838
819
  return this._duration;
@@ -1034,6 +1015,15 @@
1034
1015
  }();
1035
1016
 
1036
1017
  var ChronoField = function (_TemporalField) {
1018
+ function ChronoField(name, baseUnit, rangeUnit, range) {
1019
+ var _this;
1020
+ _this = _TemporalField.call(this) || this;
1021
+ _this._name = name;
1022
+ _this._baseUnit = baseUnit;
1023
+ _this._rangeUnit = rangeUnit;
1024
+ _this._range = range;
1025
+ return _this;
1026
+ }
1037
1027
  _inheritsLoose(ChronoField, _TemporalField);
1038
1028
  ChronoField.byName = function byName(fieldName) {
1039
1029
  for (var prop in ChronoField) {
@@ -1044,15 +1034,6 @@
1044
1034
  }
1045
1035
  }
1046
1036
  };
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
1037
  var _proto = ChronoField.prototype;
1057
1038
  _proto.name = function name() {
1058
1039
  return this._name;
@@ -1203,10 +1184,10 @@
1203
1184
  }();
1204
1185
 
1205
1186
  var TemporalQuery = function (_Enum) {
1206
- _inheritsLoose(TemporalQuery, _Enum);
1207
1187
  function TemporalQuery() {
1208
1188
  return _Enum.apply(this, arguments) || this;
1209
1189
  }
1190
+ _inheritsLoose(TemporalQuery, _Enum);
1210
1191
  var _proto = TemporalQuery.prototype;
1211
1192
  _proto.queryFrom = function queryFrom(temporal) {
1212
1193
  abstractMethodFail('queryFrom');
@@ -1215,10 +1196,10 @@
1215
1196
  }(Enum);
1216
1197
  function createTemporalQuery(name, queryFromFunction) {
1217
1198
  var ExtendedTemporalQuery = function (_TemporalQuery) {
1218
- _inheritsLoose(ExtendedTemporalQuery, _TemporalQuery);
1219
1199
  function ExtendedTemporalQuery() {
1220
1200
  return _TemporalQuery.apply(this, arguments) || this;
1221
1201
  }
1202
+ _inheritsLoose(ExtendedTemporalQuery, _TemporalQuery);
1222
1203
  return ExtendedTemporalQuery;
1223
1204
  }(TemporalQuery);
1224
1205
  ExtendedTemporalQuery.prototype.queryFrom = queryFromFunction;
@@ -1226,7 +1207,6 @@
1226
1207
  }
1227
1208
 
1228
1209
  var DayOfWeek = function (_TemporalAccessor) {
1229
- _inheritsLoose(DayOfWeek, _TemporalAccessor);
1230
1210
  function DayOfWeek(ordinal, name) {
1231
1211
  var _this;
1232
1212
  _this = _TemporalAccessor.call(this) || this;
@@ -1234,6 +1214,7 @@
1234
1214
  _this._name = name;
1235
1215
  return _this;
1236
1216
  }
1217
+ _inheritsLoose(DayOfWeek, _TemporalAccessor);
1237
1218
  var _proto = DayOfWeek.prototype;
1238
1219
  _proto.ordinal = function ordinal() {
1239
1220
  return this._ordinal;
@@ -1360,7 +1341,6 @@
1360
1341
  }
1361
1342
 
1362
1343
  var Month = function (_TemporalAccessor) {
1363
- _inheritsLoose(Month, _TemporalAccessor);
1364
1344
  function Month(value, name) {
1365
1345
  var _this;
1366
1346
  _this = _TemporalAccessor.call(this) || this;
@@ -1368,6 +1348,7 @@
1368
1348
  _this._name = name;
1369
1349
  return _this;
1370
1350
  }
1351
+ _inheritsLoose(Month, _TemporalAccessor);
1371
1352
  var _proto = Month.prototype;
1372
1353
  _proto.value = function value() {
1373
1354
  return this._value;
@@ -1605,7 +1586,6 @@
1605
1586
 
1606
1587
  var PATTERN = /([-+]?)P(?:([-+]?[0-9]+)Y)?(?:([-+]?[0-9]+)M)?(?:([-+]?[0-9]+)W)?(?:([-+]?[0-9]+)D)?/;
1607
1588
  var Period = function (_TemporalAmount) {
1608
- _inheritsLoose(Period, _TemporalAmount);
1609
1589
  function Period(years, months, days) {
1610
1590
  var _this;
1611
1591
  _this = _TemporalAmount.call(this) || this;
@@ -1617,7 +1597,7 @@
1617
1597
  _this._years = _years;
1618
1598
  _this._months = _months;
1619
1599
  _this._days = _days;
1620
- Period.ZERO = _assertThisInitialized(_this);
1600
+ Period.ZERO = _this;
1621
1601
  }
1622
1602
  return Period.ZERO || _assertThisInitialized(_this);
1623
1603
  }
@@ -1626,6 +1606,7 @@
1626
1606
  _this._days = _days;
1627
1607
  return _this;
1628
1608
  }
1609
+ _inheritsLoose(Period, _TemporalAmount);
1629
1610
  Period.ofYears = function ofYears(years) {
1630
1611
  return Period.create(years, 0, 0);
1631
1612
  };
@@ -1969,10 +1950,10 @@
1969
1950
  }();
1970
1951
 
1971
1952
  var ResolverStyle = function (_Enum) {
1972
- _inheritsLoose(ResolverStyle, _Enum);
1973
1953
  function ResolverStyle() {
1974
1954
  return _Enum.apply(this, arguments) || this;
1975
1955
  }
1956
+ _inheritsLoose(ResolverStyle, _Enum);
1976
1957
  return ResolverStyle;
1977
1958
  }(Enum);
1978
1959
  ResolverStyle.STRICT = new ResolverStyle('STRICT');
@@ -1980,10 +1961,10 @@
1980
1961
  ResolverStyle.LENIENT = new ResolverStyle('LENIENT');
1981
1962
 
1982
1963
  var Temporal = function (_TemporalAccessor) {
1983
- _inheritsLoose(Temporal, _TemporalAccessor);
1984
1964
  function Temporal() {
1985
1965
  return _TemporalAccessor.apply(this, arguments) || this;
1986
1966
  }
1967
+ _inheritsLoose(Temporal, _TemporalAccessor);
1987
1968
  var _proto = Temporal.prototype;
1988
1969
  _proto.isSupported = function isSupported(fieldOrUnit) {
1989
1970
  abstractMethodFail('isSupported');
@@ -2051,10 +2032,10 @@
2051
2032
  }
2052
2033
 
2053
2034
  var ChronoLocalDate = function (_Temporal) {
2054
- _inheritsLoose(ChronoLocalDate, _Temporal);
2055
2035
  function ChronoLocalDate() {
2056
2036
  return _Temporal.apply(this, arguments) || this;
2057
2037
  }
2038
+ _inheritsLoose(ChronoLocalDate, _Temporal);
2058
2039
  var _proto = ChronoLocalDate.prototype;
2059
2040
  _proto.isSupported = function isSupported(fieldOrUnit) {
2060
2041
  if (fieldOrUnit instanceof ChronoField) {
@@ -2236,13 +2217,13 @@
2236
2217
  return ZoneRules;
2237
2218
  }();
2238
2219
  var Fixed = function (_ZoneRules) {
2239
- _inheritsLoose(Fixed, _ZoneRules);
2240
2220
  function Fixed(offset) {
2241
2221
  var _this;
2242
2222
  _this = _ZoneRules.call(this) || this;
2243
2223
  _this._offset = offset;
2244
2224
  return _this;
2245
2225
  }
2226
+ _inheritsLoose(Fixed, _ZoneRules);
2246
2227
  var _proto2 = Fixed.prototype;
2247
2228
  _proto2.isFixedOffset = function isFixedOffset() {
2248
2229
  return true;
@@ -2304,16 +2285,16 @@
2304
2285
  var SECONDS_CACHE = {};
2305
2286
  var ID_CACHE = {};
2306
2287
  var ZoneOffset = function (_ZoneId) {
2307
- _inheritsLoose(ZoneOffset, _ZoneId);
2308
2288
  function ZoneOffset(totalSeconds) {
2309
2289
  var _this;
2310
2290
  _this = _ZoneId.call(this) || this;
2311
2291
  ZoneOffset._validateTotalSeconds(totalSeconds);
2312
2292
  _this._totalSeconds = MathUtil.safeToInt(totalSeconds);
2313
- _this._rules = ZoneRules.of(_assertThisInitialized(_this));
2293
+ _this._rules = ZoneRules.of(_this);
2314
2294
  _this._id = ZoneOffset._buildId(totalSeconds);
2315
2295
  return _this;
2316
2296
  }
2297
+ _inheritsLoose(ZoneOffset, _ZoneId);
2317
2298
  var _proto = ZoneOffset.prototype;
2318
2299
  _proto.totalSeconds = function totalSeconds() {
2319
2300
  return this._totalSeconds;
@@ -2509,12 +2490,6 @@
2509
2490
  }
2510
2491
 
2511
2492
  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
2493
  function DateTimeBuilder() {
2519
2494
  var _this;
2520
2495
  _this = _TemporalAccessor.call(this) || this;
@@ -2527,6 +2502,12 @@
2527
2502
  _this.excessDays = null;
2528
2503
  return _this;
2529
2504
  }
2505
+ _inheritsLoose(DateTimeBuilder, _TemporalAccessor);
2506
+ DateTimeBuilder.create = function create(field, value) {
2507
+ var dtb = new DateTimeBuilder();
2508
+ dtb._addFieldValue(field, value);
2509
+ return dtb;
2510
+ };
2530
2511
  var _proto = DateTimeBuilder.prototype;
2531
2512
  _proto.getFieldValue0 = function getFieldValue0(field) {
2532
2513
  return this.fieldValues.get(field);
@@ -2964,7 +2945,6 @@
2964
2945
  return DateTimeParseContext;
2965
2946
  }();
2966
2947
  var Parsed = function (_Temporal) {
2967
- _inheritsLoose(Parsed, _Temporal);
2968
2948
  function Parsed(dateTimeParseContext) {
2969
2949
  var _this;
2970
2950
  _this = _Temporal.call(this) || this;
@@ -2972,9 +2952,11 @@
2972
2952
  _this.zone = null;
2973
2953
  _this.fieldValues = new EnumMap();
2974
2954
  _this.leapSecond = false;
2955
+ _this.excessDays = Period.ZERO;
2975
2956
  _this.dateTimeParseContext = dateTimeParseContext;
2976
2957
  return _this;
2977
2958
  }
2959
+ _inheritsLoose(Parsed, _Temporal);
2978
2960
  var _proto2 = Parsed.prototype;
2979
2961
  _proto2.copy = function copy() {
2980
2962
  var cloned = new Parsed();
@@ -3088,10 +3070,10 @@
3088
3070
  var IsoFields = {};
3089
3071
  var QUARTER_DAYS = [0, 90, 181, 273, 0, 91, 182, 274];
3090
3072
  var Field = function (_TemporalField) {
3091
- _inheritsLoose(Field, _TemporalField);
3092
3073
  function Field() {
3093
3074
  return _TemporalField.apply(this, arguments) || this;
3094
3075
  }
3076
+ _inheritsLoose(Field, _TemporalField);
3095
3077
  var _proto = Field.prototype;
3096
3078
  _proto.isDateBased = function isDateBased() {
3097
3079
  return true;
@@ -3163,10 +3145,10 @@
3163
3145
  return Field;
3164
3146
  }(TemporalField);
3165
3147
  var DAY_OF_QUARTER_FIELD = function (_Field) {
3166
- _inheritsLoose(DAY_OF_QUARTER_FIELD, _Field);
3167
3148
  function DAY_OF_QUARTER_FIELD() {
3168
3149
  return _Field.apply(this, arguments) || this;
3169
3150
  }
3151
+ _inheritsLoose(DAY_OF_QUARTER_FIELD, _Field);
3170
3152
  var _proto2 = DAY_OF_QUARTER_FIELD.prototype;
3171
3153
  _proto2.toString = function toString() {
3172
3154
  return 'DayOfQuarter';
@@ -3249,10 +3231,10 @@
3249
3231
  return DAY_OF_QUARTER_FIELD;
3250
3232
  }(Field);
3251
3233
  var QUARTER_OF_YEAR_FIELD = function (_Field2) {
3252
- _inheritsLoose(QUARTER_OF_YEAR_FIELD, _Field2);
3253
3234
  function QUARTER_OF_YEAR_FIELD() {
3254
3235
  return _Field2.apply(this, arguments) || this;
3255
3236
  }
3237
+ _inheritsLoose(QUARTER_OF_YEAR_FIELD, _Field2);
3256
3238
  var _proto3 = QUARTER_OF_YEAR_FIELD.prototype;
3257
3239
  _proto3.toString = function toString() {
3258
3240
  return 'QuarterOfYear';
@@ -3287,10 +3269,10 @@
3287
3269
  return QUARTER_OF_YEAR_FIELD;
3288
3270
  }(Field);
3289
3271
  var WEEK_OF_WEEK_BASED_YEAR_FIELD = function (_Field3) {
3290
- _inheritsLoose(WEEK_OF_WEEK_BASED_YEAR_FIELD, _Field3);
3291
3272
  function WEEK_OF_WEEK_BASED_YEAR_FIELD() {
3292
3273
  return _Field3.apply(this, arguments) || this;
3293
3274
  }
3275
+ _inheritsLoose(WEEK_OF_WEEK_BASED_YEAR_FIELD, _Field3);
3294
3276
  var _proto4 = WEEK_OF_WEEK_BASED_YEAR_FIELD.prototype;
3295
3277
  _proto4.toString = function toString() {
3296
3278
  return 'WeekOfWeekBasedYear';
@@ -3365,10 +3347,10 @@
3365
3347
  return WEEK_OF_WEEK_BASED_YEAR_FIELD;
3366
3348
  }(Field);
3367
3349
  var WEEK_BASED_YEAR_FIELD = function (_Field4) {
3368
- _inheritsLoose(WEEK_BASED_YEAR_FIELD, _Field4);
3369
3350
  function WEEK_BASED_YEAR_FIELD() {
3370
3351
  return _Field4.apply(this, arguments) || this;
3371
3352
  }
3353
+ _inheritsLoose(WEEK_BASED_YEAR_FIELD, _Field4);
3372
3354
  var _proto5 = WEEK_BASED_YEAR_FIELD.prototype;
3373
3355
  _proto5.toString = function toString() {
3374
3356
  return 'WeekBasedYear';
@@ -3413,7 +3395,6 @@
3413
3395
  return WEEK_BASED_YEAR_FIELD;
3414
3396
  }(Field);
3415
3397
  var Unit = function (_TemporalUnit) {
3416
- _inheritsLoose(Unit, _TemporalUnit);
3417
3398
  function Unit(name, estimatedDuration) {
3418
3399
  var _this;
3419
3400
  _this = _TemporalUnit.call(this) || this;
@@ -3421,6 +3402,7 @@
3421
3402
  _this._duration = estimatedDuration;
3422
3403
  return _this;
3423
3404
  }
3405
+ _inheritsLoose(Unit, _TemporalUnit);
3424
3406
  var _proto6 = Unit.prototype;
3425
3407
  _proto6.duration = function duration() {
3426
3408
  return this._duration;
@@ -3584,10 +3566,10 @@
3584
3566
  DecimalStyle.STANDARD = new DecimalStyle('0', '+', '-', '.');
3585
3567
 
3586
3568
  var SignStyle = function (_Enum) {
3587
- _inheritsLoose(SignStyle, _Enum);
3588
3569
  function SignStyle() {
3589
3570
  return _Enum.apply(this, arguments) || this;
3590
3571
  }
3572
+ _inheritsLoose(SignStyle, _Enum);
3591
3573
  var _proto = SignStyle.prototype;
3592
3574
  _proto.parse = function parse(positive, strict, fixedWidth) {
3593
3575
  switch (this) {
@@ -3609,10 +3591,10 @@
3609
3591
  SignStyle.NOT_NEGATIVE = new SignStyle('NOT_NEGATIVE');
3610
3592
 
3611
3593
  var TextStyle = function (_Enum) {
3612
- _inheritsLoose(TextStyle, _Enum);
3613
3594
  function TextStyle() {
3614
3595
  return _Enum.apply(this, arguments) || this;
3615
3596
  }
3597
+ _inheritsLoose(TextStyle, _Enum);
3616
3598
  var _proto = TextStyle.prototype;
3617
3599
  _proto.isStandalone = function isStandalone() {
3618
3600
  switch (this) {
@@ -4073,7 +4055,6 @@
4073
4055
  return NumberPrinterParser;
4074
4056
  }();
4075
4057
  var ReducedPrinterParser = function (_NumberPrinterParser) {
4076
- _inheritsLoose(ReducedPrinterParser, _NumberPrinterParser);
4077
4058
  function ReducedPrinterParser(field, width, maxWidth, baseValue, baseDate) {
4078
4059
  var _this;
4079
4060
  _this = _NumberPrinterParser.call(this, field, width, maxWidth, SignStyle.NOT_NEGATIVE) || this;
@@ -4098,6 +4079,7 @@
4098
4079
  _this._baseDate = baseDate;
4099
4080
  return _this;
4100
4081
  }
4082
+ _inheritsLoose(ReducedPrinterParser, _NumberPrinterParser);
4101
4083
  var _proto2 = ReducedPrinterParser.prototype;
4102
4084
  _proto2._getValue = function _getValue(context, value) {
4103
4085
  var absValue = Math.abs(value);
@@ -4334,10 +4316,10 @@
4334
4316
  }();
4335
4317
 
4336
4318
  var SettingsParser = function (_Enum) {
4337
- _inheritsLoose(SettingsParser, _Enum);
4338
4319
  function SettingsParser() {
4339
4320
  return _Enum.apply(this, arguments) || this;
4340
4321
  }
4322
+ _inheritsLoose(SettingsParser, _Enum);
4341
4323
  var _proto = SettingsParser.prototype;
4342
4324
  _proto.print = function print() {
4343
4325
  return true;
@@ -4426,11 +4408,6 @@
4426
4408
  }();
4427
4409
 
4428
4410
  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
4411
  function ZoneRegion(id, rules) {
4435
4412
  var _this;
4436
4413
  _this = _ZoneId.call(this) || this;
@@ -4438,6 +4415,11 @@
4438
4415
  _this._rules = rules;
4439
4416
  return _this;
4440
4417
  }
4418
+ _inheritsLoose(ZoneRegion, _ZoneId);
4419
+ ZoneRegion.ofId = function ofId(zoneId) {
4420
+ var rules = ZoneRulesProvider.getRules(zoneId);
4421
+ return new ZoneRegion(zoneId, rules);
4422
+ };
4441
4423
  var _proto = ZoneRegion.prototype;
4442
4424
  _proto.id = function id() {
4443
4425
  return this._id;
@@ -4476,6 +4458,45 @@
4476
4458
  if (position === length) {
4477
4459
  return ~position;
4478
4460
  }
4461
+ var region = this._parseRegion(text, position);
4462
+ var fixedEndPos = this._parseFixedId(context, text, position);
4463
+ var fixedLength = fixedEndPos >= 0 ? fixedEndPos - position : 0;
4464
+ if (region != null && region.parseLength > fixedLength) {
4465
+ context.setParsedZone(ZoneRegion.ofId(region.parsedZoneId));
4466
+ return position + region.parseLength;
4467
+ }
4468
+ return fixedEndPos;
4469
+ };
4470
+ _proto._parseRegion = function _parseRegion(text, position) {
4471
+ var availableZoneIds = ZoneRulesProvider.getAvailableZoneIds();
4472
+ if (availableZoneIds.length === 0) {
4473
+ return null;
4474
+ }
4475
+ if (zoneIdTree.size !== availableZoneIds.length) {
4476
+ zoneIdTree = ZoneIdTree.createTreeMap(availableZoneIds);
4477
+ }
4478
+ var maxParseLength = text.length - position;
4479
+ var treeMap = zoneIdTree.treeMap;
4480
+ var parsedZoneId = null;
4481
+ var parseLength = 0;
4482
+ while (treeMap != null) {
4483
+ var parsedSubZoneId = text.substr(position, Math.min(treeMap.length, maxParseLength));
4484
+ treeMap = treeMap.get(parsedSubZoneId);
4485
+ if (treeMap != null && treeMap.isLeaf) {
4486
+ parsedZoneId = parsedSubZoneId;
4487
+ parseLength = treeMap.length;
4488
+ }
4489
+ }
4490
+ if (parsedZoneId == null) {
4491
+ return null;
4492
+ }
4493
+ return {
4494
+ parsedZoneId: parsedZoneId,
4495
+ parseLength: parseLength
4496
+ };
4497
+ };
4498
+ _proto._parseFixedId = function _parseFixedId(context, text, position) {
4499
+ var length = text.length;
4479
4500
  var nextChar = text.charAt(position);
4480
4501
  if (nextChar === '+' || nextChar === '-') {
4481
4502
  var newContext = context.copy();
@@ -4484,8 +4505,7 @@
4484
4505
  return endPos;
4485
4506
  }
4486
4507
  var offset = newContext.getParsed(ChronoField.OFFSET_SECONDS);
4487
- var zone = ZoneOffset.ofTotalSeconds(offset);
4488
- context.setParsedZone(zone);
4508
+ context.setParsedZone(ZoneOffset.ofTotalSeconds(offset));
4489
4509
  return endPos;
4490
4510
  } else if (length >= position + 2) {
4491
4511
  var nextNextChar = text.charAt(position + 1);
@@ -4506,26 +4526,6 @@
4506
4526
  context.setParsedZone(ZoneOffset.UTC);
4507
4527
  return position + 1;
4508
4528
  }
4509
- var availableZoneIds = ZoneRulesProvider.getAvailableZoneIds();
4510
- if (zoneIdTree.size !== availableZoneIds.length) {
4511
- zoneIdTree = ZoneIdTree.createTreeMap(availableZoneIds);
4512
- }
4513
- var maxParseLength = length - position;
4514
- var treeMap = zoneIdTree.treeMap;
4515
- var parsedZoneId = null;
4516
- var parseLength = 0;
4517
- while (treeMap != null) {
4518
- var parsedSubZoneId = text.substr(position, Math.min(treeMap.length, maxParseLength));
4519
- treeMap = treeMap.get(parsedSubZoneId);
4520
- if (treeMap != null && treeMap.isLeaf) {
4521
- parsedZoneId = parsedSubZoneId;
4522
- parseLength = treeMap.length;
4523
- }
4524
- }
4525
- if (parsedZoneId != null) {
4526
- context.setParsedZone(ZoneRegion.ofId(parsedZoneId));
4527
- return position + parseLength;
4528
- }
4529
4529
  return ~position;
4530
4530
  };
4531
4531
  _proto._parsePrefixedOffset = function _parsePrefixedOffset(context, text, prefixPos, position) {
@@ -4551,6 +4551,10 @@
4551
4551
  return ZoneIdPrinterParser;
4552
4552
  }();
4553
4553
  var ZoneIdTree = function () {
4554
+ function ZoneIdTree(size, treeMap) {
4555
+ this.size = size;
4556
+ this.treeMap = treeMap;
4557
+ }
4554
4558
  ZoneIdTree.createTreeMap = function createTreeMap(availableZoneIds) {
4555
4559
  var sortedZoneIds = availableZoneIds.sort(function (a, b) {
4556
4560
  return a.length - b.length;
@@ -4561,10 +4565,6 @@
4561
4565
  }
4562
4566
  return new ZoneIdTree(sortedZoneIds.length, treeMap);
4563
4567
  };
4564
- function ZoneIdTree(size, treeMap) {
4565
- this.size = size;
4566
- this.treeMap = treeMap;
4567
- }
4568
4568
  return ZoneIdTree;
4569
4569
  }();
4570
4570
  var ZoneIdTreeMap = function () {
@@ -5249,7 +5249,7 @@
5249
5249
  var newContext = context.copy();
5250
5250
  var minDigits = this.fractionalDigits < 0 ? 0 : this.fractionalDigits;
5251
5251
  var maxDigits = this.fractionalDigits < 0 ? 9 : this.fractionalDigits;
5252
- 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).appendLiteral('Z').toFormatter()._toPrinterParser(false);
5252
+ 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);
5253
5253
  var pos = parser.parse(newContext, text, position);
5254
5254
  if (pos < 0) {
5255
5255
  return pos;
@@ -5261,6 +5261,8 @@
5261
5261
  var min = newContext.getParsed(ChronoField.MINUTE_OF_HOUR);
5262
5262
  var secVal = newContext.getParsed(ChronoField.SECOND_OF_MINUTE);
5263
5263
  var nanoVal = newContext.getParsed(ChronoField.NANO_OF_SECOND);
5264
+ var offsetSecs = newContext.getParsed(ChronoField.OFFSET_SECONDS);
5265
+ var offset = offsetSecs != null ? offsetSecs : 0;
5264
5266
  var sec = secVal != null ? secVal : 0;
5265
5267
  var nano = nanoVal != null ? nanoVal : 0;
5266
5268
  var year = MathUtil.intMod(yearParsed, 10000);
@@ -5275,7 +5277,7 @@
5275
5277
  var instantSecs;
5276
5278
  try {
5277
5279
  var ldt = LocalDateTime.of(year, month, day, hour, min, sec, 0).plusDays(days);
5278
- instantSecs = ldt.toEpochSecond(ZoneOffset.UTC);
5280
+ instantSecs = ldt.toEpochSecond(ZoneOffset.ofTotalSeconds(offset));
5279
5281
  instantSecs += MathUtil.safeMultiply(MathUtil.intDiv(yearParsed, 10000), SECONDS_PER_10000_YEARS);
5280
5282
  } catch (ex) {
5281
5283
  return ~position;
@@ -5365,15 +5367,6 @@
5365
5367
  */
5366
5368
 
5367
5369
  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
5370
  function DateTimeFormatter(printerParser, locale, decimalStyle, resolverStyle, resolverFields, chrono, zone) {
5378
5371
  if (chrono === void 0) {
5379
5372
  chrono = IsoChronology.INSTANCE;
@@ -5389,6 +5382,15 @@
5389
5382
  this._chrono = chrono;
5390
5383
  this._zone = zone;
5391
5384
  }
5385
+ DateTimeFormatter.parsedExcessDays = function parsedExcessDays() {
5386
+ return DateTimeFormatter.PARSED_EXCESS_DAYS;
5387
+ };
5388
+ DateTimeFormatter.parsedLeapSecond = function parsedLeapSecond() {
5389
+ return DateTimeFormatter.PARSED_LEAP_SECOND;
5390
+ };
5391
+ DateTimeFormatter.ofPattern = function ofPattern(pattern) {
5392
+ return new DateTimeFormatterBuilder().appendPattern(pattern).toFormatter();
5393
+ };
5392
5394
  var _proto = DateTimeFormatter.prototype;
5393
5395
  _proto.locale = function locale() {
5394
5396
  return this._locale;
@@ -5543,6 +5545,13 @@
5543
5545
  }
5544
5546
 
5545
5547
  var MonthDay = function (_TemporalAccessor) {
5548
+ function MonthDay(month, dayOfMonth) {
5549
+ var _this;
5550
+ _this = _TemporalAccessor.call(this) || this;
5551
+ _this._month = MathUtil.safeToInt(month);
5552
+ _this._day = MathUtil.safeToInt(dayOfMonth);
5553
+ return _this;
5554
+ }
5546
5555
  _inheritsLoose(MonthDay, _TemporalAccessor);
5547
5556
  MonthDay.now = function now(zoneIdOrClock) {
5548
5557
  if (arguments.length === 0) {
@@ -5613,13 +5622,6 @@
5613
5622
  requireInstance(formatter, DateTimeFormatter, 'formatter');
5614
5623
  return formatter.parse(text, MonthDay.FROM);
5615
5624
  };
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
5625
  var _proto = MonthDay.prototype;
5624
5626
  _proto.monthValue = function monthValue() {
5625
5627
  return this._month;
@@ -5747,6 +5749,13 @@
5747
5749
  }
5748
5750
 
5749
5751
  var YearMonth = function (_Temporal) {
5752
+ function YearMonth(year, month) {
5753
+ var _this;
5754
+ _this = _Temporal.call(this) || this;
5755
+ _this._year = MathUtil.safeToInt(year);
5756
+ _this._month = MathUtil.safeToInt(month);
5757
+ return _this;
5758
+ }
5750
5759
  _inheritsLoose(YearMonth, _Temporal);
5751
5760
  YearMonth.now = function now(zoneIdOrClock) {
5752
5761
  if (arguments.length === 0) {
@@ -5811,13 +5820,6 @@
5811
5820
  requireNonNull(formatter, 'formatter');
5812
5821
  return formatter.parse(text, YearMonth.FROM);
5813
5822
  };
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
5823
  var _proto = YearMonth.prototype;
5822
5824
  _proto.isSupported = function isSupported(fieldOrUnit) {
5823
5825
  if (arguments.length === 1 && fieldOrUnit instanceof TemporalField) {
@@ -6071,13 +6073,13 @@
6071
6073
  }
6072
6074
 
6073
6075
  var Year = function (_Temporal) {
6074
- _inheritsLoose(Year, _Temporal);
6075
6076
  function Year(value) {
6076
6077
  var _this;
6077
6078
  _this = _Temporal.call(this) || this;
6078
6079
  _this._year = MathUtil.safeToInt(value);
6079
6080
  return _this;
6080
6081
  }
6082
+ _inheritsLoose(Year, _Temporal);
6081
6083
  var _proto = Year.prototype;
6082
6084
  _proto.value = function value() {
6083
6085
  return this._year;
@@ -6418,13 +6420,13 @@
6418
6420
  return TemporalAdjusters;
6419
6421
  }();
6420
6422
  var Impl = function (_TemporalAdjuster) {
6421
- _inheritsLoose(Impl, _TemporalAdjuster);
6422
6423
  function Impl(ordinal) {
6423
6424
  var _this;
6424
6425
  _this = _TemporalAdjuster.call(this) || this;
6425
6426
  _this._ordinal = ordinal;
6426
6427
  return _this;
6427
6428
  }
6429
+ _inheritsLoose(Impl, _TemporalAdjuster);
6428
6430
  var _proto = Impl.prototype;
6429
6431
  _proto.adjustInto = function adjustInto(temporal) {
6430
6432
  switch (this._ordinal) {
@@ -6452,7 +6454,6 @@
6452
6454
  Impl.LAST_DAY_OF_YEAR = new Impl(4);
6453
6455
  Impl.FIRST_DAY_OF_NEXT_YEAR = new Impl(5);
6454
6456
  var DayOfWeekInMonth = function (_TemporalAdjuster2) {
6455
- _inheritsLoose(DayOfWeekInMonth, _TemporalAdjuster2);
6456
6457
  function DayOfWeekInMonth(ordinal, dow) {
6457
6458
  var _this2;
6458
6459
  _this2 = _TemporalAdjuster2.call(this) || this;
@@ -6460,6 +6461,7 @@
6460
6461
  _this2._dowValue = dow.value();
6461
6462
  return _this2;
6462
6463
  }
6464
+ _inheritsLoose(DayOfWeekInMonth, _TemporalAdjuster2);
6463
6465
  var _proto2 = DayOfWeekInMonth.prototype;
6464
6466
  _proto2.adjustInto = function adjustInto(temporal) {
6465
6467
  if (this._ordinal >= 0) {
@@ -6480,7 +6482,6 @@
6480
6482
  return DayOfWeekInMonth;
6481
6483
  }(TemporalAdjuster);
6482
6484
  var RelativeDayOfWeek = function (_TemporalAdjuster3) {
6483
- _inheritsLoose(RelativeDayOfWeek, _TemporalAdjuster3);
6484
6485
  function RelativeDayOfWeek(relative, dayOfWeek) {
6485
6486
  var _this3;
6486
6487
  _this3 = _TemporalAdjuster3.call(this) || this;
@@ -6489,6 +6490,7 @@
6489
6490
  _this3._dowValue = dayOfWeek.value();
6490
6491
  return _this3;
6491
6492
  }
6493
+ _inheritsLoose(RelativeDayOfWeek, _TemporalAdjuster3);
6492
6494
  var _proto3 = RelativeDayOfWeek.prototype;
6493
6495
  _proto3.adjustInto = function adjustInto(temporal) {
6494
6496
  var calDow = temporal.get(ChronoField.DAY_OF_WEEK);
@@ -6507,10 +6509,10 @@
6507
6509
  }(TemporalAdjuster);
6508
6510
 
6509
6511
  var IsoChronology = function (_Enum) {
6510
- _inheritsLoose(IsoChronology, _Enum);
6511
6512
  function IsoChronology() {
6512
6513
  return _Enum.apply(this, arguments) || this;
6513
6514
  }
6515
+ _inheritsLoose(IsoChronology, _Enum);
6514
6516
  IsoChronology.isLeapYear = function isLeapYear(prolepticYear) {
6515
6517
  return (prolepticYear & 3) === 0 && (prolepticYear % 100 !== 0 || prolepticYear % 400 === 0);
6516
6518
  };
@@ -6640,6 +6642,17 @@
6640
6642
  }
6641
6643
 
6642
6644
  var OffsetTime = function (_Temporal) {
6645
+ function OffsetTime(time, offset) {
6646
+ var _this;
6647
+ _this = _Temporal.call(this) || this;
6648
+ requireNonNull(time, 'time');
6649
+ requireInstance(time, LocalTime, 'time');
6650
+ requireNonNull(offset, 'offset');
6651
+ requireInstance(offset, ZoneOffset, 'offset');
6652
+ _this._time = time;
6653
+ _this._offset = offset;
6654
+ return _this;
6655
+ }
6643
6656
  _inheritsLoose(OffsetTime, _Temporal);
6644
6657
  OffsetTime.from = function from(temporal) {
6645
6658
  requireNonNull(temporal, 'temporal');
@@ -6706,17 +6719,6 @@
6706
6719
  requireNonNull(formatter, 'formatter');
6707
6720
  return formatter.parse(text, OffsetTime.FROM);
6708
6721
  };
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
6722
  var _proto = OffsetTime.prototype;
6721
6723
  _proto.adjustInto = function adjustInto(temporal) {
6722
6724
  return temporal.with(ChronoField.NANO_OF_DAY, this._time.toNanoOfDay()).with(ChronoField.OFFSET_SECONDS, this.offset().totalSeconds());
@@ -6967,10 +6969,10 @@
6967
6969
  }
6968
6970
 
6969
6971
  var ChronoZonedDateTime = function (_Temporal) {
6970
- _inheritsLoose(ChronoZonedDateTime, _Temporal);
6971
6972
  function ChronoZonedDateTime() {
6972
6973
  return _Temporal.apply(this, arguments) || this;
6973
6974
  }
6975
+ _inheritsLoose(ChronoZonedDateTime, _Temporal);
6974
6976
  var _proto = ChronoZonedDateTime.prototype;
6975
6977
  _proto.query = function query(_query) {
6976
6978
  if (_query === TemporalQueries.zoneId() || _query === TemporalQueries.zone()) {
@@ -7053,6 +7055,17 @@
7053
7055
  }
7054
7056
 
7055
7057
  var ZonedDateTime = function (_ChronoZonedDateTime) {
7058
+ function ZonedDateTime(dateTime, offset, zone) {
7059
+ var _this;
7060
+ requireNonNull(dateTime, 'dateTime');
7061
+ requireNonNull(offset, 'offset');
7062
+ requireNonNull(zone, 'zone');
7063
+ _this = _ChronoZonedDateTime.call(this) || this;
7064
+ _this._dateTime = dateTime;
7065
+ _this._offset = offset;
7066
+ _this._zone = zone;
7067
+ return _this;
7068
+ }
7056
7069
  _inheritsLoose(ZonedDateTime, _ChronoZonedDateTime);
7057
7070
  ZonedDateTime.now = function now(clockOrZone) {
7058
7071
  var clock;
@@ -7188,17 +7201,6 @@
7188
7201
  requireNonNull(formatter, 'formatter');
7189
7202
  return formatter.parse(text, ZonedDateTime.FROM);
7190
7203
  };
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
7204
  var _proto = ZonedDateTime.prototype;
7203
7205
  _proto._resolveLocal = function _resolveLocal(newDateTime) {
7204
7206
  requireNonNull(newDateTime, 'newDateTime');
@@ -7499,6 +7501,17 @@
7499
7501
  }
7500
7502
 
7501
7503
  var OffsetDateTime = function (_Temporal) {
7504
+ function OffsetDateTime(dateTime, offset) {
7505
+ var _this;
7506
+ _this = _Temporal.call(this) || this;
7507
+ requireNonNull(dateTime, 'dateTime');
7508
+ requireInstance(dateTime, LocalDateTime, 'dateTime');
7509
+ requireNonNull(offset, 'offset');
7510
+ requireInstance(offset, ZoneOffset, 'offset');
7511
+ _this._dateTime = dateTime;
7512
+ _this._offset = offset;
7513
+ return _this;
7514
+ }
7502
7515
  _inheritsLoose(OffsetDateTime, _Temporal);
7503
7516
  OffsetDateTime.from = function from(temporal) {
7504
7517
  requireNonNull(temporal, 'temporal');
@@ -7526,8 +7539,8 @@
7526
7539
  if (clockOrZone instanceof ZoneId) {
7527
7540
  return OffsetDateTime.now(Clock.system(clockOrZone));
7528
7541
  } else if (clockOrZone instanceof Clock) {
7529
- var now = clockOrZone.instant();
7530
- return OffsetDateTime.ofInstant(now, clockOrZone.zone().rules().offset(now));
7542
+ var _now = clockOrZone.instant();
7543
+ return OffsetDateTime.ofInstant(_now, clockOrZone.zone().rules().offset(_now));
7531
7544
  } else {
7532
7545
  throw new IllegalArgumentException('clockOrZone must be an instance of ZoneId or Clock');
7533
7546
  }
@@ -7580,17 +7593,6 @@
7580
7593
  requireNonNull(formatter, 'formatter');
7581
7594
  return formatter.parse(text, OffsetDateTime.FROM);
7582
7595
  };
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
7596
  var _proto = OffsetDateTime.prototype;
7595
7597
  _proto.adjustInto = function adjustInto(temporal) {
7596
7598
  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 +7930,21 @@
7928
7930
  var DAYS_PER_CYCLE = 146097;
7929
7931
  var DAYS_0000_TO_1970 = DAYS_PER_CYCLE * 5 - (30 * 365 + 7);
7930
7932
  var LocalDate = function (_ChronoLocalDate) {
7933
+ function LocalDate(year, month, dayOfMonth) {
7934
+ var _this;
7935
+ _this = _ChronoLocalDate.call(this) || this;
7936
+ requireNonNull(year, 'year');
7937
+ requireNonNull(month, 'month');
7938
+ requireNonNull(dayOfMonth, 'dayOfMonth');
7939
+ if (month instanceof Month) {
7940
+ month = month.value();
7941
+ }
7942
+ _this._year = MathUtil.safeToInt(year);
7943
+ _this._month = MathUtil.safeToInt(month);
7944
+ _this._day = MathUtil.safeToInt(dayOfMonth);
7945
+ LocalDate._validate(_this._year, _this._month, _this._day);
7946
+ return _this;
7947
+ }
7931
7948
  _inheritsLoose(LocalDate, _ChronoLocalDate);
7932
7949
  LocalDate.now = function now(clockOrZone) {
7933
7950
  var clock;
@@ -8024,21 +8041,6 @@
8024
8041
  }
8025
8042
  return LocalDate.of(year, month, day);
8026
8043
  };
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
8044
  LocalDate._validate = function _validate(year, month, dayOfMonth) {
8043
8045
  var dom;
8044
8046
  ChronoField.YEAR.checkValidValue(year);
@@ -8537,10 +8539,10 @@
8537
8539
  }
8538
8540
 
8539
8541
  var ChronoLocalDateTime = function (_Temporal) {
8540
- _inheritsLoose(ChronoLocalDateTime, _Temporal);
8541
8542
  function ChronoLocalDateTime() {
8542
8543
  return _Temporal.apply(this, arguments) || this;
8543
8544
  }
8545
+ _inheritsLoose(ChronoLocalDateTime, _Temporal);
8544
8546
  var _proto = ChronoLocalDateTime.prototype;
8545
8547
  _proto.chronology = function chronology() {
8546
8548
  return this.toLocalDate().chronology();
@@ -8577,6 +8579,15 @@
8577
8579
  }(Temporal);
8578
8580
 
8579
8581
  var LocalDateTime = function (_ChronoLocalDateTime) {
8582
+ function LocalDateTime(date, time) {
8583
+ var _this;
8584
+ _this = _ChronoLocalDateTime.call(this) || this;
8585
+ requireInstance(date, LocalDate, 'date');
8586
+ requireInstance(time, LocalTime, 'time');
8587
+ _this._date = date;
8588
+ _this._time = time;
8589
+ return _this;
8590
+ }
8580
8591
  _inheritsLoose(LocalDateTime, _ChronoLocalDateTime);
8581
8592
  LocalDateTime.now = function now(clockOrZone) {
8582
8593
  if (clockOrZone == null) {
@@ -8680,15 +8691,6 @@
8680
8691
  requireNonNull(formatter, 'formatter');
8681
8692
  return formatter.parse(text, LocalDateTime.FROM);
8682
8693
  };
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
8694
  var _proto = LocalDateTime.prototype;
8693
8695
  _proto._withDateTime = function _withDateTime(newDate, newTime) {
8694
8696
  if (this._date.equals(newDate) && this._time.equals(newTime)) {
@@ -9027,6 +9029,42 @@
9027
9029
  }
9028
9030
 
9029
9031
  var LocalTime = function (_Temporal) {
9032
+ function LocalTime(hour, minute, second, nanoOfSecond) {
9033
+ var _this;
9034
+ if (hour === void 0) {
9035
+ hour = 0;
9036
+ }
9037
+ if (minute === void 0) {
9038
+ minute = 0;
9039
+ }
9040
+ if (second === void 0) {
9041
+ second = 0;
9042
+ }
9043
+ if (nanoOfSecond === void 0) {
9044
+ nanoOfSecond = 0;
9045
+ }
9046
+ _this = _Temporal.call(this) || this;
9047
+ var _hour = MathUtil.safeToInt(hour);
9048
+ var _minute = MathUtil.safeToInt(minute);
9049
+ var _second = MathUtil.safeToInt(second);
9050
+ var _nanoOfSecond = MathUtil.safeToInt(nanoOfSecond);
9051
+ LocalTime._validate(_hour, _minute, _second, _nanoOfSecond);
9052
+ if (_minute === 0 && _second === 0 && _nanoOfSecond === 0) {
9053
+ if (!LocalTime.HOURS[_hour]) {
9054
+ _this._hour = _hour;
9055
+ _this._minute = _minute;
9056
+ _this._second = _second;
9057
+ _this._nano = _nanoOfSecond;
9058
+ LocalTime.HOURS[_hour] = _this;
9059
+ }
9060
+ return LocalTime.HOURS[_hour] || _assertThisInitialized(_this);
9061
+ }
9062
+ _this._hour = _hour;
9063
+ _this._minute = _minute;
9064
+ _this._second = _second;
9065
+ _this._nano = _nanoOfSecond;
9066
+ return _this;
9067
+ }
9030
9068
  _inheritsLoose(LocalTime, _Temporal);
9031
9069
  LocalTime.now = function now(clockOrZone) {
9032
9070
  if (clockOrZone == null) {
@@ -9102,42 +9140,6 @@
9102
9140
  requireNonNull(formatter, 'formatter');
9103
9141
  return formatter.parse(text, LocalTime.FROM);
9104
9142
  };
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
9143
  LocalTime._validate = function _validate(hour, minute, second, nanoOfSecond) {
9142
9144
  ChronoField.HOUR_OF_DAY.checkValidValue(hour);
9143
9145
  ChronoField.MINUTE_OF_HOUR.checkValidValue(minute);
@@ -9562,6 +9564,14 @@
9562
9564
 
9563
9565
  var NANOS_PER_MILLI = 1000000;
9564
9566
  var Instant = function (_Temporal) {
9567
+ function Instant(seconds, nanoOfSecond) {
9568
+ var _this;
9569
+ _this = _Temporal.call(this) || this;
9570
+ Instant._validate(seconds, nanoOfSecond);
9571
+ _this._seconds = MathUtil.safeToInt(seconds);
9572
+ _this._nanos = MathUtil.safeToInt(nanoOfSecond);
9573
+ return _this;
9574
+ }
9565
9575
  _inheritsLoose(Instant, _Temporal);
9566
9576
  Instant.now = function now(clock) {
9567
9577
  if (clock === void 0) {
@@ -9613,14 +9623,6 @@
9613
9623
  throw new DateTimeException('Instant exceeds minimum or maximum instant');
9614
9624
  }
9615
9625
  };
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
9626
  var _proto = Instant.prototype;
9625
9627
  _proto.isSupported = function isSupported(fieldOrUnit) {
9626
9628
  if (fieldOrUnit instanceof ChronoField) {
@@ -9697,7 +9699,7 @@
9697
9699
  throw new DateTimeException('Unit must divide into a standard day without remainder');
9698
9700
  }
9699
9701
  var nod = MathUtil.intMod(this._seconds, LocalTime.SECONDS_PER_DAY) * LocalTime.NANOS_PER_SECOND + this._nanos;
9700
- var result = MathUtil.intDiv(nod, dur) * dur;
9702
+ var result = MathUtil.floorDiv(nod, dur) * dur;
9701
9703
  return this.plusNanos(result - nod);
9702
9704
  };
9703
9705
  _proto._plusUnit = function _plusUnit(amountToAdd, unit) {
@@ -9913,7 +9915,6 @@
9913
9915
  return Clock;
9914
9916
  }();
9915
9917
  var SystemClock = function (_Clock) {
9916
- _inheritsLoose(SystemClock, _Clock);
9917
9918
  function SystemClock(zone) {
9918
9919
  var _this;
9919
9920
  requireNonNull(zone, 'zone');
@@ -9921,6 +9922,7 @@
9921
9922
  _this._zone = zone;
9922
9923
  return _this;
9923
9924
  }
9925
+ _inheritsLoose(SystemClock, _Clock);
9924
9926
  var _proto2 = SystemClock.prototype;
9925
9927
  _proto2.zone = function zone() {
9926
9928
  return this._zone;
@@ -9949,7 +9951,6 @@
9949
9951
  return SystemClock;
9950
9952
  }(Clock);
9951
9953
  var FixedClock = function (_Clock2) {
9952
- _inheritsLoose(FixedClock, _Clock2);
9953
9954
  function FixedClock(fixedInstant, zoneId) {
9954
9955
  var _this2;
9955
9956
  _this2 = _Clock2.call(this) || this;
@@ -9957,6 +9958,7 @@
9957
9958
  _this2._zoneId = zoneId;
9958
9959
  return _this2;
9959
9960
  }
9961
+ _inheritsLoose(FixedClock, _Clock2);
9960
9962
  var _proto3 = FixedClock.prototype;
9961
9963
  _proto3.instant = function instant() {
9962
9964
  return this._instant;
@@ -9985,7 +9987,6 @@
9985
9987
  return FixedClock;
9986
9988
  }(Clock);
9987
9989
  var OffsetClock = function (_Clock3) {
9988
- _inheritsLoose(OffsetClock, _Clock3);
9989
9990
  function OffsetClock(baseClock, offset) {
9990
9991
  var _this3;
9991
9992
  _this3 = _Clock3.call(this) || this;
@@ -9993,6 +9994,7 @@
9993
9994
  _this3._offset = offset;
9994
9995
  return _this3;
9995
9996
  }
9997
+ _inheritsLoose(OffsetClock, _Clock3);
9996
9998
  var _proto4 = OffsetClock.prototype;
9997
9999
  _proto4.zone = function zone() {
9998
10000
  return this._baseClock.zone();
@@ -10028,9 +10030,6 @@
10028
10030
  */
10029
10031
 
10030
10032
  var ZoneOffsetTransition = function () {
10031
- ZoneOffsetTransition.of = function of(transition, offsetBefore, offsetAfter) {
10032
- return new ZoneOffsetTransition(transition, offsetBefore, offsetAfter);
10033
- };
10034
10033
  function ZoneOffsetTransition(transition, offsetBefore, offsetAfter) {
10035
10034
  requireNonNull(transition, 'transition');
10036
10035
  requireNonNull(offsetBefore, 'offsetBefore');
@@ -10049,6 +10048,9 @@
10049
10048
  this._offsetBefore = offsetBefore;
10050
10049
  this._offsetAfter = offsetAfter;
10051
10050
  }
10051
+ ZoneOffsetTransition.of = function of(transition, offsetBefore, offsetAfter) {
10052
+ return new ZoneOffsetTransition(transition, offsetBefore, offsetAfter);
10053
+ };
10052
10054
  var _proto = ZoneOffsetTransition.prototype;
10053
10055
  _proto.instant = function instant() {
10054
10056
  return this._transition.toInstant(this._offsetBefore);
@@ -10153,10 +10155,10 @@
10153
10155
  }
10154
10156
 
10155
10157
  var SystemDefaultZoneRules = function (_ZoneRules) {
10156
- _inheritsLoose(SystemDefaultZoneRules, _ZoneRules);
10157
10158
  function SystemDefaultZoneRules() {
10158
10159
  return _ZoneRules.apply(this, arguments) || this;
10159
10160
  }
10161
+ _inheritsLoose(SystemDefaultZoneRules, _ZoneRules);
10160
10162
  var _proto = SystemDefaultZoneRules.prototype;
10161
10163
  _proto.isFixedOffset = function isFixedOffset() {
10162
10164
  return false;
@@ -10223,13 +10225,13 @@
10223
10225
  }(ZoneRules);
10224
10226
 
10225
10227
  var SystemDefaultZoneId = function (_ZoneId) {
10226
- _inheritsLoose(SystemDefaultZoneId, _ZoneId);
10227
10228
  function SystemDefaultZoneId() {
10228
10229
  var _this;
10229
10230
  _this = _ZoneId.call(this) || this;
10230
10231
  _this._rules = new SystemDefaultZoneRules();
10231
10232
  return _this;
10232
10233
  }
10234
+ _inheritsLoose(SystemDefaultZoneId, _ZoneId);
10233
10235
  var _proto = SystemDefaultZoneId.prototype;
10234
10236
  _proto.rules = function rules() {
10235
10237
  return this._rules;