@js-joda/core 1.12.0 → 3.2.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.
@@ -1,4 +1,4 @@
1
- //! @version @js-joda/core - 1.12.0
1
+ //! @version @js-joda/core - 3.2.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)
@@ -12,7 +12,7 @@ function createErrorType(name, init, superErrorClass) {
12
12
  superErrorClass = Error;
13
13
  }
14
14
 
15
- function E(message) {
15
+ function JsJodaException(message) {
16
16
  if (!Error.captureStackTrace) {
17
17
  this.stack = new Error().stack;
18
18
  } else {
@@ -27,10 +27,10 @@ function createErrorType(name, init, superErrorClass) {
27
27
  };
28
28
  }
29
29
 
30
- E.prototype = new superErrorClass();
31
- E.prototype.name = name;
32
- E.prototype.constructor = E;
33
- return E;
30
+ JsJodaException.prototype = Object.create(superErrorClass.prototype);
31
+ JsJodaException.prototype.name = name;
32
+ JsJodaException.prototype.constructor = JsJodaException;
33
+ return JsJodaException;
34
34
  }
35
35
 
36
36
  var DateTimeException = createErrorType('DateTimeException', messageWithCause);
@@ -132,6 +132,7 @@ function abstractMethodFail(methodName) {
132
132
  }
133
133
 
134
134
  var assert$1 = /*#__PURE__*/Object.freeze({
135
+ __proto__: null,
135
136
  assert: assert,
136
137
  requireNonNull: requireNonNull,
137
138
  requireInstance: requireInstance,
@@ -616,7 +617,7 @@ var Duration = function (_TemporalAmount) {
616
617
  nanoAdjustment = 0;
617
618
  }
618
619
 
619
- if ((seconds | nanoAdjustment) === 0) {
620
+ if (seconds === 0 && nanoAdjustment === 0) {
620
621
  return Duration.ZERO;
621
622
  }
622
623
 
@@ -640,7 +641,7 @@ var Duration = function (_TemporalAmount) {
640
641
  };
641
642
 
642
643
  _proto.isZero = function isZero() {
643
- return (this._seconds | this._nanos) === 0;
644
+ return this._seconds === 0 && this._nanos === 0;
644
645
  };
645
646
 
646
647
  _proto.isNegative = function isNegative() {
@@ -745,7 +746,7 @@ var Duration = function (_TemporalAmount) {
745
746
  requireNonNull(secondsToAdd, 'secondsToAdd');
746
747
  requireNonNull(nanosToAdd, 'nanosToAdd');
747
748
 
748
- if ((secondsToAdd | nanosToAdd) === 0) {
749
+ if (secondsToAdd === 0 && nanosToAdd === 0) {
749
750
  return this;
750
751
  }
751
752
 
@@ -1086,7 +1087,62 @@ function _init$2() {
1086
1087
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
1087
1088
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
1088
1089
  */
1089
- var TemporalField = function TemporalField() {};
1090
+
1091
+ var TemporalField = function () {
1092
+ function TemporalField() {}
1093
+
1094
+ var _proto = TemporalField.prototype;
1095
+
1096
+ _proto.isDateBased = function isDateBased() {
1097
+ abstractMethodFail('isDateBased');
1098
+ };
1099
+
1100
+ _proto.isTimeBased = function isTimeBased() {
1101
+ abstractMethodFail('isTimeBased');
1102
+ };
1103
+
1104
+ _proto.baseUnit = function baseUnit() {
1105
+ abstractMethodFail('baseUnit');
1106
+ };
1107
+
1108
+ _proto.rangeUnit = function rangeUnit() {
1109
+ abstractMethodFail('rangeUnit');
1110
+ };
1111
+
1112
+ _proto.range = function range() {
1113
+ abstractMethodFail('range');
1114
+ };
1115
+
1116
+ _proto.rangeRefinedBy = function rangeRefinedBy(temporal) {
1117
+ abstractMethodFail('rangeRefinedBy');
1118
+ };
1119
+
1120
+ _proto.getFrom = function getFrom(temporal) {
1121
+ abstractMethodFail('getFrom');
1122
+ };
1123
+
1124
+ _proto.adjustInto = function adjustInto(temporal, newValue) {
1125
+ abstractMethodFail('adjustInto');
1126
+ };
1127
+
1128
+ _proto.isSupportedBy = function isSupportedBy(temporal) {
1129
+ abstractMethodFail('isSupportedBy');
1130
+ };
1131
+
1132
+ _proto.displayName = function displayName() {
1133
+ abstractMethodFail('displayName');
1134
+ };
1135
+
1136
+ _proto.equals = function equals(other) {
1137
+ abstractMethodFail('equals');
1138
+ };
1139
+
1140
+ _proto.name = function name() {
1141
+ abstractMethodFail('name');
1142
+ };
1143
+
1144
+ return TemporalField;
1145
+ }();
1090
1146
 
1091
1147
  /**
1092
1148
  * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
@@ -1142,6 +1198,8 @@ var ValueRange = function () {
1142
1198
 
1143
1199
  return assert(false, msg, DateTimeException);
1144
1200
  }
1201
+
1202
+ return value;
1145
1203
  };
1146
1204
 
1147
1205
  _proto.checkValidIntValue = function checkValidIntValue(value, field) {
@@ -1245,7 +1303,11 @@ var ChronoField = function (_TemporalField) {
1245
1303
  };
1246
1304
 
1247
1305
  _proto.checkValidValue = function checkValidValue(value) {
1248
- return this.range().checkValidValue(value, this.name());
1306
+ return this.range().checkValidValue(value, this);
1307
+ };
1308
+
1309
+ _proto.checkValidIntValue = function checkValidIntValue(value) {
1310
+ return this.range().checkValidIntValue(value, this);
1249
1311
  };
1250
1312
 
1251
1313
  _proto.isDateBased = function isDateBased() {
@@ -1262,10 +1324,6 @@ var ChronoField = function (_TemporalField) {
1262
1324
  return temporal.range(this);
1263
1325
  };
1264
1326
 
1265
- _proto.checkValidIntValue = function checkValidIntValue(value) {
1266
- return this.range().checkValidIntValue(value, this);
1267
- };
1268
-
1269
1327
  _proto.getFrom = function getFrom(temporal) {
1270
1328
  return temporal.getLong(this);
1271
1329
  };
@@ -1278,6 +1336,14 @@ var ChronoField = function (_TemporalField) {
1278
1336
  return this === other;
1279
1337
  };
1280
1338
 
1339
+ _proto.adjustInto = function adjustInto(temporal, newValue) {
1340
+ return temporal.with(this, newValue);
1341
+ };
1342
+
1343
+ _proto.isSupportedBy = function isSupportedBy(temporal) {
1344
+ return temporal.isSupported(this);
1345
+ };
1346
+
1281
1347
  return ChronoField;
1282
1348
  }(TemporalField);
1283
1349
  function _init$3() {
@@ -1389,16 +1455,6 @@ var TemporalAccessor = function () {
1389
1455
  return TemporalAccessor;
1390
1456
  }();
1391
1457
 
1392
- var Temporal = function (_TemporalAccessor) {
1393
- _inheritsLoose(Temporal, _TemporalAccessor);
1394
-
1395
- function Temporal() {
1396
- return _TemporalAccessor.apply(this, arguments) || this;
1397
- }
1398
-
1399
- return Temporal;
1400
- }(TemporalAccessor);
1401
-
1402
1458
  var TemporalQuery = function (_Enum) {
1403
1459
  _inheritsLoose(TemporalQuery, _Enum);
1404
1460
 
@@ -1429,13 +1485,13 @@ function createTemporalQuery(name, queryFromFunction) {
1429
1485
  return new ExtendedTemporalQuery(name);
1430
1486
  }
1431
1487
 
1432
- var DayOfWeek = function (_Temporal) {
1433
- _inheritsLoose(DayOfWeek, _Temporal);
1488
+ var DayOfWeek = function (_TemporalAccessor) {
1489
+ _inheritsLoose(DayOfWeek, _TemporalAccessor);
1434
1490
 
1435
1491
  function DayOfWeek(ordinal, name) {
1436
1492
  var _this;
1437
1493
 
1438
- _this = _Temporal.call(this) || this;
1494
+ _this = _TemporalAccessor.call(this) || this;
1439
1495
  _this._ordinal = ordinal;
1440
1496
  _this._name = name;
1441
1497
  return _this;
@@ -1497,7 +1553,7 @@ var DayOfWeek = function (_Temporal) {
1497
1553
  return this._ordinal + 1;
1498
1554
  };
1499
1555
 
1500
- _proto.getDisplayName = function getDisplayName(style, locale) {
1556
+ _proto.displayName = function displayName(style, locale) {
1501
1557
  throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');
1502
1558
  };
1503
1559
 
@@ -1581,7 +1637,7 @@ var DayOfWeek = function (_Temporal) {
1581
1637
  };
1582
1638
 
1583
1639
  return DayOfWeek;
1584
- }(Temporal);
1640
+ }(TemporalAccessor);
1585
1641
  var ENUMS;
1586
1642
  function _init$4() {
1587
1643
  DayOfWeek.MONDAY = new DayOfWeek(0, 'MONDAY');
@@ -1597,13 +1653,13 @@ function _init$4() {
1597
1653
  ENUMS = [DayOfWeek.MONDAY, DayOfWeek.TUESDAY, DayOfWeek.WEDNESDAY, DayOfWeek.THURSDAY, DayOfWeek.FRIDAY, DayOfWeek.SATURDAY, DayOfWeek.SUNDAY];
1598
1654
  }
1599
1655
 
1600
- var Month = function (_Temporal) {
1601
- _inheritsLoose(Month, _Temporal);
1656
+ var Month = function (_TemporalAccessor) {
1657
+ _inheritsLoose(Month, _TemporalAccessor);
1602
1658
 
1603
1659
  function Month(value, name) {
1604
1660
  var _this;
1605
1661
 
1606
- _this = _Temporal.call(this) || this;
1662
+ _this = _TemporalAccessor.call(this) || this;
1607
1663
  _this._value = MathUtil.safeToInt(value);
1608
1664
  _this._name = name;
1609
1665
  return _this;
@@ -1623,7 +1679,7 @@ var Month = function (_Temporal) {
1623
1679
  return this._name;
1624
1680
  };
1625
1681
 
1626
- _proto.getDisplayName = function getDisplayName(style, locale) {
1682
+ _proto.displayName = function displayName(style, locale) {
1627
1683
  throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');
1628
1684
  };
1629
1685
 
@@ -1793,7 +1849,7 @@ var Month = function (_Temporal) {
1793
1849
  return ChronoUnit.MONTHS;
1794
1850
  }
1795
1851
 
1796
- return _Temporal.prototype.query.call(this, _query);
1852
+ return _TemporalAccessor.prototype.query.call(this, _query);
1797
1853
  };
1798
1854
 
1799
1855
  _proto.toString = function toString() {
@@ -1894,7 +1950,7 @@ var Month = function (_Temporal) {
1894
1950
  };
1895
1951
 
1896
1952
  return Month;
1897
- }(Temporal);
1953
+ }(TemporalAccessor);
1898
1954
  var MONTHS;
1899
1955
  function _init$5() {
1900
1956
  Month.JANUARY = new Month(1, 'JANUARY');
@@ -1927,7 +1983,7 @@ var Period = function (_TemporalAmount) {
1927
1983
 
1928
1984
  var _days = MathUtil.safeToInt(days);
1929
1985
 
1930
- if ((_years | _months | _days) === 0) {
1986
+ if (_years === 0 && _months === 0 && _days === 0) {
1931
1987
  if (!Period.ZERO) {
1932
1988
  _this._years = _years;
1933
1989
  _this._months = _months;
@@ -2399,13 +2455,135 @@ ResolverStyle.STRICT = new ResolverStyle('STRICT');
2399
2455
  ResolverStyle.SMART = new ResolverStyle('SMART');
2400
2456
  ResolverStyle.LENIENT = new ResolverStyle('LENIENT');
2401
2457
 
2402
- var ChronoLocalDate = function (_Temporal) {
2403
- _inheritsLoose(ChronoLocalDate, _Temporal);
2458
+ /*
2459
+ * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
2460
+ * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
2461
+ * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
2462
+ */
2463
+ var TemporalAdjuster = function () {
2464
+ function TemporalAdjuster() {}
2465
+
2466
+ var _proto = TemporalAdjuster.prototype;
2404
2467
 
2405
- function ChronoLocalDate() {
2468
+ _proto.adjustInto = function adjustInto(temporal) {
2469
+ abstractMethodFail('adjustInto');
2470
+ };
2471
+
2472
+ return TemporalAdjuster;
2473
+ }();
2474
+
2475
+ var Temporal = function (_TemporalAccessor) {
2476
+ _inheritsLoose(Temporal, _TemporalAccessor);
2477
+
2478
+ function Temporal() {
2479
+ return _TemporalAccessor.apply(this, arguments) || this;
2480
+ }
2481
+
2482
+ var _proto = Temporal.prototype;
2483
+
2484
+ _proto.isSupported = function isSupported(unit) {
2485
+ abstractMethodFail('isSupported');
2486
+ };
2487
+
2488
+ _proto.minus = function minus(p1, p2) {
2489
+ if (arguments.length < 2) {
2490
+ return this.minusAmount(p1);
2491
+ } else {
2492
+ return this.minusAmountUnit(p1, p2);
2493
+ }
2494
+ };
2495
+
2496
+ _proto.minusAmount = function minusAmount(amount) {
2497
+ abstractMethodFail('minusAmount');
2498
+ };
2499
+
2500
+ _proto.minusAmountUnit = function minusAmountUnit(amountToSubtract, unit) {
2501
+ abstractMethodFail('minusAmountUnit');
2502
+ };
2503
+
2504
+ _proto.plus = function plus(p1, p2) {
2505
+ if (arguments.length < 2) {
2506
+ return this.plusAmount(p1);
2507
+ } else {
2508
+ return this.plusAmountUnit(p1, p2);
2509
+ }
2510
+ };
2511
+
2512
+ _proto.plusAmount = function plusAmount(amount) {
2513
+ abstractMethodFail('plusAmount');
2514
+ };
2515
+
2516
+ _proto.plusAmountUnit = function plusAmountUnit(amountToAdd, unit) {
2517
+ abstractMethodFail('plusAmountUnit');
2518
+ };
2519
+
2520
+ _proto.until = function until(endTemporal, unit) {
2521
+ abstractMethodFail('until');
2522
+ };
2523
+
2524
+ _proto.with = function _with(p1, p2) {
2525
+ if (arguments.length < 2) {
2526
+ return this.withAdjuster(p1);
2527
+ } else {
2528
+ return this.withFieldValue(p1, p2);
2529
+ }
2530
+ };
2531
+
2532
+ _proto.withAdjuster = function withAdjuster(adjuster) {
2533
+ abstractMethodFail('withAdjuster');
2534
+ };
2535
+
2536
+ _proto.withFieldValue = function withFieldValue(field, newValue) {
2537
+ abstractMethodFail('withFieldValue');
2538
+ };
2539
+
2540
+ return Temporal;
2541
+ }(TemporalAccessor);
2542
+
2543
+ var DefaultInterfaceTemporal = function (_Temporal) {
2544
+ _inheritsLoose(DefaultInterfaceTemporal, _Temporal);
2545
+
2546
+ function DefaultInterfaceTemporal() {
2406
2547
  return _Temporal.apply(this, arguments) || this;
2407
2548
  }
2408
2549
 
2550
+ var _proto = DefaultInterfaceTemporal.prototype;
2551
+
2552
+ _proto.withAdjuster = function withAdjuster(adjuster) {
2553
+ requireNonNull(adjuster, 'adjuster');
2554
+ requireInstance(adjuster, TemporalAdjuster, 'adjuster');
2555
+ return adjuster.adjustInto(this);
2556
+ };
2557
+
2558
+ _proto.plusAmount = function plusAmount(amount) {
2559
+ requireNonNull(amount, 'amount');
2560
+ requireInstance(amount, TemporalAmount, 'amount');
2561
+ return amount.addTo(this);
2562
+ };
2563
+
2564
+ _proto.minusAmount = function minusAmount(amount) {
2565
+ requireNonNull(amount, 'amount');
2566
+ requireInstance(amount, TemporalAmount, 'amount');
2567
+ return amount.subtractFrom(this);
2568
+ };
2569
+
2570
+ _proto.minusAmountUnit = function minusAmountUnit(amountToSubtract, unit) {
2571
+ requireNonNull(amountToSubtract, 'amountToSubtract');
2572
+ requireNonNull(unit, 'unit');
2573
+ requireInstance(unit, TemporalUnit, 'unit');
2574
+ return amountToSubtract === MIN_SAFE_INTEGER ? this.plusAmountUnit(MAX_SAFE_INTEGER, unit).plusAmountUnit(1, unit) : this.plusAmount(-amountToSubtract, unit);
2575
+ };
2576
+
2577
+ return DefaultInterfaceTemporal;
2578
+ }(Temporal);
2579
+
2580
+ var ChronoLocalDate = function (_DefaultInterfaceTemp) {
2581
+ _inheritsLoose(ChronoLocalDate, _DefaultInterfaceTemp);
2582
+
2583
+ function ChronoLocalDate() {
2584
+ return _DefaultInterfaceTemp.apply(this, arguments) || this;
2585
+ }
2586
+
2409
2587
  var _proto = ChronoLocalDate.prototype;
2410
2588
 
2411
2589
  _proto.isSupported = function isSupported(fieldOrUnit) {
@@ -2429,7 +2607,7 @@ var ChronoLocalDate = function (_Temporal) {
2429
2607
  return null;
2430
2608
  }
2431
2609
 
2432
- return _Temporal.prototype.query.call(this, _query);
2610
+ return _DefaultInterfaceTemp.prototype.query.call(this, _query);
2433
2611
  };
2434
2612
 
2435
2613
  _proto.adjustInto = function adjustInto(temporal) {
@@ -2443,7 +2621,7 @@ var ChronoLocalDate = function (_Temporal) {
2443
2621
  };
2444
2622
 
2445
2623
  return ChronoLocalDate;
2446
- }(Temporal);
2624
+ }(DefaultInterfaceTemporal);
2447
2625
 
2448
2626
  /*
2449
2627
  * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
@@ -2988,8 +3166,8 @@ function _init$7() {
2988
3166
  ZoneOffset.MAX = ZoneOffset.ofTotalSeconds(ZoneOffset.MAX_SECONDS);
2989
3167
  }
2990
3168
 
2991
- var DateTimeBuilder = function (_Temporal) {
2992
- _inheritsLoose(DateTimeBuilder, _Temporal);
3169
+ var DateTimeBuilder = function (_TemporalAccessor) {
3170
+ _inheritsLoose(DateTimeBuilder, _TemporalAccessor);
2993
3171
 
2994
3172
  DateTimeBuilder.create = function create(field, value) {
2995
3173
  var dtb = new DateTimeBuilder();
@@ -3002,7 +3180,7 @@ var DateTimeBuilder = function (_Temporal) {
3002
3180
  function DateTimeBuilder() {
3003
3181
  var _this;
3004
3182
 
3005
- _this = _Temporal.call(this) || this;
3183
+ _this = _TemporalAccessor.call(this) || this;
3006
3184
  _this.fieldValues = new EnumMap();
3007
3185
  _this.chrono = null;
3008
3186
  _this.zone = null;
@@ -3417,7 +3595,7 @@ var DateTimeBuilder = function (_Temporal) {
3417
3595
  };
3418
3596
 
3419
3597
  return DateTimeBuilder;
3420
- }(Temporal);
3598
+ }(TemporalAccessor);
3421
3599
 
3422
3600
  var DateTimeParseContext = function () {
3423
3601
  function DateTimeParseContext() {
@@ -3736,7 +3914,7 @@ var DateTimePrintContext = function () {
3736
3914
  return DateTimePrintContext;
3737
3915
  }();
3738
3916
 
3739
- var IsoFields = function IsoFields() {};
3917
+ var IsoFields = {};
3740
3918
  var QUARTER_DAYS = [0, 90, 181, 273, 0, 91, 182, 274];
3741
3919
 
3742
3920
  var Field = function (_TemporalField) {
@@ -3826,7 +4004,7 @@ var Field = function (_TemporalField) {
3826
4004
  return year;
3827
4005
  };
3828
4006
 
3829
- _proto.getDisplayName = function getDisplayName() {
4007
+ _proto.displayName = function displayName() {
3830
4008
  return this.toString();
3831
4009
  };
3832
4010
 
@@ -4100,7 +4278,7 @@ var WEEK_OF_WEEK_BASED_YEAR_FIELD = function (_Field3) {
4100
4278
  return date;
4101
4279
  };
4102
4280
 
4103
- _proto4.getDisplayName = function getDisplayName() {
4281
+ _proto4.displayName = function displayName() {
4104
4282
  return 'Week';
4105
4283
  };
4106
4284
 
@@ -6854,8 +7032,8 @@ function _init$a() {
6854
7032
  });
6855
7033
  }
6856
7034
 
6857
- var MonthDay = function (_Temporal) {
6858
- _inheritsLoose(MonthDay, _Temporal);
7035
+ var MonthDay = function (_TemporalAccessor) {
7036
+ _inheritsLoose(MonthDay, _TemporalAccessor);
6859
7037
 
6860
7038
  MonthDay.now = function now(zoneIdOrClock) {
6861
7039
  if (arguments.length === 0) {
@@ -6944,7 +7122,7 @@ var MonthDay = function (_Temporal) {
6944
7122
  function MonthDay(month, dayOfMonth) {
6945
7123
  var _this;
6946
7124
 
6947
- _this = _Temporal.call(this) || this;
7125
+ _this = _TemporalAccessor.call(this) || this;
6948
7126
  _this._month = MathUtil.safeToInt(month);
6949
7127
  _this._day = MathUtil.safeToInt(dayOfMonth);
6950
7128
  return _this;
@@ -6979,7 +7157,7 @@ var MonthDay = function (_Temporal) {
6979
7157
  return ValueRange.of(1, this.month().minLength(), this.month().maxLength());
6980
7158
  }
6981
7159
 
6982
- return _Temporal.prototype.range.call(this, field);
7160
+ return _TemporalAccessor.prototype.range.call(this, field);
6983
7161
  };
6984
7162
 
6985
7163
  _proto.get = function get(field) {
@@ -7039,7 +7217,7 @@ var MonthDay = function (_Temporal) {
7039
7217
  return IsoChronology.INSTANCE;
7040
7218
  }
7041
7219
 
7042
- return _Temporal.prototype.query.call(this, _query);
7220
+ return _TemporalAccessor.prototype.query.call(this, _query);
7043
7221
  };
7044
7222
 
7045
7223
  _proto.adjustInto = function adjustInto(temporal) {
@@ -7104,7 +7282,7 @@ var MonthDay = function (_Temporal) {
7104
7282
  };
7105
7283
 
7106
7284
  return MonthDay;
7107
- }(Temporal);
7285
+ }(TemporalAccessor);
7108
7286
  var PARSER;
7109
7287
  function _init$b() {
7110
7288
  PARSER = new DateTimeFormatterBuilder().appendLiteral('--').appendValue(ChronoField.MONTH_OF_YEAR, 2).appendLiteral('-').appendValue(ChronoField.DAY_OF_MONTH, 2).toFormatter();
@@ -7301,25 +7479,12 @@ var YearMonth = function (_Temporal) {
7301
7479
  return this.isLeapYear() ? 366 : 365;
7302
7480
  };
7303
7481
 
7304
- _proto.with = function _with(adjusterOrFieldOrNumber, value) {
7482
+ _proto.with = function _with(adjusterOrField, value) {
7305
7483
  if (arguments.length === 1) {
7306
- return this.withAdjuster(adjusterOrFieldOrNumber);
7307
- } else if (arguments.length === 2 && adjusterOrFieldOrNumber instanceof TemporalField) {
7308
- return this.withFieldValue(adjusterOrFieldOrNumber, value);
7484
+ return this.withAdjuster(adjusterOrField);
7309
7485
  } else {
7310
- return this.withYearMonth(adjusterOrFieldOrNumber, value);
7311
- }
7312
- };
7313
-
7314
- _proto.withYearMonth = function withYearMonth(newYear, newMonth) {
7315
- requireNonNull(newYear);
7316
- requireNonNull(newMonth);
7317
-
7318
- if (this._year === newYear && this._month === newMonth) {
7319
- return this;
7486
+ return this.withFieldValue(adjusterOrField, value);
7320
7487
  }
7321
-
7322
- return new YearMonth(newYear, newMonth);
7323
7488
  };
7324
7489
 
7325
7490
  _proto.withAdjuster = function withAdjuster(adjuster) {
@@ -7360,20 +7525,12 @@ var YearMonth = function (_Temporal) {
7360
7525
 
7361
7526
  _proto.withYear = function withYear(year) {
7362
7527
  ChronoField.YEAR.checkValidValue(year);
7363
- return this.withYearMonth(year, this._month);
7528
+ return new YearMonth(year, this._month);
7364
7529
  };
7365
7530
 
7366
7531
  _proto.withMonth = function withMonth(month) {
7367
7532
  ChronoField.MONTH_OF_YEAR.checkValidValue(month);
7368
- return this.withYearMonth(this._year, month);
7369
- };
7370
-
7371
- _proto.plus = function plus(amountOrNumber, unit) {
7372
- if (arguments.length === 1) {
7373
- return this.plusAmount(amountOrNumber);
7374
- } else {
7375
- return this.plusAmountUnit(amountOrNumber, unit);
7376
- }
7533
+ return new YearMonth(this._year, month);
7377
7534
  };
7378
7535
 
7379
7536
  _proto.plusAmount = function plusAmount(amount) {
@@ -7419,7 +7576,7 @@ var YearMonth = function (_Temporal) {
7419
7576
  }
7420
7577
 
7421
7578
  var newYear = ChronoField.YEAR.checkValidIntValue(this._year + yearsToAdd);
7422
- return this.withYearMonth(newYear, this._month);
7579
+ return this.withYear(newYear);
7423
7580
  };
7424
7581
 
7425
7582
  _proto.plusMonths = function plusMonths(monthsToAdd) {
@@ -7431,15 +7588,7 @@ var YearMonth = function (_Temporal) {
7431
7588
  var calcMonths = monthCount + monthsToAdd;
7432
7589
  var newYear = ChronoField.YEAR.checkValidIntValue(MathUtil.floorDiv(calcMonths, 12));
7433
7590
  var newMonth = MathUtil.floorMod(calcMonths, 12) + 1;
7434
- return this.withYearMonth(newYear, newMonth);
7435
- };
7436
-
7437
- _proto.minus = function minus(amountOrNumber, unit) {
7438
- if (arguments.length === 1) {
7439
- return this.minusAmount(amountOrNumber);
7440
- } else {
7441
- return this.minusAmountUnit(amountOrNumber, unit);
7442
- }
7591
+ return new YearMonth(newYear, newMonth);
7443
7592
  };
7444
7593
 
7445
7594
  _proto.minusAmount = function minusAmount(amount) {
@@ -7740,14 +7889,6 @@ var Year = function (_Temporal) {
7740
7889
  return Year.isLeap(this._year);
7741
7890
  };
7742
7891
 
7743
- _proto.with = function _with(adjusterOrFieldOrNumber, value) {
7744
- if (arguments.length === 2 && adjusterOrFieldOrNumber instanceof TemporalField) {
7745
- return this.withFieldValue(adjusterOrFieldOrNumber, value);
7746
- } else {
7747
- return this.withAdjuster(adjusterOrFieldOrNumber);
7748
- }
7749
- };
7750
-
7751
7892
  _proto.withAdjuster = function withAdjuster(adjuster) {
7752
7893
  requireNonNull(adjuster, 'adjuster');
7753
7894
  return adjuster.adjustInto(this);
@@ -7777,21 +7918,13 @@ var Year = function (_Temporal) {
7777
7918
  return field.adjustInto(this, newValue);
7778
7919
  };
7779
7920
 
7780
- _proto.plus = function plus(amountOrNumber, unit) {
7781
- if (arguments.length === 1) {
7782
- return this.plusAmount(amountOrNumber);
7783
- } else {
7784
- return this.plusAmountToAddUnit(amountOrNumber, unit);
7785
- }
7786
- };
7787
-
7788
7921
  _proto.plusAmount = function plusAmount(amount) {
7789
7922
  requireNonNull(amount, 'amount');
7790
7923
  requireInstance(amount, TemporalAmount, 'amount');
7791
7924
  return amount.addTo(this);
7792
7925
  };
7793
7926
 
7794
- _proto.plusAmountToAddUnit = function plusAmountToAddUnit(amountToAdd, unit) {
7927
+ _proto.plusAmountUnit = function plusAmountUnit(amountToAdd, unit) {
7795
7928
  requireNonNull(amountToAdd, 'amountToAdd');
7796
7929
  requireNonNull(unit, 'unit');
7797
7930
  requireInstance(unit, TemporalUnit, 'unit');
@@ -7828,21 +7961,13 @@ var Year = function (_Temporal) {
7828
7961
  return Year.of(ChronoField.YEAR.checkValidIntValue(MathUtil.safeAdd(this._year, yearsToAdd)));
7829
7962
  };
7830
7963
 
7831
- _proto.minus = function minus(amountOrNumber, unit) {
7832
- if (arguments.length === 1) {
7833
- return this.minusAmount(amountOrNumber);
7834
- } else {
7835
- return this.minusAmountToSubtractUnit(amountOrNumber, unit);
7836
- }
7837
- };
7838
-
7839
7964
  _proto.minusAmount = function minusAmount(amount) {
7840
7965
  requireNonNull(amount, 'amount');
7841
7966
  requireInstance(amount, TemporalAmount, 'amount');
7842
7967
  return amount.subtractFrom(this);
7843
7968
  };
7844
7969
 
7845
- _proto.minusAmountToSubtractUnit = function minusAmountToSubtractUnit(amountToSubtract, unit) {
7970
+ _proto.minusAmountUnit = function minusAmountUnit(amountToSubtract, unit) {
7846
7971
  requireNonNull(amountToSubtract, 'amountToSubtract');
7847
7972
  requireNonNull(unit, 'unit');
7848
7973
  requireInstance(unit, TemporalUnit, 'unit');
@@ -7954,6 +8079,35 @@ var Year = function (_Temporal) {
7954
8079
  return this.toString();
7955
8080
  };
7956
8081
 
8082
+ _proto.until = function until(endExclusive, unit) {
8083
+ var end = Year.from(endExclusive);
8084
+
8085
+ if (unit instanceof ChronoUnit) {
8086
+ var yearsUntil = end.value() - this.value();
8087
+
8088
+ switch (unit) {
8089
+ case ChronoUnit.YEARS:
8090
+ return yearsUntil;
8091
+
8092
+ case ChronoUnit.DECADES:
8093
+ return MathUtil.intDiv(yearsUntil, 10);
8094
+
8095
+ case ChronoUnit.CENTURIES:
8096
+ return MathUtil.intDiv(yearsUntil, 100);
8097
+
8098
+ case ChronoUnit.MILLENNIA:
8099
+ return MathUtil.intDiv(yearsUntil, 1000);
8100
+
8101
+ case ChronoUnit.ERAS:
8102
+ return end.getLong(ChronoField.ERA) - this.getLong(ChronoField.ERA);
8103
+ }
8104
+
8105
+ throw new UnsupportedTemporalTypeException('Unsupported unit: ' + unit);
8106
+ }
8107
+
8108
+ return unit.between(this, end);
8109
+ };
8110
+
7957
8111
  return Year;
7958
8112
  }(Temporal);
7959
8113
  var PARSER$2;
@@ -7966,25 +8120,8 @@ function _init$d() {
7966
8120
  });
7967
8121
  }
7968
8122
 
7969
- /*
7970
- * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
7971
- * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
7972
- * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
7973
- */
7974
- var TemporalAdjuster = function () {
7975
- function TemporalAdjuster() {}
7976
-
7977
- var _proto = TemporalAdjuster.prototype;
7978
-
7979
- _proto.adjustInto = function adjustInto(temporal) {
7980
- abstractMethodFail('adjustInto');
7981
- };
7982
-
7983
- return TemporalAdjuster;
7984
- }();
7985
-
7986
- var TemporalAdjusters = function () {
7987
- function TemporalAdjusters() {}
8123
+ var TemporalAdjusters = function () {
8124
+ function TemporalAdjusters() {}
7988
8125
 
7989
8126
  TemporalAdjusters.firstDayOfMonth = function firstDayOfMonth() {
7990
8127
  return Impl.FIRST_DAY_OF_MONTH;
@@ -8338,341 +8475,1298 @@ function _init$e() {
8338
8475
  IsoChronology.INSTANCE = new IsoChronology('IsoChronology');
8339
8476
  }
8340
8477
 
8341
- var ChronoZonedDateTime = function (_Temporal) {
8342
- _inheritsLoose(ChronoZonedDateTime, _Temporal);
8478
+ var OffsetTime = function (_DefaultInterfaceTemp) {
8479
+ _inheritsLoose(OffsetTime, _DefaultInterfaceTemp);
8343
8480
 
8344
- function ChronoZonedDateTime() {
8345
- return _Temporal.apply(this, arguments) || this;
8346
- }
8481
+ OffsetTime.from = function from(temporal) {
8482
+ requireNonNull(temporal, 'temporal');
8347
8483
 
8348
- var _proto = ChronoZonedDateTime.prototype;
8484
+ if (temporal instanceof OffsetTime) {
8485
+ return temporal;
8486
+ } else if (temporal instanceof OffsetDateTime) {
8487
+ return temporal.toOffsetTime();
8488
+ }
8349
8489
 
8350
- _proto.query = function query(_query) {
8351
- if (_query === TemporalQueries.zoneId() || _query === TemporalQueries.zone()) {
8352
- return this.zone();
8353
- } else if (_query === TemporalQueries.chronology()) {
8354
- return this.toLocalDate().chronology();
8355
- } else if (_query === TemporalQueries.precision()) {
8356
- return ChronoUnit.NANOS;
8357
- } else if (_query === TemporalQueries.offset()) {
8358
- return this.offset();
8359
- } else if (_query === TemporalQueries.localDate()) {
8360
- return LocalDate.ofEpochDay(this.toLocalDate().toEpochDay());
8361
- } else if (_query === TemporalQueries.localTime()) {
8362
- return this.toLocalTime();
8490
+ try {
8491
+ var time = LocalTime.from(temporal);
8492
+ var offset = ZoneOffset.from(temporal);
8493
+ return new OffsetTime(time, offset);
8494
+ } catch (ex) {
8495
+ throw new DateTimeException("Unable to obtain OffsetTime TemporalAccessor: " + temporal + ", type " + (temporal.constructor != null ? temporal.constructor.name : ''));
8363
8496
  }
8497
+ };
8364
8498
 
8365
- return _Temporal.prototype.query.call(this, _query);
8499
+ OffsetTime.now = function now(clockOrZone) {
8500
+ if (arguments.length === 0) {
8501
+ return OffsetTime._now(Clock.systemDefaultZone());
8502
+ } else if (clockOrZone instanceof Clock) {
8503
+ return OffsetTime._now(clockOrZone);
8504
+ } else {
8505
+ return OffsetTime._now(Clock.system(clockOrZone));
8506
+ }
8366
8507
  };
8367
8508
 
8368
- _proto.format = function format(formatter) {
8369
- requireNonNull(formatter, 'formatter');
8370
- return formatter.format(this);
8509
+ OffsetTime._now = function _now(clock) {
8510
+ requireNonNull(clock, 'clock');
8511
+ var now = clock.instant();
8512
+ return OffsetTime.ofInstant(now, clock.zone().rules().offset(now));
8371
8513
  };
8372
8514
 
8373
- _proto.toInstant = function toInstant() {
8374
- return Instant.ofEpochSecond(this.toEpochSecond(), this.toLocalTime().nano());
8515
+ OffsetTime.of = function of() {
8516
+ if (arguments.length <= 2) {
8517
+ return OffsetTime.ofTimeAndOffset.apply(this, arguments);
8518
+ } else {
8519
+ return OffsetTime.ofNumbers.apply(this, arguments);
8520
+ }
8375
8521
  };
8376
8522
 
8377
- _proto.toEpochSecond = function toEpochSecond() {
8378
- var epochDay = this.toLocalDate().toEpochDay();
8379
- var secs = epochDay * 86400 + this.toLocalTime().toSecondOfDay();
8380
- secs -= this.offset().totalSeconds();
8381
- return secs;
8523
+ OffsetTime.ofNumbers = function ofNumbers(hour, minute, second, nanoOfSecond, offset) {
8524
+ var time = LocalTime.of(hour, minute, second, nanoOfSecond);
8525
+ return new OffsetTime(time, offset);
8382
8526
  };
8383
8527
 
8384
- _proto.compareTo = function compareTo(other) {
8385
- requireNonNull(other, 'other');
8386
- var cmp = MathUtil.compareNumbers(this.toEpochSecond(), other.toEpochSecond());
8528
+ OffsetTime.ofTimeAndOffset = function ofTimeAndOffset(time, offset) {
8529
+ return new OffsetTime(time, offset);
8530
+ };
8387
8531
 
8388
- if (cmp === 0) {
8389
- cmp = this.toLocalTime().nano() - other.toLocalTime().nano();
8532
+ OffsetTime.ofInstant = function ofInstant(instant, zone) {
8533
+ requireNonNull(instant, 'instant');
8534
+ requireInstance(instant, Instant, 'instant');
8535
+ requireNonNull(zone, 'zone');
8536
+ requireInstance(zone, ZoneId, 'zone');
8537
+ var rules = zone.rules();
8538
+ var offset = rules.offset(instant);
8539
+ var secsOfDay = instant.epochSecond() % LocalTime.SECONDS_PER_DAY;
8540
+ secsOfDay = (secsOfDay + offset.totalSeconds()) % LocalTime.SECONDS_PER_DAY;
8390
8541
 
8391
- if (cmp === 0) {
8392
- cmp = this.toLocalDateTime().compareTo(other.toLocalDateTime());
8542
+ if (secsOfDay < 0) {
8543
+ secsOfDay += LocalTime.SECONDS_PER_DAY;
8544
+ }
8393
8545
 
8394
- if (cmp === 0) {
8395
- cmp = strcmp(this.zone().id(), other.zone().id());
8396
- }
8546
+ var time = LocalTime.ofSecondOfDay(secsOfDay, instant.nano());
8547
+ return new OffsetTime(time, offset);
8548
+ };
8549
+
8550
+ OffsetTime.parse = function parse(text, formatter) {
8551
+ if (formatter === void 0) {
8552
+ formatter = DateTimeFormatter.ISO_OFFSET_TIME;
8553
+ }
8554
+
8555
+ requireNonNull(formatter, 'formatter');
8556
+ return formatter.parse(text, OffsetTime.FROM);
8557
+ };
8558
+
8559
+ function OffsetTime(time, offset) {
8560
+ var _this;
8561
+
8562
+ _this = _DefaultInterfaceTemp.call(this) || this;
8563
+ requireNonNull(time, 'time');
8564
+ requireInstance(time, LocalTime, 'time');
8565
+ requireNonNull(offset, 'offset');
8566
+ requireInstance(offset, ZoneOffset, 'offset');
8567
+ _this._time = time;
8568
+ _this._offset = offset;
8569
+ return _this;
8570
+ }
8571
+
8572
+ var _proto = OffsetTime.prototype;
8573
+
8574
+ _proto.adjustInto = function adjustInto(temporal) {
8575
+ return temporal.with(ChronoField.NANO_OF_DAY, this._time.toNanoOfDay()).with(ChronoField.OFFSET_SECONDS, this.offset().totalSeconds());
8576
+ };
8577
+
8578
+ _proto.atDate = function atDate(date) {
8579
+ return OffsetDateTime.of(date, this._time, this._offset);
8580
+ };
8581
+
8582
+ _proto.format = function format(formatter) {
8583
+ requireNonNull(formatter, 'formatter');
8584
+ return formatter.format(this, OffsetTime.FROM);
8585
+ };
8586
+
8587
+ _proto.get = function get(field) {
8588
+ return _DefaultInterfaceTemp.prototype.get.call(this, field);
8589
+ };
8590
+
8591
+ _proto.getLong = function getLong(field) {
8592
+ if (field instanceof ChronoField) {
8593
+ if (field === ChronoField.OFFSET_SECONDS) {
8594
+ return this._offset.totalSeconds();
8397
8595
  }
8596
+
8597
+ return this._time.getLong(field);
8398
8598
  }
8399
8599
 
8400
- return cmp;
8600
+ return field.getFrom(this);
8601
+ };
8602
+
8603
+ _proto.hour = function hour() {
8604
+ return this._time.hour();
8605
+ };
8606
+
8607
+ _proto.minute = function minute() {
8608
+ return this._time.minute();
8609
+ };
8610
+
8611
+ _proto.second = function second() {
8612
+ return this._time.second();
8613
+ };
8614
+
8615
+ _proto.nano = function nano() {
8616
+ return this._time.nano();
8617
+ };
8618
+
8619
+ _proto.offset = function offset() {
8620
+ return this._offset;
8401
8621
  };
8402
8622
 
8403
8623
  _proto.isAfter = function isAfter(other) {
8404
8624
  requireNonNull(other, 'other');
8405
- var thisEpochSec = this.toEpochSecond();
8406
- var otherEpochSec = other.toEpochSecond();
8407
- return thisEpochSec > otherEpochSec || thisEpochSec === otherEpochSec && this.toLocalTime().nano() > other.toLocalTime().nano();
8625
+ return this._toEpochNano() > other._toEpochNano();
8408
8626
  };
8409
8627
 
8410
8628
  _proto.isBefore = function isBefore(other) {
8411
8629
  requireNonNull(other, 'other');
8412
- var thisEpochSec = this.toEpochSecond();
8413
- var otherEpochSec = other.toEpochSecond();
8414
- return thisEpochSec < otherEpochSec || thisEpochSec === otherEpochSec && this.toLocalTime().nano() < other.toLocalTime().nano();
8630
+ return this._toEpochNano() < other._toEpochNano();
8415
8631
  };
8416
8632
 
8417
8633
  _proto.isEqual = function isEqual(other) {
8418
8634
  requireNonNull(other, 'other');
8419
- return this.toEpochSecond() === other.toEpochSecond() && this.toLocalTime().nano() === other.toLocalTime().nano();
8635
+ return this._toEpochNano() === other._toEpochNano();
8420
8636
  };
8421
8637
 
8422
- _proto.equals = function equals(other) {
8423
- if (this === other) {
8424
- return true;
8638
+ _proto.isSupported = function isSupported(fieldOrUnit) {
8639
+ if (fieldOrUnit instanceof ChronoField) {
8640
+ return fieldOrUnit.isTimeBased() || fieldOrUnit === ChronoField.OFFSET_SECONDS;
8641
+ } else if (fieldOrUnit instanceof ChronoUnit) {
8642
+ return fieldOrUnit.isTimeBased();
8425
8643
  }
8426
8644
 
8427
- if (other instanceof ChronoZonedDateTime) {
8428
- return this.compareTo(other) === 0;
8429
- }
8645
+ return fieldOrUnit != null && fieldOrUnit.isSupportedBy(this);
8646
+ };
8430
8647
 
8431
- return false;
8648
+ _proto.minusHours = function minusHours(hours) {
8649
+ return this._withLocalTimeOffset(this._time.minusHours(hours), this._offset);
8432
8650
  };
8433
8651
 
8434
- return ChronoZonedDateTime;
8435
- }(Temporal);
8652
+ _proto.minusMinutes = function minusMinutes(minutes) {
8653
+ return this._withLocalTimeOffset(this._time.minusMinutes(minutes), this._offset);
8654
+ };
8436
8655
 
8437
- function strcmp(a, b) {
8438
- if (a < b) {
8439
- return -1;
8440
- }
8656
+ _proto.minusSeconds = function minusSeconds(seconds) {
8657
+ return this._withLocalTimeOffset(this._time.minusSeconds(seconds), this._offset);
8658
+ };
8441
8659
 
8442
- if (a > b) {
8443
- return 1;
8444
- }
8660
+ _proto.minusNanos = function minusNanos(nanos) {
8661
+ return this._withLocalTimeOffset(this._time.minusNanos(nanos), this._offset);
8662
+ };
8445
8663
 
8446
- return 0;
8447
- }
8664
+ _proto.minusAmount = function minusAmount(amount) {
8665
+ requireNonNull(amount);
8666
+ return amount.subtractFrom(this);
8667
+ };
8448
8668
 
8449
- var ZonedDateTime = function (_ChronoZonedDateTime) {
8450
- _inheritsLoose(ZonedDateTime, _ChronoZonedDateTime);
8669
+ _proto.minusAmountUnit = function minusAmountUnit(amountToSubtract, unit) {
8670
+ return this.plus(-1 * amountToSubtract, unit);
8671
+ };
8451
8672
 
8452
- ZonedDateTime.now = function now(clockOrZone) {
8453
- var clock;
8673
+ _proto.plusAmount = function plusAmount(amount) {
8674
+ requireNonNull(amount);
8675
+ return amount.addTo(this);
8676
+ };
8454
8677
 
8455
- if (clockOrZone instanceof ZoneId) {
8456
- clock = Clock.system(clockOrZone);
8457
- } else {
8458
- clock = clockOrZone == null ? Clock.systemDefaultZone() : clockOrZone;
8678
+ _proto.plusAmountUnit = function plusAmountUnit(amountToAdd, unit) {
8679
+ if (unit instanceof ChronoUnit) {
8680
+ return this._withLocalTimeOffset(this._time.plus(amountToAdd, unit), this._offset);
8459
8681
  }
8460
8682
 
8461
- return ZonedDateTime.ofInstant(clock.instant(), clock.zone());
8683
+ return unit.addTo(this, amountToAdd);
8462
8684
  };
8463
8685
 
8464
- ZonedDateTime.of = function of() {
8465
- if (arguments.length <= 2) {
8466
- return ZonedDateTime.of2.apply(this, arguments);
8467
- } else if (arguments.length === 3 && arguments[0] instanceof LocalDate) {
8468
- return ZonedDateTime.of3.apply(this, arguments);
8469
- } else {
8470
- return ZonedDateTime.of8.apply(this, arguments);
8471
- }
8686
+ _proto.plusHours = function plusHours(hours) {
8687
+ return this._withLocalTimeOffset(this._time.plusHours(hours), this._offset);
8472
8688
  };
8473
8689
 
8474
- ZonedDateTime.of3 = function of3(date, time, zone) {
8475
- return ZonedDateTime.of2(LocalDateTime.of(date, time), zone);
8690
+ _proto.plusMinutes = function plusMinutes(minutes) {
8691
+ return this._withLocalTimeOffset(this._time.plusMinutes(minutes), this._offset);
8476
8692
  };
8477
8693
 
8478
- ZonedDateTime.of2 = function of2(localDateTime, zone) {
8479
- return ZonedDateTime.ofLocal(localDateTime, zone, null);
8694
+ _proto.plusSeconds = function plusSeconds(seconds) {
8695
+ return this._withLocalTimeOffset(this._time.plusSeconds(seconds), this._offset);
8480
8696
  };
8481
8697
 
8482
- ZonedDateTime.of8 = function of8(year, month, dayOfMonth, hour, minute, second, nanoOfSecond, zone) {
8483
- var dt = LocalDateTime.of(year, month, dayOfMonth, hour, minute, second, nanoOfSecond);
8484
- return ZonedDateTime.ofLocal(dt, zone, null);
8698
+ _proto.plusNanos = function plusNanos(nanos) {
8699
+ return this._withLocalTimeOffset(this._time.plusNanos(nanos), this._offset);
8485
8700
  };
8486
8701
 
8487
- ZonedDateTime.ofLocal = function ofLocal(localDateTime, zone, preferredOffset) {
8488
- requireNonNull(localDateTime, 'localDateTime');
8489
- requireNonNull(zone, 'zone');
8702
+ _proto.query = function query(_query) {
8703
+ requireNonNull(_query, 'query');
8490
8704
 
8491
- if (zone instanceof ZoneOffset) {
8492
- return new ZonedDateTime(localDateTime, zone, zone);
8705
+ if (_query === TemporalQueries.precision()) {
8706
+ return ChronoUnit.NANOS;
8707
+ } else if (_query === TemporalQueries.offset() || _query === TemporalQueries.zone()) {
8708
+ return this.offset();
8709
+ } else if (_query === TemporalQueries.localTime()) {
8710
+ return this._time;
8711
+ } else if (_query === TemporalQueries.chronology() || _query === TemporalQueries.localDate() || _query === TemporalQueries.zoneId()) {
8712
+ return null;
8493
8713
  }
8494
8714
 
8495
- var offset = null;
8496
- var rules = zone.rules();
8497
- var validOffsets = rules.validOffsets(localDateTime);
8715
+ return _DefaultInterfaceTemp.prototype.query.call(this, _query);
8716
+ };
8498
8717
 
8499
- if (validOffsets.length === 1) {
8500
- offset = validOffsets[0];
8501
- } else if (validOffsets.length === 0) {
8502
- var trans = rules.transition(localDateTime);
8503
- localDateTime = localDateTime.plusSeconds(trans.duration().seconds());
8504
- offset = trans.offsetAfter();
8505
- } else {
8506
- if (preferredOffset != null && validOffsets.some(function (validOffset) {
8507
- return validOffset.equals(preferredOffset);
8508
- })) {
8509
- offset = preferredOffset;
8510
- } else {
8511
- offset = requireNonNull(validOffsets[0], 'offset');
8718
+ _proto.range = function range(field) {
8719
+ if (field instanceof ChronoField) {
8720
+ if (field === ChronoField.OFFSET_SECONDS) {
8721
+ return field.range();
8512
8722
  }
8723
+
8724
+ return this._time.range(field);
8513
8725
  }
8514
8726
 
8515
- return new ZonedDateTime(localDateTime, offset, zone);
8727
+ return field.rangeRefinedBy(this);
8516
8728
  };
8517
8729
 
8518
- ZonedDateTime.ofInstant = function ofInstant() {
8519
- if (arguments.length === 2) {
8520
- return ZonedDateTime.ofInstant2.apply(this, arguments);
8521
- } else {
8522
- return ZonedDateTime.ofInstant3.apply(this, arguments);
8523
- }
8730
+ _proto.toLocalTime = function toLocalTime() {
8731
+ return this._time;
8524
8732
  };
8525
8733
 
8526
- ZonedDateTime.ofInstant2 = function ofInstant2(instant, zone) {
8527
- requireNonNull(instant, 'instant');
8528
- requireNonNull(zone, 'zone');
8529
- return ZonedDateTime._create(instant.epochSecond(), instant.nano(), zone);
8734
+ _proto.truncatedTo = function truncatedTo(unit) {
8735
+ return this._withLocalTimeOffset(this._time.truncatedTo(unit), this._offset);
8530
8736
  };
8531
8737
 
8532
- ZonedDateTime.ofInstant3 = function ofInstant3(localDateTime, offset, zone) {
8533
- requireNonNull(localDateTime, 'localDateTime');
8738
+ _proto.until = function until(endExclusive, unit) {
8739
+ requireNonNull(endExclusive, 'endExclusive');
8740
+ requireNonNull(unit, 'unit');
8741
+ var end = OffsetTime.from(endExclusive);
8742
+
8743
+ if (unit instanceof ChronoUnit) {
8744
+ var nanosUntil = end._toEpochNano() - this._toEpochNano();
8745
+
8746
+ switch (unit) {
8747
+ case ChronoUnit.NANOS:
8748
+ return nanosUntil;
8749
+
8750
+ case ChronoUnit.MICROS:
8751
+ return Math.floor(nanosUntil / 1000);
8752
+
8753
+ case ChronoUnit.MILLIS:
8754
+ return Math.floor(nanosUntil / 1000000);
8755
+
8756
+ case ChronoUnit.SECONDS:
8757
+ return Math.floor(nanosUntil / LocalTime.NANOS_PER_SECOND);
8758
+
8759
+ case ChronoUnit.MINUTES:
8760
+ return Math.floor(nanosUntil / LocalTime.NANOS_PER_MINUTE);
8761
+
8762
+ case ChronoUnit.HOURS:
8763
+ return Math.floor(nanosUntil / LocalTime.NANOS_PER_HOUR);
8764
+
8765
+ case ChronoUnit.HALF_DAYS:
8766
+ return Math.floor(nanosUntil / (12 * LocalTime.NANOS_PER_HOUR));
8767
+ }
8768
+
8769
+ throw new UnsupportedTemporalTypeException('Unsupported unit: ' + unit);
8770
+ }
8771
+
8772
+ return unit.between(this, end);
8773
+ };
8774
+
8775
+ _proto.withHour = function withHour(hour) {
8776
+ return this._withLocalTimeOffset(this._time.withHour(hour), this._offset);
8777
+ };
8778
+
8779
+ _proto.withMinute = function withMinute(minute) {
8780
+ return this._withLocalTimeOffset(this._time.withMinute(minute), this._offset);
8781
+ };
8782
+
8783
+ _proto.withSecond = function withSecond(second) {
8784
+ return this._withLocalTimeOffset(this._time.withSecond(second), this._offset);
8785
+ };
8786
+
8787
+ _proto.withNano = function withNano(nano) {
8788
+ return this._withLocalTimeOffset(this._time.withNano(nano), this._offset);
8789
+ };
8790
+
8791
+ _proto.withOffsetSameInstant = function withOffsetSameInstant(offset) {
8534
8792
  requireNonNull(offset, 'offset');
8535
- requireNonNull(zone, 'zone');
8536
- return ZonedDateTime._create(localDateTime.toEpochSecond(offset), localDateTime.nano(), zone);
8793
+
8794
+ if (offset.equals(this._offset)) {
8795
+ return this;
8796
+ }
8797
+
8798
+ var difference = offset.totalSeconds() - this._offset.totalSeconds();
8799
+
8800
+ var adjusted = this._time.plusSeconds(difference);
8801
+
8802
+ return new OffsetTime(adjusted, offset);
8537
8803
  };
8538
8804
 
8539
- ZonedDateTime._create = function _create(epochSecond, nanoOfSecond, zone) {
8540
- var rules = zone.rules();
8541
- var instant = Instant.ofEpochSecond(epochSecond, nanoOfSecond);
8542
- var offset = rules.offset(instant);
8543
- var ldt = LocalDateTime.ofEpochSecond(epochSecond, nanoOfSecond, offset);
8544
- return new ZonedDateTime(ldt, offset, zone);
8805
+ _proto.withOffsetSameLocal = function withOffsetSameLocal(offset) {
8806
+ return offset != null && offset.equals(this._offset) ? this : new OffsetTime(this._time, offset);
8807
+ };
8808
+
8809
+ _proto._toEpochNano = function _toEpochNano() {
8810
+ var nod = this._time.toNanoOfDay();
8811
+
8812
+ var offsetNanos = this._offset.totalSeconds() * LocalTime.NANOS_PER_SECOND;
8813
+ return nod - offsetNanos;
8814
+ };
8815
+
8816
+ _proto.withAdjuster = function withAdjuster(adjuster) {
8817
+ requireNonNull(adjuster, 'adjuster');
8818
+
8819
+ if (adjuster instanceof LocalTime) {
8820
+ return this._withLocalTimeOffset(adjuster, this._offset);
8821
+ } else if (adjuster instanceof ZoneOffset) {
8822
+ return this._withLocalTimeOffset(this._time, adjuster);
8823
+ } else if (adjuster instanceof OffsetTime) {
8824
+ return adjuster;
8825
+ }
8826
+
8827
+ return adjuster.adjustInto(this);
8828
+ };
8829
+
8830
+ _proto.withFieldValue = function withFieldValue(field, newValue) {
8831
+ requireNonNull(field, 'field');
8832
+
8833
+ if (field instanceof ChronoField) {
8834
+ if (field === ChronoField.OFFSET_SECONDS) {
8835
+ return this._withLocalTimeOffset(this._time, ZoneOffset.ofTotalSeconds(field.checkValidIntValue(newValue)));
8836
+ }
8837
+
8838
+ return this._withLocalTimeOffset(this._time.with(field, newValue), this._offset);
8839
+ }
8840
+
8841
+ return field.adjustInto(this, newValue);
8842
+ };
8843
+
8844
+ _proto._withLocalTimeOffset = function _withLocalTimeOffset(time, offset) {
8845
+ if (this._time === time && this._offset.equals(offset)) {
8846
+ return this;
8847
+ }
8848
+
8849
+ return new OffsetTime(time, offset);
8850
+ };
8851
+
8852
+ _proto.compareTo = function compareTo(other) {
8853
+ requireNonNull(other, 'other');
8854
+ requireInstance(other, OffsetTime, 'other');
8855
+
8856
+ if (this._offset.equals(other._offset)) {
8857
+ return this._time.compareTo(other._time);
8858
+ }
8859
+
8860
+ var compare = MathUtil.compareNumbers(this._toEpochNano(), other._toEpochNano());
8861
+
8862
+ if (compare === 0) {
8863
+ return this._time.compareTo(other._time);
8864
+ }
8865
+
8866
+ return compare;
8867
+ };
8868
+
8869
+ _proto.equals = function equals(other) {
8870
+ if (this === other) {
8871
+ return true;
8872
+ }
8873
+
8874
+ if (other instanceof OffsetTime) {
8875
+ return this._time.equals(other._time) && this._offset.equals(other._offset);
8876
+ }
8877
+
8878
+ return false;
8879
+ };
8880
+
8881
+ _proto.hashCode = function hashCode() {
8882
+ return this._time.hashCode() ^ this._offset.hashCode();
8883
+ };
8884
+
8885
+ _proto.toString = function toString() {
8886
+ return this._time.toString() + this._offset.toString();
8887
+ };
8888
+
8889
+ _proto.toJSON = function toJSON() {
8890
+ return this.toString();
8891
+ };
8892
+
8893
+ return OffsetTime;
8894
+ }(DefaultInterfaceTemporal);
8895
+ function _init$f() {
8896
+ OffsetTime.MIN = OffsetTime.ofNumbers(0, 0, 0, 0, ZoneOffset.MAX);
8897
+ OffsetTime.MAX = OffsetTime.ofNumbers(23, 59, 59, 999999999, ZoneOffset.MIN);
8898
+ OffsetTime.FROM = createTemporalQuery('OffsetTime.FROM', function (temporal) {
8899
+ return OffsetTime.from(temporal);
8900
+ });
8901
+ }
8902
+
8903
+ var ChronoZonedDateTime = function (_DefaultInterfaceTemp) {
8904
+ _inheritsLoose(ChronoZonedDateTime, _DefaultInterfaceTemp);
8905
+
8906
+ function ChronoZonedDateTime() {
8907
+ return _DefaultInterfaceTemp.apply(this, arguments) || this;
8908
+ }
8909
+
8910
+ var _proto = ChronoZonedDateTime.prototype;
8911
+
8912
+ _proto.query = function query(_query) {
8913
+ if (_query === TemporalQueries.zoneId() || _query === TemporalQueries.zone()) {
8914
+ return this.zone();
8915
+ } else if (_query === TemporalQueries.chronology()) {
8916
+ return this.toLocalDate().chronology();
8917
+ } else if (_query === TemporalQueries.precision()) {
8918
+ return ChronoUnit.NANOS;
8919
+ } else if (_query === TemporalQueries.offset()) {
8920
+ return this.offset();
8921
+ } else if (_query === TemporalQueries.localDate()) {
8922
+ return LocalDate.ofEpochDay(this.toLocalDate().toEpochDay());
8923
+ } else if (_query === TemporalQueries.localTime()) {
8924
+ return this.toLocalTime();
8925
+ }
8926
+
8927
+ return _DefaultInterfaceTemp.prototype.query.call(this, _query);
8928
+ };
8929
+
8930
+ _proto.format = function format(formatter) {
8931
+ requireNonNull(formatter, 'formatter');
8932
+ return formatter.format(this);
8933
+ };
8934
+
8935
+ _proto.toInstant = function toInstant() {
8936
+ return Instant.ofEpochSecond(this.toEpochSecond(), this.toLocalTime().nano());
8937
+ };
8938
+
8939
+ _proto.toEpochSecond = function toEpochSecond() {
8940
+ var epochDay = this.toLocalDate().toEpochDay();
8941
+ var secs = epochDay * 86400 + this.toLocalTime().toSecondOfDay();
8942
+ secs -= this.offset().totalSeconds();
8943
+ return secs;
8944
+ };
8945
+
8946
+ _proto.compareTo = function compareTo(other) {
8947
+ requireNonNull(other, 'other');
8948
+ var cmp = MathUtil.compareNumbers(this.toEpochSecond(), other.toEpochSecond());
8949
+
8950
+ if (cmp === 0) {
8951
+ cmp = this.toLocalTime().nano() - other.toLocalTime().nano();
8952
+
8953
+ if (cmp === 0) {
8954
+ cmp = this.toLocalDateTime().compareTo(other.toLocalDateTime());
8955
+
8956
+ if (cmp === 0) {
8957
+ cmp = strcmp(this.zone().id(), other.zone().id());
8958
+ }
8959
+ }
8960
+ }
8961
+
8962
+ return cmp;
8963
+ };
8964
+
8965
+ _proto.isAfter = function isAfter(other) {
8966
+ requireNonNull(other, 'other');
8967
+ var thisEpochSec = this.toEpochSecond();
8968
+ var otherEpochSec = other.toEpochSecond();
8969
+ return thisEpochSec > otherEpochSec || thisEpochSec === otherEpochSec && this.toLocalTime().nano() > other.toLocalTime().nano();
8970
+ };
8971
+
8972
+ _proto.isBefore = function isBefore(other) {
8973
+ requireNonNull(other, 'other');
8974
+ var thisEpochSec = this.toEpochSecond();
8975
+ var otherEpochSec = other.toEpochSecond();
8976
+ return thisEpochSec < otherEpochSec || thisEpochSec === otherEpochSec && this.toLocalTime().nano() < other.toLocalTime().nano();
8977
+ };
8978
+
8979
+ _proto.isEqual = function isEqual(other) {
8980
+ requireNonNull(other, 'other');
8981
+ return this.toEpochSecond() === other.toEpochSecond() && this.toLocalTime().nano() === other.toLocalTime().nano();
8982
+ };
8983
+
8984
+ _proto.equals = function equals(other) {
8985
+ if (this === other) {
8986
+ return true;
8987
+ }
8988
+
8989
+ if (other instanceof ChronoZonedDateTime) {
8990
+ return this.compareTo(other) === 0;
8991
+ }
8992
+
8993
+ return false;
8994
+ };
8995
+
8996
+ return ChronoZonedDateTime;
8997
+ }(DefaultInterfaceTemporal);
8998
+
8999
+ function strcmp(a, b) {
9000
+ if (a < b) {
9001
+ return -1;
9002
+ }
9003
+
9004
+ if (a > b) {
9005
+ return 1;
9006
+ }
9007
+
9008
+ return 0;
9009
+ }
9010
+
9011
+ var ZonedDateTime = function (_ChronoZonedDateTime) {
9012
+ _inheritsLoose(ZonedDateTime, _ChronoZonedDateTime);
9013
+
9014
+ ZonedDateTime.now = function now(clockOrZone) {
9015
+ var clock;
9016
+
9017
+ if (clockOrZone instanceof ZoneId) {
9018
+ clock = Clock.system(clockOrZone);
9019
+ } else {
9020
+ clock = clockOrZone == null ? Clock.systemDefaultZone() : clockOrZone;
9021
+ }
9022
+
9023
+ return ZonedDateTime.ofInstant(clock.instant(), clock.zone());
9024
+ };
9025
+
9026
+ ZonedDateTime.of = function of() {
9027
+ if (arguments.length <= 2) {
9028
+ return ZonedDateTime.of2.apply(this, arguments);
9029
+ } else if (arguments.length === 3 && arguments[0] instanceof LocalDate) {
9030
+ return ZonedDateTime.of3.apply(this, arguments);
9031
+ } else {
9032
+ return ZonedDateTime.of8.apply(this, arguments);
9033
+ }
9034
+ };
9035
+
9036
+ ZonedDateTime.of3 = function of3(date, time, zone) {
9037
+ return ZonedDateTime.of2(LocalDateTime.of(date, time), zone);
9038
+ };
9039
+
9040
+ ZonedDateTime.of2 = function of2(localDateTime, zone) {
9041
+ return ZonedDateTime.ofLocal(localDateTime, zone, null);
9042
+ };
9043
+
9044
+ ZonedDateTime.of8 = function of8(year, month, dayOfMonth, hour, minute, second, nanoOfSecond, zone) {
9045
+ var dt = LocalDateTime.of(year, month, dayOfMonth, hour, minute, second, nanoOfSecond);
9046
+ return ZonedDateTime.ofLocal(dt, zone, null);
9047
+ };
9048
+
9049
+ ZonedDateTime.ofLocal = function ofLocal(localDateTime, zone, preferredOffset) {
9050
+ requireNonNull(localDateTime, 'localDateTime');
9051
+ requireNonNull(zone, 'zone');
9052
+
9053
+ if (zone instanceof ZoneOffset) {
9054
+ return new ZonedDateTime(localDateTime, zone, zone);
9055
+ }
9056
+
9057
+ var offset = null;
9058
+ var rules = zone.rules();
9059
+ var validOffsets = rules.validOffsets(localDateTime);
9060
+
9061
+ if (validOffsets.length === 1) {
9062
+ offset = validOffsets[0];
9063
+ } else if (validOffsets.length === 0) {
9064
+ var trans = rules.transition(localDateTime);
9065
+ localDateTime = localDateTime.plusSeconds(trans.duration().seconds());
9066
+ offset = trans.offsetAfter();
9067
+ } else {
9068
+ if (preferredOffset != null && validOffsets.some(function (validOffset) {
9069
+ return validOffset.equals(preferredOffset);
9070
+ })) {
9071
+ offset = preferredOffset;
9072
+ } else {
9073
+ offset = requireNonNull(validOffsets[0], 'offset');
9074
+ }
9075
+ }
9076
+
9077
+ return new ZonedDateTime(localDateTime, offset, zone);
9078
+ };
9079
+
9080
+ ZonedDateTime.ofInstant = function ofInstant() {
9081
+ if (arguments.length === 2) {
9082
+ return ZonedDateTime.ofInstant2.apply(this, arguments);
9083
+ } else {
9084
+ return ZonedDateTime.ofInstant3.apply(this, arguments);
9085
+ }
9086
+ };
9087
+
9088
+ ZonedDateTime.ofInstant2 = function ofInstant2(instant, zone) {
9089
+ requireNonNull(instant, 'instant');
9090
+ requireNonNull(zone, 'zone');
9091
+ return ZonedDateTime._create(instant.epochSecond(), instant.nano(), zone);
9092
+ };
9093
+
9094
+ ZonedDateTime.ofInstant3 = function ofInstant3(localDateTime, offset, zone) {
9095
+ requireNonNull(localDateTime, 'localDateTime');
9096
+ requireNonNull(offset, 'offset');
9097
+ requireNonNull(zone, 'zone');
9098
+ return ZonedDateTime._create(localDateTime.toEpochSecond(offset), localDateTime.nano(), zone);
9099
+ };
9100
+
9101
+ ZonedDateTime._create = function _create(epochSecond, nanoOfSecond, zone) {
9102
+ var rules = zone.rules();
9103
+ var instant = Instant.ofEpochSecond(epochSecond, nanoOfSecond);
9104
+ var offset = rules.offset(instant);
9105
+ var ldt = LocalDateTime.ofEpochSecond(epochSecond, nanoOfSecond, offset);
9106
+ return new ZonedDateTime(ldt, offset, zone);
9107
+ };
9108
+
9109
+ ZonedDateTime.ofStrict = function ofStrict(localDateTime, offset, zone) {
9110
+ requireNonNull(localDateTime, 'localDateTime');
9111
+ requireNonNull(offset, 'offset');
9112
+ requireNonNull(zone, 'zone');
9113
+ var rules = zone.rules();
9114
+
9115
+ if (rules.isValidOffset(localDateTime, offset) === false) {
9116
+ var trans = rules.transition(localDateTime);
9117
+
9118
+ if (trans != null && trans.isGap()) {
9119
+ throw new DateTimeException('LocalDateTime ' + localDateTime + ' does not exist in zone ' + zone + ' due to a gap in the local time-line, typically caused by daylight savings');
9120
+ }
9121
+
9122
+ throw new DateTimeException('ZoneOffset "' + offset + '" is not valid for LocalDateTime "' + localDateTime + '" in zone "' + zone + '"');
9123
+ }
9124
+
9125
+ return new ZonedDateTime(localDateTime, offset, zone);
9126
+ };
9127
+
9128
+ ZonedDateTime.ofLenient = function ofLenient(localDateTime, offset, zone) {
9129
+ requireNonNull(localDateTime, 'localDateTime');
9130
+ requireNonNull(offset, 'offset');
9131
+ requireNonNull(zone, 'zone');
9132
+
9133
+ if (zone instanceof ZoneOffset && offset.equals(zone) === false) {
9134
+ throw new IllegalArgumentException('ZoneId must match ZoneOffset');
9135
+ }
9136
+
9137
+ return new ZonedDateTime(localDateTime, offset, zone);
9138
+ };
9139
+
9140
+ ZonedDateTime.from = function from(temporal) {
9141
+ requireNonNull(temporal, 'temporal');
9142
+
9143
+ if (temporal instanceof ZonedDateTime) {
9144
+ return temporal;
9145
+ }
9146
+
9147
+ var zone = ZoneId.from(temporal);
9148
+
9149
+ if (temporal.isSupported(ChronoField.INSTANT_SECONDS)) {
9150
+ var zdt = ZonedDateTime._from(temporal, zone);
9151
+
9152
+ if (zdt != null) return zdt;
9153
+ }
9154
+
9155
+ var ldt = LocalDateTime.from(temporal);
9156
+ return ZonedDateTime.of2(ldt, zone);
9157
+ };
9158
+
9159
+ ZonedDateTime._from = function _from(temporal, zone) {
9160
+ try {
9161
+ return ZonedDateTime.__from(temporal, zone);
9162
+ } catch (ex) {
9163
+ if (!(ex instanceof DateTimeException)) throw ex;
9164
+ }
9165
+ };
9166
+
9167
+ ZonedDateTime.__from = function __from(temporal, zone) {
9168
+ var epochSecond = temporal.getLong(ChronoField.INSTANT_SECONDS);
9169
+ var nanoOfSecond = temporal.get(ChronoField.NANO_OF_SECOND);
9170
+ return ZonedDateTime._create(epochSecond, nanoOfSecond, zone);
9171
+ };
9172
+
9173
+ ZonedDateTime.parse = function parse(text, formatter) {
9174
+ if (formatter === void 0) {
9175
+ formatter = DateTimeFormatter.ISO_ZONED_DATE_TIME;
9176
+ }
9177
+
9178
+ requireNonNull(formatter, 'formatter');
9179
+ return formatter.parse(text, ZonedDateTime.FROM);
9180
+ };
9181
+
9182
+ function ZonedDateTime(dateTime, offset, zone) {
9183
+ var _this;
9184
+
9185
+ requireNonNull(dateTime, 'dateTime');
9186
+ requireNonNull(offset, 'offset');
9187
+ requireNonNull(zone, 'zone');
9188
+ _this = _ChronoZonedDateTime.call(this) || this;
9189
+ _this._dateTime = dateTime;
9190
+ _this._offset = offset;
9191
+ _this._zone = zone;
9192
+ return _this;
9193
+ }
9194
+
9195
+ var _proto = ZonedDateTime.prototype;
9196
+
9197
+ _proto._resolveLocal = function _resolveLocal(newDateTime) {
9198
+ requireNonNull(newDateTime, 'newDateTime');
9199
+ return ZonedDateTime.ofLocal(newDateTime, this._zone, this._offset);
9200
+ };
9201
+
9202
+ _proto._resolveInstant = function _resolveInstant(newDateTime) {
9203
+ return ZonedDateTime.ofInstant3(newDateTime, this._offset, this._zone);
9204
+ };
9205
+
9206
+ _proto._resolveOffset = function _resolveOffset(offset) {
9207
+ if (offset.equals(this._offset) === false && this._zone.rules().isValidOffset(this._dateTime, offset)) {
9208
+ return new ZonedDateTime(this._dateTime, offset, this._zone);
9209
+ }
9210
+
9211
+ return this;
9212
+ };
9213
+
9214
+ _proto.isSupported = function isSupported(fieldOrUnit) {
9215
+ if (fieldOrUnit instanceof ChronoField) {
9216
+ return true;
9217
+ } else if (fieldOrUnit instanceof ChronoUnit) {
9218
+ return fieldOrUnit.isDateBased() || fieldOrUnit.isTimeBased();
9219
+ }
9220
+
9221
+ return fieldOrUnit != null && fieldOrUnit.isSupportedBy(this);
9222
+ };
9223
+
9224
+ _proto.range = function range(field) {
9225
+ if (field instanceof ChronoField) {
9226
+ if (field === ChronoField.INSTANT_SECONDS || field === ChronoField.OFFSET_SECONDS) {
9227
+ return field.range();
9228
+ }
9229
+
9230
+ return this._dateTime.range(field);
9231
+ }
9232
+
9233
+ return field.rangeRefinedBy(this);
9234
+ };
9235
+
9236
+ _proto.get = function get(field) {
9237
+ return this.getLong(field);
9238
+ };
9239
+
9240
+ _proto.getLong = function getLong(field) {
9241
+ if (field instanceof ChronoField) {
9242
+ switch (field) {
9243
+ case ChronoField.INSTANT_SECONDS:
9244
+ return this.toEpochSecond();
9245
+
9246
+ case ChronoField.OFFSET_SECONDS:
9247
+ return this._offset.totalSeconds();
9248
+ }
9249
+
9250
+ return this._dateTime.getLong(field);
9251
+ }
9252
+
9253
+ requireNonNull(field, 'field');
9254
+ return field.getFrom(this);
9255
+ };
9256
+
9257
+ _proto.offset = function offset() {
9258
+ return this._offset;
9259
+ };
9260
+
9261
+ _proto.withEarlierOffsetAtOverlap = function withEarlierOffsetAtOverlap() {
9262
+ var trans = this._zone.rules().transition(this._dateTime);
9263
+
9264
+ if (trans != null && trans.isOverlap()) {
9265
+ var earlierOffset = trans.offsetBefore();
9266
+
9267
+ if (earlierOffset.equals(this._offset) === false) {
9268
+ return new ZonedDateTime(this._dateTime, earlierOffset, this._zone);
9269
+ }
9270
+ }
9271
+
9272
+ return this;
9273
+ };
9274
+
9275
+ _proto.withLaterOffsetAtOverlap = function withLaterOffsetAtOverlap() {
9276
+ var trans = this._zone.rules().transition(this.toLocalDateTime());
9277
+
9278
+ if (trans != null) {
9279
+ var laterOffset = trans.offsetAfter();
9280
+
9281
+ if (laterOffset.equals(this._offset) === false) {
9282
+ return new ZonedDateTime(this._dateTime, laterOffset, this._zone);
9283
+ }
9284
+ }
9285
+
9286
+ return this;
9287
+ };
9288
+
9289
+ _proto.zone = function zone() {
9290
+ return this._zone;
9291
+ };
9292
+
9293
+ _proto.withZoneSameLocal = function withZoneSameLocal(zone) {
9294
+ requireNonNull(zone, 'zone');
9295
+ return this._zone.equals(zone) ? this : ZonedDateTime.ofLocal(this._dateTime, zone, this._offset);
9296
+ };
9297
+
9298
+ _proto.withZoneSameInstant = function withZoneSameInstant(zone) {
9299
+ requireNonNull(zone, 'zone');
9300
+ return this._zone.equals(zone) ? this : ZonedDateTime._create(this._dateTime.toEpochSecond(this._offset), this._dateTime.nano(), zone);
9301
+ };
9302
+
9303
+ _proto.withFixedOffsetZone = function withFixedOffsetZone() {
9304
+ return this._zone.equals(this._offset) ? this : new ZonedDateTime(this._dateTime, this._offset, this._offset);
9305
+ };
9306
+
9307
+ _proto.year = function year() {
9308
+ return this._dateTime.year();
9309
+ };
9310
+
9311
+ _proto.monthValue = function monthValue() {
9312
+ return this._dateTime.monthValue();
9313
+ };
9314
+
9315
+ _proto.month = function month() {
9316
+ return this._dateTime.month();
9317
+ };
9318
+
9319
+ _proto.dayOfMonth = function dayOfMonth() {
9320
+ return this._dateTime.dayOfMonth();
9321
+ };
9322
+
9323
+ _proto.dayOfYear = function dayOfYear() {
9324
+ return this._dateTime.dayOfYear();
9325
+ };
9326
+
9327
+ _proto.dayOfWeek = function dayOfWeek() {
9328
+ return this._dateTime.dayOfWeek();
9329
+ };
9330
+
9331
+ _proto.hour = function hour() {
9332
+ return this._dateTime.hour();
9333
+ };
9334
+
9335
+ _proto.minute = function minute() {
9336
+ return this._dateTime.minute();
9337
+ };
9338
+
9339
+ _proto.second = function second() {
9340
+ return this._dateTime.second();
9341
+ };
9342
+
9343
+ _proto.nano = function nano() {
9344
+ return this._dateTime.nano();
9345
+ };
9346
+
9347
+ _proto.withAdjuster = function withAdjuster(adjuster) {
9348
+ if (adjuster instanceof LocalDate) {
9349
+ return this._resolveLocal(LocalDateTime.of(adjuster, this._dateTime.toLocalTime()));
9350
+ } else if (adjuster instanceof LocalTime) {
9351
+ return this._resolveLocal(LocalDateTime.of(this._dateTime.toLocalDate(), adjuster));
9352
+ } else if (adjuster instanceof LocalDateTime) {
9353
+ return this._resolveLocal(adjuster);
9354
+ } else if (adjuster instanceof Instant) {
9355
+ var instant = adjuster;
9356
+ return ZonedDateTime._create(instant.epochSecond(), instant.nano(), this._zone);
9357
+ } else if (adjuster instanceof ZoneOffset) {
9358
+ return this._resolveOffset(adjuster);
9359
+ }
9360
+
9361
+ requireNonNull(adjuster, 'adjuster');
9362
+ return adjuster.adjustInto(this);
9363
+ };
9364
+
9365
+ _proto.withFieldValue = function withFieldValue(field, newValue) {
9366
+ if (field instanceof ChronoField) {
9367
+ switch (field) {
9368
+ case ChronoField.INSTANT_SECONDS:
9369
+ return ZonedDateTime._create(newValue, this.nano(), this._zone);
9370
+
9371
+ case ChronoField.OFFSET_SECONDS:
9372
+ {
9373
+ var offset = ZoneOffset.ofTotalSeconds(field.checkValidIntValue(newValue));
9374
+ return this._resolveOffset(offset);
9375
+ }
9376
+ }
9377
+
9378
+ return this._resolveLocal(this._dateTime.with(field, newValue));
9379
+ }
9380
+
9381
+ return field.adjustInto(this, newValue);
9382
+ };
9383
+
9384
+ _proto.withYear = function withYear(year) {
9385
+ return this._resolveLocal(this._dateTime.withYear(year));
9386
+ };
9387
+
9388
+ _proto.withMonth = function withMonth(month) {
9389
+ return this._resolveLocal(this._dateTime.withMonth(month));
9390
+ };
9391
+
9392
+ _proto.withDayOfMonth = function withDayOfMonth(dayOfMonth) {
9393
+ return this._resolveLocal(this._dateTime.withDayOfMonth(dayOfMonth));
9394
+ };
9395
+
9396
+ _proto.withDayOfYear = function withDayOfYear(dayOfYear) {
9397
+ return this._resolveLocal(this._dateTime.withDayOfYear(dayOfYear));
9398
+ };
9399
+
9400
+ _proto.withHour = function withHour(hour) {
9401
+ return this._resolveLocal(this._dateTime.withHour(hour));
9402
+ };
9403
+
9404
+ _proto.withMinute = function withMinute(minute) {
9405
+ return this._resolveLocal(this._dateTime.withMinute(minute));
9406
+ };
9407
+
9408
+ _proto.withSecond = function withSecond(second) {
9409
+ return this._resolveLocal(this._dateTime.withSecond(second));
9410
+ };
9411
+
9412
+ _proto.withNano = function withNano(nanoOfSecond) {
9413
+ return this._resolveLocal(this._dateTime.withNano(nanoOfSecond));
9414
+ };
9415
+
9416
+ _proto.truncatedTo = function truncatedTo(unit) {
9417
+ return this._resolveLocal(this._dateTime.truncatedTo(unit));
9418
+ };
9419
+
9420
+ _proto.plusAmount = function plusAmount(amount) {
9421
+ requireNonNull(amount);
9422
+ return amount.addTo(this);
9423
+ };
9424
+
9425
+ _proto.plusAmountUnit = function plusAmountUnit(amountToAdd, unit) {
9426
+ if (unit instanceof ChronoUnit) {
9427
+ if (unit.isDateBased()) {
9428
+ return this._resolveLocal(this._dateTime.plus(amountToAdd, unit));
9429
+ } else {
9430
+ return this._resolveInstant(this._dateTime.plus(amountToAdd, unit));
9431
+ }
9432
+ }
9433
+
9434
+ requireNonNull(unit, 'unit');
9435
+ return unit.addTo(this, amountToAdd);
9436
+ };
9437
+
9438
+ _proto.plusYears = function plusYears(years) {
9439
+ return this._resolveLocal(this._dateTime.plusYears(years));
9440
+ };
9441
+
9442
+ _proto.plusMonths = function plusMonths(months) {
9443
+ return this._resolveLocal(this._dateTime.plusMonths(months));
9444
+ };
9445
+
9446
+ _proto.plusWeeks = function plusWeeks(weeks) {
9447
+ return this._resolveLocal(this._dateTime.plusWeeks(weeks));
9448
+ };
9449
+
9450
+ _proto.plusDays = function plusDays(days) {
9451
+ return this._resolveLocal(this._dateTime.plusDays(days));
9452
+ };
9453
+
9454
+ _proto.plusHours = function plusHours(hours) {
9455
+ return this._resolveInstant(this._dateTime.plusHours(hours));
9456
+ };
9457
+
9458
+ _proto.plusMinutes = function plusMinutes(minutes) {
9459
+ return this._resolveInstant(this._dateTime.plusMinutes(minutes));
9460
+ };
9461
+
9462
+ _proto.plusSeconds = function plusSeconds(seconds) {
9463
+ return this._resolveInstant(this._dateTime.plusSeconds(seconds));
9464
+ };
9465
+
9466
+ _proto.plusNanos = function plusNanos(nanos) {
9467
+ return this._resolveInstant(this._dateTime.plusNanos(nanos));
9468
+ };
9469
+
9470
+ _proto.minusAmount = function minusAmount(amount) {
9471
+ requireNonNull(amount, 'amount');
9472
+ return amount.subtractFrom(this);
9473
+ };
9474
+
9475
+ _proto.minusAmountUnit = function minusAmountUnit(amountToSubtract, unit) {
9476
+ return this.plusAmountUnit(-1 * amountToSubtract, unit);
9477
+ };
9478
+
9479
+ _proto.minusYears = function minusYears(years) {
9480
+ return this.plusYears(-1 * years);
9481
+ };
9482
+
9483
+ _proto.minusMonths = function minusMonths(months) {
9484
+ return this.plusMonths(-1 * months);
9485
+ };
9486
+
9487
+ _proto.minusWeeks = function minusWeeks(weeks) {
9488
+ return this.plusWeeks(-1 * weeks);
9489
+ };
9490
+
9491
+ _proto.minusDays = function minusDays(days) {
9492
+ return this.plusDays(-1 * days);
9493
+ };
9494
+
9495
+ _proto.minusHours = function minusHours(hours) {
9496
+ return this.plusHours(-1 * hours);
9497
+ };
9498
+
9499
+ _proto.minusMinutes = function minusMinutes(minutes) {
9500
+ return this.plusMinutes(-1 * minutes);
9501
+ };
9502
+
9503
+ _proto.minusSeconds = function minusSeconds(seconds) {
9504
+ return this.plusSeconds(-1 * seconds);
9505
+ };
9506
+
9507
+ _proto.minusNanos = function minusNanos(nanos) {
9508
+ return this.plusNanos(-1 * nanos);
9509
+ };
9510
+
9511
+ _proto.query = function query(_query) {
9512
+ if (_query === TemporalQueries.localDate()) {
9513
+ return this.toLocalDate();
9514
+ }
9515
+
9516
+ requireNonNull(_query, 'query');
9517
+ return _ChronoZonedDateTime.prototype.query.call(this, _query);
9518
+ };
9519
+
9520
+ _proto.until = function until(endExclusive, unit) {
9521
+ var end = ZonedDateTime.from(endExclusive);
9522
+
9523
+ if (unit instanceof ChronoUnit) {
9524
+ end = end.withZoneSameInstant(this._zone);
9525
+
9526
+ if (unit.isDateBased()) {
9527
+ return this._dateTime.until(end._dateTime, unit);
9528
+ } else {
9529
+ var difference = this._offset.totalSeconds() - end._offset.totalSeconds();
9530
+
9531
+ var adjustedEnd = end._dateTime.plusSeconds(difference);
9532
+
9533
+ return this._dateTime.until(adjustedEnd, unit);
9534
+ }
9535
+ }
9536
+
9537
+ return unit.between(this, end);
9538
+ };
9539
+
9540
+ _proto.toLocalDateTime = function toLocalDateTime() {
9541
+ return this._dateTime;
9542
+ };
9543
+
9544
+ _proto.toLocalDate = function toLocalDate() {
9545
+ return this._dateTime.toLocalDate();
9546
+ };
9547
+
9548
+ _proto.toLocalTime = function toLocalTime() {
9549
+ return this._dateTime.toLocalTime();
9550
+ };
9551
+
9552
+ _proto.toOffsetDateTime = function toOffsetDateTime() {
9553
+ return OffsetDateTime.of(this._dateTime, this._offset);
9554
+ };
9555
+
9556
+ _proto.equals = function equals(other) {
9557
+ if (this === other) {
9558
+ return true;
9559
+ }
9560
+
9561
+ if (other instanceof ZonedDateTime) {
9562
+ return this._dateTime.equals(other._dateTime) && this._offset.equals(other._offset) && this._zone.equals(other._zone);
9563
+ }
9564
+
9565
+ return false;
9566
+ };
9567
+
9568
+ _proto.hashCode = function hashCode() {
9569
+ return MathUtil.hashCode(this._dateTime.hashCode(), this._offset.hashCode(), this._zone.hashCode());
9570
+ };
9571
+
9572
+ _proto.toString = function toString() {
9573
+ var str = this._dateTime.toString() + this._offset.toString();
9574
+
9575
+ if (this._offset !== this._zone) {
9576
+ str += '[' + this._zone.toString() + ']';
9577
+ }
9578
+
9579
+ return str;
9580
+ };
9581
+
9582
+ _proto.toJSON = function toJSON() {
9583
+ return this.toString();
9584
+ };
9585
+
9586
+ _proto.format = function format(formatter) {
9587
+ return _ChronoZonedDateTime.prototype.format.call(this, formatter);
8545
9588
  };
8546
9589
 
8547
- ZonedDateTime.ofStrict = function ofStrict(localDateTime, offset, zone) {
8548
- requireNonNull(localDateTime, 'localDateTime');
8549
- requireNonNull(offset, 'offset');
8550
- requireNonNull(zone, 'zone');
8551
- var rules = zone.rules();
9590
+ return ZonedDateTime;
9591
+ }(ChronoZonedDateTime);
9592
+ function _init$g() {
9593
+ ZonedDateTime.FROM = createTemporalQuery('ZonedDateTime.FROM', function (temporal) {
9594
+ return ZonedDateTime.from(temporal);
9595
+ });
9596
+ }
8552
9597
 
8553
- if (rules.isValidOffset(localDateTime, offset) === false) {
8554
- var trans = rules.transition(localDateTime);
9598
+ var OffsetDateTime = function (_DefaultInterfaceTemp) {
9599
+ _inheritsLoose(OffsetDateTime, _DefaultInterfaceTemp);
8555
9600
 
8556
- if (trans != null && trans.isGap()) {
8557
- throw new DateTimeException('LocalDateTime ' + localDateTime + ' does not exist in zone ' + zone + ' due to a gap in the local time-line, typically caused by daylight savings');
8558
- }
9601
+ OffsetDateTime.from = function from(temporal) {
9602
+ requireNonNull(temporal, 'temporal');
8559
9603
 
8560
- throw new DateTimeException('ZoneOffset "' + offset + '" is not valid for LocalDateTime "' + localDateTime + '" in zone "' + zone + '"');
9604
+ if (temporal instanceof OffsetDateTime) {
9605
+ return temporal;
8561
9606
  }
8562
9607
 
8563
- return new ZonedDateTime(localDateTime, offset, zone);
9608
+ try {
9609
+ var offset = ZoneOffset.from(temporal);
9610
+
9611
+ try {
9612
+ var ldt = LocalDateTime.from(temporal);
9613
+ return OffsetDateTime.of(ldt, offset);
9614
+ } catch (_) {
9615
+ var instant = Instant.from(temporal);
9616
+ return OffsetDateTime.ofInstant(instant, offset);
9617
+ }
9618
+ } catch (ex) {
9619
+ throw new DateTimeException("Unable to obtain OffsetDateTime TemporalAccessor: " + temporal + ", type " + (temporal.constructor != null ? temporal.constructor.name : ''));
9620
+ }
8564
9621
  };
8565
9622
 
8566
- ZonedDateTime.ofLenient = function ofLenient(localDateTime, offset, zone) {
8567
- requireNonNull(localDateTime, 'localDateTime');
8568
- requireNonNull(offset, 'offset');
8569
- requireNonNull(zone, 'zone');
9623
+ OffsetDateTime.now = function now(clockOrZone) {
9624
+ if (arguments.length === 0) {
9625
+ return OffsetDateTime.now(Clock.systemDefaultZone());
9626
+ } else {
9627
+ requireNonNull(clockOrZone, 'clockOrZone');
8570
9628
 
8571
- if (zone instanceof ZoneOffset && offset.equals(zone) === false) {
8572
- throw new IllegalArgumentException('ZoneId must match ZoneOffset');
9629
+ if (clockOrZone instanceof ZoneId) {
9630
+ return OffsetDateTime.now(Clock.system(clockOrZone));
9631
+ } else if (clockOrZone instanceof Clock) {
9632
+ var now = clockOrZone.instant();
9633
+ return OffsetDateTime.ofInstant(now, clockOrZone.zone().rules().offset(now));
9634
+ } else {
9635
+ throw new IllegalArgumentException('clockOrZone must be an instance of ZoneId or Clock');
9636
+ }
8573
9637
  }
8574
-
8575
- return new ZonedDateTime(localDateTime, offset, zone);
8576
9638
  };
8577
9639
 
8578
- ZonedDateTime.from = function from(temporal) {
8579
- requireNonNull(temporal, 'temporal');
8580
-
8581
- if (temporal instanceof ZonedDateTime) {
8582
- return temporal;
9640
+ OffsetDateTime.of = function of() {
9641
+ if (arguments.length <= 2) {
9642
+ return OffsetDateTime.ofDateTime.apply(this, arguments);
9643
+ } else if (arguments.length === 3) {
9644
+ return OffsetDateTime.ofDateAndTime.apply(this, arguments);
9645
+ } else {
9646
+ return OffsetDateTime.ofNumbers.apply(this, arguments);
8583
9647
  }
9648
+ };
8584
9649
 
8585
- var zone = ZoneId.from(temporal);
9650
+ OffsetDateTime.ofDateTime = function ofDateTime(dateTime, offset) {
9651
+ return new OffsetDateTime(dateTime, offset);
9652
+ };
8586
9653
 
8587
- if (temporal.isSupported(ChronoField.INSTANT_SECONDS)) {
8588
- var zdt = ZonedDateTime._from(temporal, zone);
9654
+ OffsetDateTime.ofDateAndTime = function ofDateAndTime(date, time, offset) {
9655
+ var dt = LocalDateTime.of(date, time);
9656
+ return new OffsetDateTime(dt, offset);
9657
+ };
8589
9658
 
8590
- if (zdt != null) return zdt;
9659
+ OffsetDateTime.ofNumbers = function ofNumbers(year, month, dayOfMonth, hour, minute, second, nanoOfSecond, offset) {
9660
+ if (hour === void 0) {
9661
+ hour = 0;
8591
9662
  }
8592
9663
 
8593
- var ldt = LocalDateTime.from(temporal);
8594
- return ZonedDateTime.of2(ldt, zone);
8595
- };
9664
+ if (minute === void 0) {
9665
+ minute = 0;
9666
+ }
8596
9667
 
8597
- ZonedDateTime._from = function _from(temporal, zone) {
8598
- try {
8599
- return ZonedDateTime.__from(temporal, zone);
8600
- } catch (ex) {
8601
- if (!(ex instanceof DateTimeException)) throw ex;
9668
+ if (second === void 0) {
9669
+ second = 0;
9670
+ }
9671
+
9672
+ if (nanoOfSecond === void 0) {
9673
+ nanoOfSecond = 0;
8602
9674
  }
9675
+
9676
+ var dt = LocalDateTime.of(year, month, dayOfMonth, hour, minute, second, nanoOfSecond);
9677
+ return new OffsetDateTime(dt, offset);
8603
9678
  };
8604
9679
 
8605
- ZonedDateTime.__from = function __from(temporal, zone) {
8606
- var epochSecond = temporal.getLong(ChronoField.INSTANT_SECONDS);
8607
- var nanoOfSecond = temporal.get(ChronoField.NANO_OF_SECOND);
8608
- return ZonedDateTime._create(epochSecond, nanoOfSecond, zone);
9680
+ OffsetDateTime.ofInstant = function ofInstant(instant, zone) {
9681
+ requireNonNull(instant, 'instant');
9682
+ requireNonNull(zone, 'zone');
9683
+ var rules = zone.rules();
9684
+ var offset = rules.offset(instant);
9685
+ var ldt = LocalDateTime.ofEpochSecond(instant.epochSecond(), instant.nano(), offset);
9686
+ return new OffsetDateTime(ldt, offset);
8609
9687
  };
8610
9688
 
8611
- ZonedDateTime.parse = function parse(text, formatter) {
9689
+ OffsetDateTime.parse = function parse(text, formatter) {
8612
9690
  if (formatter === void 0) {
8613
- formatter = DateTimeFormatter.ISO_ZONED_DATE_TIME;
9691
+ formatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
8614
9692
  }
8615
9693
 
8616
9694
  requireNonNull(formatter, 'formatter');
8617
- return formatter.parse(text, ZonedDateTime.FROM);
9695
+ return formatter.parse(text, OffsetDateTime.FROM);
8618
9696
  };
8619
9697
 
8620
- function ZonedDateTime(dateTime, offset, zone) {
9698
+ function OffsetDateTime(dateTime, offset) {
8621
9699
  var _this;
8622
9700
 
9701
+ _this = _DefaultInterfaceTemp.call(this) || this;
8623
9702
  requireNonNull(dateTime, 'dateTime');
9703
+ requireInstance(dateTime, LocalDateTime, 'dateTime');
8624
9704
  requireNonNull(offset, 'offset');
8625
- requireNonNull(zone, 'zone');
8626
- _this = _ChronoZonedDateTime.call(this) || this;
9705
+ requireInstance(offset, ZoneOffset, 'offset');
8627
9706
  _this._dateTime = dateTime;
8628
9707
  _this._offset = offset;
8629
- _this._zone = zone;
8630
9708
  return _this;
8631
9709
  }
8632
9710
 
8633
- var _proto = ZonedDateTime.prototype;
9711
+ var _proto = OffsetDateTime.prototype;
8634
9712
 
8635
- _proto._resolveLocal = function _resolveLocal(newDateTime) {
8636
- requireNonNull(newDateTime, 'newDateTime');
8637
- return ZonedDateTime.ofLocal(newDateTime, this._zone, this._offset);
9713
+ _proto.adjustInto = function adjustInto(temporal) {
9714
+ return temporal.with(ChronoField.EPOCH_DAY, this.toLocalDate().toEpochDay()).with(ChronoField.NANO_OF_DAY, this.toLocalTime().toNanoOfDay()).with(ChronoField.OFFSET_SECONDS, this.offset().totalSeconds());
8638
9715
  };
8639
9716
 
8640
- _proto._resolveInstant = function _resolveInstant(newDateTime) {
8641
- return ZonedDateTime.ofInstant3(newDateTime, this._offset, this._zone);
8642
- };
9717
+ _proto.until = function until(endExclusive, unit) {
9718
+ var end = OffsetDateTime.from(endExclusive);
8643
9719
 
8644
- _proto._resolveOffset = function _resolveOffset(offset) {
8645
- if (offset.equals(this._offset) === false && this._zone.rules().isValidOffset(this._dateTime, offset)) {
8646
- return new ZonedDateTime(this._dateTime, offset, this._zone);
9720
+ if (unit instanceof ChronoUnit) {
9721
+ end = end.withOffsetSameInstant(this._offset);
9722
+ return this._dateTime.until(end._dateTime, unit);
8647
9723
  }
8648
9724
 
8649
- return this;
9725
+ return unit.between(this, end);
8650
9726
  };
8651
9727
 
8652
- _proto.isSupported = function isSupported(fieldOrUnit) {
8653
- if (fieldOrUnit instanceof ChronoField) {
8654
- return true;
8655
- } else if (fieldOrUnit instanceof ChronoUnit) {
8656
- return fieldOrUnit.isDateBased() || fieldOrUnit.isTimeBased();
8657
- }
9728
+ _proto.atZoneSameInstant = function atZoneSameInstant(zone) {
9729
+ return ZonedDateTime.ofInstant(this._dateTime, this._offset, zone);
9730
+ };
8658
9731
 
8659
- return fieldOrUnit != null && fieldOrUnit.isSupportedBy(this);
9732
+ _proto.atZoneSimilarLocal = function atZoneSimilarLocal(zone) {
9733
+ return ZonedDateTime.ofLocal(this._dateTime, zone, this._offset);
8660
9734
  };
8661
9735
 
8662
- _proto.range = function range(field) {
8663
- if (field instanceof ChronoField) {
8664
- if (field === ChronoField.INSTANT_SECONDS || field === ChronoField.OFFSET_SECONDS) {
8665
- return field.range();
8666
- }
9736
+ _proto.query = function query(_query) {
9737
+ requireNonNull(_query, 'query');
8667
9738
 
8668
- return this._dateTime.range(field);
9739
+ if (_query === TemporalQueries.chronology()) {
9740
+ return IsoChronology.INSTANCE;
9741
+ } else if (_query === TemporalQueries.precision()) {
9742
+ return ChronoUnit.NANOS;
9743
+ } else if (_query === TemporalQueries.offset() || _query === TemporalQueries.zone()) {
9744
+ return this.offset();
9745
+ } else if (_query === TemporalQueries.localDate()) {
9746
+ return this.toLocalDate();
9747
+ } else if (_query === TemporalQueries.localTime()) {
9748
+ return this.toLocalTime();
9749
+ } else if (_query === TemporalQueries.zoneId()) {
9750
+ return null;
8669
9751
  }
8670
9752
 
8671
- return field.rangeRefinedBy(this);
9753
+ return _DefaultInterfaceTemp.prototype.query.call(this, _query);
8672
9754
  };
8673
9755
 
8674
9756
  _proto.get = function get(field) {
8675
- return this.getLong(field);
9757
+ if (field instanceof ChronoField) {
9758
+ switch (field) {
9759
+ case ChronoField.INSTANT_SECONDS:
9760
+ throw new DateTimeException('Field too large for an int: ' + field);
9761
+
9762
+ case ChronoField.OFFSET_SECONDS:
9763
+ return this.offset().totalSeconds();
9764
+ }
9765
+
9766
+ return this._dateTime.get(field);
9767
+ }
9768
+
9769
+ return _DefaultInterfaceTemp.prototype.get.call(this, field);
8676
9770
  };
8677
9771
 
8678
9772
  _proto.getLong = function getLong(field) {
@@ -8682,13 +9776,12 @@ var ZonedDateTime = function (_ChronoZonedDateTime) {
8682
9776
  return this.toEpochSecond();
8683
9777
 
8684
9778
  case ChronoField.OFFSET_SECONDS:
8685
- return this._offset.totalSeconds();
9779
+ return this.offset().totalSeconds();
8686
9780
  }
8687
9781
 
8688
9782
  return this._dateTime.getLong(field);
8689
9783
  }
8690
9784
 
8691
- requireNonNull(field, 'field');
8692
9785
  return field.getFrom(this);
8693
9786
  };
8694
9787
 
@@ -8696,52 +9789,6 @@ var ZonedDateTime = function (_ChronoZonedDateTime) {
8696
9789
  return this._offset;
8697
9790
  };
8698
9791
 
8699
- _proto.withEarlierOffsetAtOverlap = function withEarlierOffsetAtOverlap() {
8700
- var trans = this._zone.rules().transition(this._dateTime);
8701
-
8702
- if (trans != null && trans.isOverlap()) {
8703
- var earlierOffset = trans.offsetBefore();
8704
-
8705
- if (earlierOffset.equals(this._offset) === false) {
8706
- return new ZonedDateTime(this._dateTime, earlierOffset, this._zone);
8707
- }
8708
- }
8709
-
8710
- return this;
8711
- };
8712
-
8713
- _proto.withLaterOffsetAtOverlap = function withLaterOffsetAtOverlap() {
8714
- var trans = this._zone.rules().transition(this.toLocalDateTime());
8715
-
8716
- if (trans != null) {
8717
- var laterOffset = trans.offsetAfter();
8718
-
8719
- if (laterOffset.equals(this._offset) === false) {
8720
- return new ZonedDateTime(this._dateTime, laterOffset, this._zone);
8721
- }
8722
- }
8723
-
8724
- return this;
8725
- };
8726
-
8727
- _proto.zone = function zone() {
8728
- return this._zone;
8729
- };
8730
-
8731
- _proto.withZoneSameLocal = function withZoneSameLocal(zone) {
8732
- requireNonNull(zone, 'zone');
8733
- return this._zone.equals(zone) ? this : ZonedDateTime.ofLocal(this._dateTime, zone, this._offset);
8734
- };
8735
-
8736
- _proto.withZoneSameInstant = function withZoneSameInstant(zone) {
8737
- requireNonNull(zone, 'zone');
8738
- return this._zone.equals(zone) ? this : ZonedDateTime._create(this._dateTime.toEpochSecond(this._offset), this._dateTime.nano(), zone);
8739
- };
8740
-
8741
- _proto.withFixedOffsetZone = function withFixedOffsetZone() {
8742
- return this._zone.equals(this._offset) ? this : new ZonedDateTime(this._dateTime, this._offset, this._offset);
8743
- };
8744
-
8745
9792
  _proto.year = function year() {
8746
9793
  return this._dateTime.year();
8747
9794
  };
@@ -8782,233 +9829,283 @@ var ZonedDateTime = function (_ChronoZonedDateTime) {
8782
9829
  return this._dateTime.nano();
8783
9830
  };
8784
9831
 
8785
- _proto.with = function _with() {
8786
- if (arguments.length === 1) {
8787
- return this.withTemporalAdjuster.apply(this, arguments);
8788
- } else {
8789
- return this.with2.apply(this, arguments);
9832
+ _proto.toLocalDateTime = function toLocalDateTime() {
9833
+ return this._dateTime;
9834
+ };
9835
+
9836
+ _proto.toLocalDate = function toLocalDate() {
9837
+ return this._dateTime.toLocalDate();
9838
+ };
9839
+
9840
+ _proto.toLocalTime = function toLocalTime() {
9841
+ return this._dateTime.toLocalTime();
9842
+ };
9843
+
9844
+ _proto.toOffsetTime = function toOffsetTime() {
9845
+ return OffsetTime.of(this._dateTime.toLocalTime(), this._offset);
9846
+ };
9847
+
9848
+ _proto.toZonedDateTime = function toZonedDateTime() {
9849
+ return ZonedDateTime.of(this._dateTime, this._offset);
9850
+ };
9851
+
9852
+ _proto.toInstant = function toInstant() {
9853
+ return this._dateTime.toInstant(this._offset);
9854
+ };
9855
+
9856
+ _proto.toEpochSecond = function toEpochSecond() {
9857
+ return this._dateTime.toEpochSecond(this._offset);
9858
+ };
9859
+
9860
+ _proto.isSupported = function isSupported(fieldOrUnit) {
9861
+ if (fieldOrUnit instanceof ChronoField) {
9862
+ return fieldOrUnit.isDateBased() || fieldOrUnit.isTimeBased();
9863
+ }
9864
+
9865
+ if (fieldOrUnit instanceof ChronoUnit) {
9866
+ return fieldOrUnit.isDateBased() || fieldOrUnit.isTimeBased();
8790
9867
  }
9868
+
9869
+ return fieldOrUnit != null && fieldOrUnit.isSupportedBy(this);
8791
9870
  };
8792
9871
 
8793
- _proto.withTemporalAdjuster = function withTemporalAdjuster(adjuster) {
8794
- if (adjuster instanceof LocalDate) {
8795
- return this._resolveLocal(LocalDateTime.of(adjuster, this._dateTime.toLocalTime()));
8796
- } else if (adjuster instanceof LocalTime) {
8797
- return this._resolveLocal(LocalDateTime.of(this._dateTime.toLocalDate(), adjuster));
8798
- } else if (adjuster instanceof LocalDateTime) {
8799
- return this._resolveLocal(adjuster);
9872
+ _proto.range = function range(field) {
9873
+ if (field instanceof ChronoField) {
9874
+ if (field === ChronoField.INSTANT_SECONDS || field === ChronoField.OFFSET_SECONDS) {
9875
+ return field.range();
9876
+ }
9877
+
9878
+ return this._dateTime.range(field);
9879
+ }
9880
+
9881
+ return field.rangeRefinedBy(this);
9882
+ };
9883
+
9884
+ _proto.withAdjuster = function withAdjuster(adjuster) {
9885
+ requireNonNull(adjuster);
9886
+
9887
+ if (adjuster instanceof LocalDate || adjuster instanceof LocalTime || adjuster instanceof LocalDateTime) {
9888
+ return this._withDateTimeOffset(this._dateTime.with(adjuster), this._offset);
8800
9889
  } else if (adjuster instanceof Instant) {
8801
- var instant = adjuster;
8802
- return ZonedDateTime._create(instant.epochSecond(), instant.nano(), this._zone);
9890
+ return OffsetDateTime.ofInstant(adjuster, this._offset);
8803
9891
  } else if (adjuster instanceof ZoneOffset) {
8804
- return this._resolveOffset(adjuster);
9892
+ return this._withDateTimeOffset(this._dateTime, adjuster);
9893
+ } else if (adjuster instanceof OffsetDateTime) {
9894
+ return adjuster;
8805
9895
  }
8806
9896
 
8807
- requireNonNull(adjuster, 'adjuster');
8808
9897
  return adjuster.adjustInto(this);
8809
9898
  };
8810
9899
 
8811
- _proto.with2 = function with2(field, newValue) {
9900
+ _proto.withFieldValue = function withFieldValue(field, newValue) {
9901
+ requireNonNull(field);
9902
+
8812
9903
  if (field instanceof ChronoField) {
8813
- switch (field) {
9904
+ var f = field;
9905
+
9906
+ switch (f) {
8814
9907
  case ChronoField.INSTANT_SECONDS:
8815
- return ZonedDateTime._create(newValue, this.nano(), this._zone);
9908
+ return OffsetDateTime.ofInstant(Instant.ofEpochSecond(newValue, this.nano()), this._offset);
8816
9909
 
8817
9910
  case ChronoField.OFFSET_SECONDS:
8818
9911
  {
8819
- var offset = ZoneOffset.ofTotalSeconds(field.checkValidIntValue(newValue));
8820
- return this._resolveOffset(offset);
9912
+ return this._withDateTimeOffset(this._dateTime, ZoneOffset.ofTotalSeconds(f.checkValidIntValue(newValue)));
8821
9913
  }
8822
9914
  }
8823
9915
 
8824
- return this._resolveLocal(this._dateTime.with(field, newValue));
9916
+ return this._withDateTimeOffset(this._dateTime.with(field, newValue), this._offset);
8825
9917
  }
8826
9918
 
8827
9919
  return field.adjustInto(this, newValue);
8828
9920
  };
8829
9921
 
9922
+ _proto._withDateTimeOffset = function _withDateTimeOffset(dateTime, offset) {
9923
+ if (this._dateTime === dateTime && this._offset.equals(offset)) {
9924
+ return this;
9925
+ }
9926
+
9927
+ return new OffsetDateTime(dateTime, offset);
9928
+ };
9929
+
8830
9930
  _proto.withYear = function withYear(year) {
8831
- return this._resolveLocal(this._dateTime.withYear(year));
9931
+ return this._withDateTimeOffset(this._dateTime.withYear(year), this._offset);
8832
9932
  };
8833
9933
 
8834
9934
  _proto.withMonth = function withMonth(month) {
8835
- return this._resolveLocal(this._dateTime.withMonth(month));
9935
+ return this._withDateTimeOffset(this._dateTime.withMonth(month), this._offset);
8836
9936
  };
8837
9937
 
8838
9938
  _proto.withDayOfMonth = function withDayOfMonth(dayOfMonth) {
8839
- return this._resolveLocal(this._dateTime.withDayOfMonth(dayOfMonth));
9939
+ return this._withDateTimeOffset(this._dateTime.withDayOfMonth(dayOfMonth), this._offset);
8840
9940
  };
8841
9941
 
8842
9942
  _proto.withDayOfYear = function withDayOfYear(dayOfYear) {
8843
- return this._resolveLocal(this._dateTime.withDayOfYear(dayOfYear));
9943
+ return this._withDateTimeOffset(this._dateTime.withDayOfYear(dayOfYear), this._offset);
8844
9944
  };
8845
9945
 
8846
9946
  _proto.withHour = function withHour(hour) {
8847
- return this._resolveLocal(this._dateTime.withHour(hour));
9947
+ return this._withDateTimeOffset(this._dateTime.withHour(hour), this._offset);
8848
9948
  };
8849
9949
 
8850
9950
  _proto.withMinute = function withMinute(minute) {
8851
- return this._resolveLocal(this._dateTime.withMinute(minute));
9951
+ return this._withDateTimeOffset(this._dateTime.withMinute(minute), this._offset);
8852
9952
  };
8853
9953
 
8854
9954
  _proto.withSecond = function withSecond(second) {
8855
- return this._resolveLocal(this._dateTime.withSecond(second));
9955
+ return this._withDateTimeOffset(this._dateTime.withSecond(second), this._offset);
8856
9956
  };
8857
9957
 
8858
9958
  _proto.withNano = function withNano(nanoOfSecond) {
8859
- return this._resolveLocal(this._dateTime.withNano(nanoOfSecond));
9959
+ return this._withDateTimeOffset(this._dateTime.withNano(nanoOfSecond), this._offset);
8860
9960
  };
8861
9961
 
8862
- _proto.truncatedTo = function truncatedTo(unit) {
8863
- return this._resolveLocal(this._dateTime.truncatedTo(unit));
9962
+ _proto.withOffsetSameLocal = function withOffsetSameLocal(offset) {
9963
+ requireNonNull(offset, 'offset');
9964
+ return this._withDateTimeOffset(this._dateTime, offset);
8864
9965
  };
8865
9966
 
8866
- _proto.plus = function plus() {
8867
- if (arguments.length === 1) {
8868
- return this.plusTemporalAmount.apply(this, arguments);
8869
- } else {
8870
- return this.plus2.apply(this, arguments);
9967
+ _proto.withOffsetSameInstant = function withOffsetSameInstant(offset) {
9968
+ requireNonNull(offset, 'offset');
9969
+
9970
+ if (offset.equals(this._offset)) {
9971
+ return this;
8871
9972
  }
9973
+
9974
+ var difference = offset.totalSeconds() - this._offset.totalSeconds();
9975
+
9976
+ var adjusted = this._dateTime.plusSeconds(difference);
9977
+
9978
+ return new OffsetDateTime(adjusted, offset);
8872
9979
  };
8873
9980
 
8874
- _proto.plusTemporalAmount = function plusTemporalAmount(amount) {
8875
- requireNonNull(amount);
9981
+ _proto.truncatedTo = function truncatedTo(unit) {
9982
+ return this._withDateTimeOffset(this._dateTime.truncatedTo(unit), this._offset);
9983
+ };
9984
+
9985
+ _proto.plusAmount = function plusAmount(amount) {
9986
+ requireNonNull(amount, 'amount');
8876
9987
  return amount.addTo(this);
8877
9988
  };
8878
9989
 
8879
- _proto.plus2 = function plus2(amountToAdd, unit) {
9990
+ _proto.plusAmountUnit = function plusAmountUnit(amountToAdd, unit) {
8880
9991
  if (unit instanceof ChronoUnit) {
8881
- if (unit.isDateBased()) {
8882
- return this._resolveLocal(this._dateTime.plus(amountToAdd, unit));
8883
- } else {
8884
- return this._resolveInstant(this._dateTime.plus(amountToAdd, unit));
8885
- }
9992
+ return this._withDateTimeOffset(this._dateTime.plus(amountToAdd, unit), this._offset);
8886
9993
  }
8887
9994
 
8888
- requireNonNull(unit, 'unit');
8889
9995
  return unit.addTo(this, amountToAdd);
8890
9996
  };
8891
9997
 
8892
9998
  _proto.plusYears = function plusYears(years) {
8893
- return this._resolveLocal(this._dateTime.plusYears(years));
9999
+ return this._withDateTimeOffset(this._dateTime.plusYears(years), this._offset);
8894
10000
  };
8895
10001
 
8896
10002
  _proto.plusMonths = function plusMonths(months) {
8897
- return this._resolveLocal(this._dateTime.plusMonths(months));
10003
+ return this._withDateTimeOffset(this._dateTime.plusMonths(months), this._offset);
8898
10004
  };
8899
10005
 
8900
10006
  _proto.plusWeeks = function plusWeeks(weeks) {
8901
- return this._resolveLocal(this._dateTime.plusWeeks(weeks));
10007
+ return this._withDateTimeOffset(this._dateTime.plusWeeks(weeks), this._offset);
8902
10008
  };
8903
10009
 
8904
10010
  _proto.plusDays = function plusDays(days) {
8905
- return this._resolveLocal(this._dateTime.plusDays(days));
10011
+ return this._withDateTimeOffset(this._dateTime.plusDays(days), this._offset);
8906
10012
  };
8907
10013
 
8908
10014
  _proto.plusHours = function plusHours(hours) {
8909
- return this._resolveInstant(this._dateTime.plusHours(hours));
10015
+ return this._withDateTimeOffset(this._dateTime.plusHours(hours), this._offset);
8910
10016
  };
8911
10017
 
8912
10018
  _proto.plusMinutes = function plusMinutes(minutes) {
8913
- return this._resolveInstant(this._dateTime.plusMinutes(minutes));
10019
+ return this._withDateTimeOffset(this._dateTime.plusMinutes(minutes), this._offset);
8914
10020
  };
8915
10021
 
8916
10022
  _proto.plusSeconds = function plusSeconds(seconds) {
8917
- return this._resolveInstant(this._dateTime.plusSeconds(seconds));
10023
+ return this._withDateTimeOffset(this._dateTime.plusSeconds(seconds), this._offset);
8918
10024
  };
8919
10025
 
8920
10026
  _proto.plusNanos = function plusNanos(nanos) {
8921
- return this._resolveInstant(this._dateTime.plusNanos(nanos));
10027
+ return this._withDateTimeOffset(this._dateTime.plusNanos(nanos), this._offset);
8922
10028
  };
8923
10029
 
8924
- _proto.minus = function minus() {
8925
- if (arguments.length === 1) {
8926
- return this.minusTemporalAmount.apply(this, arguments);
8927
- } else {
8928
- return this.minus2.apply(this, arguments);
8929
- }
8930
- };
8931
-
8932
- _proto.minusTemporalAmount = function minusTemporalAmount(amount) {
8933
- requireNonNull(amount, 'amount');
10030
+ _proto.minusAmount = function minusAmount(amount) {
10031
+ requireNonNull(amount);
8934
10032
  return amount.subtractFrom(this);
8935
10033
  };
8936
10034
 
8937
- _proto.minus2 = function minus2(amountToSubtract, unit) {
8938
- return this.plus2(-1 * amountToSubtract, unit);
10035
+ _proto.minusAmountUnit = function minusAmountUnit(amountToSubtract, unit) {
10036
+ return this.plus(-1 * amountToSubtract, unit);
8939
10037
  };
8940
10038
 
8941
10039
  _proto.minusYears = function minusYears(years) {
8942
- return this.plusYears(-1 * years);
10040
+ return this._withDateTimeOffset(this._dateTime.minusYears(years), this._offset);
8943
10041
  };
8944
10042
 
8945
10043
  _proto.minusMonths = function minusMonths(months) {
8946
- return this.plusMonths(-1 * months);
10044
+ return this._withDateTimeOffset(this._dateTime.minusMonths(months), this._offset);
8947
10045
  };
8948
10046
 
8949
10047
  _proto.minusWeeks = function minusWeeks(weeks) {
8950
- return this.plusWeeks(-1 * weeks);
10048
+ return this._withDateTimeOffset(this._dateTime.minusWeeks(weeks), this._offset);
8951
10049
  };
8952
10050
 
8953
10051
  _proto.minusDays = function minusDays(days) {
8954
- return this.plusDays(-1 * days);
10052
+ return this._withDateTimeOffset(this._dateTime.minusDays(days), this._offset);
8955
10053
  };
8956
10054
 
8957
10055
  _proto.minusHours = function minusHours(hours) {
8958
- return this.plusHours(-1 * hours);
10056
+ return this._withDateTimeOffset(this._dateTime.minusHours(hours), this._offset);
8959
10057
  };
8960
10058
 
8961
10059
  _proto.minusMinutes = function minusMinutes(minutes) {
8962
- return this.plusMinutes(-1 * minutes);
10060
+ return this._withDateTimeOffset(this._dateTime.minusMinutes(minutes), this._offset);
8963
10061
  };
8964
10062
 
8965
10063
  _proto.minusSeconds = function minusSeconds(seconds) {
8966
- return this.plusSeconds(-1 * seconds);
10064
+ return this._withDateTimeOffset(this._dateTime.minusSeconds(seconds), this._offset);
8967
10065
  };
8968
10066
 
8969
10067
  _proto.minusNanos = function minusNanos(nanos) {
8970
- return this.plusNanos(-1 * nanos);
8971
- };
8972
-
8973
- _proto.query = function query(_query) {
8974
- if (_query === TemporalQueries.localDate()) {
8975
- return this.toLocalDate();
8976
- }
8977
-
8978
- requireNonNull(_query, 'query');
8979
- return _ChronoZonedDateTime.prototype.query.call(this, _query);
10068
+ return this._withDateTimeOffset(this._dateTime.minusNanos(nanos), this._offset);
8980
10069
  };
8981
10070
 
8982
- _proto.until = function until(endExclusive, unit) {
8983
- var end = ZonedDateTime.from(endExclusive);
10071
+ _proto.compareTo = function compareTo(other) {
10072
+ requireNonNull(other, 'other');
10073
+ requireInstance(other, OffsetDateTime, 'other');
8984
10074
 
8985
- if (unit instanceof ChronoUnit) {
8986
- end = end.withZoneSameInstant(this._zone);
10075
+ if (this.offset().equals(other.offset())) {
10076
+ return this.toLocalDateTime().compareTo(other.toLocalDateTime());
10077
+ }
8987
10078
 
8988
- if (unit.isDateBased()) {
8989
- return this._dateTime.until(end._dateTime, unit);
8990
- } else {
8991
- var difference = this._offset.totalSeconds() - end._offset.totalSeconds();
10079
+ var cmp = MathUtil.compareNumbers(this.toEpochSecond(), other.toEpochSecond());
8992
10080
 
8993
- var adjustedEnd = end._dateTime.plusSeconds(difference);
10081
+ if (cmp === 0) {
10082
+ cmp = this.toLocalTime().nano() - other.toLocalTime().nano();
8994
10083
 
8995
- return this._dateTime.until(adjustedEnd, unit);
10084
+ if (cmp === 0) {
10085
+ cmp = this.toLocalDateTime().compareTo(other.toLocalDateTime());
8996
10086
  }
8997
10087
  }
8998
10088
 
8999
- return unit.between(this, end);
10089
+ return cmp;
9000
10090
  };
9001
10091
 
9002
- _proto.toLocalDateTime = function toLocalDateTime() {
9003
- return this._dateTime;
10092
+ _proto.isAfter = function isAfter(other) {
10093
+ requireNonNull(other, 'other');
10094
+ var thisEpochSec = this.toEpochSecond();
10095
+ var otherEpochSec = other.toEpochSecond();
10096
+ return thisEpochSec > otherEpochSec || thisEpochSec === otherEpochSec && this.toLocalTime().nano() > other.toLocalTime().nano();
9004
10097
  };
9005
10098
 
9006
- _proto.toLocalDate = function toLocalDate() {
9007
- return this._dateTime.toLocalDate();
10099
+ _proto.isBefore = function isBefore(other) {
10100
+ requireNonNull(other, 'other');
10101
+ var thisEpochSec = this.toEpochSecond();
10102
+ var otherEpochSec = other.toEpochSecond();
10103
+ return thisEpochSec < otherEpochSec || thisEpochSec === otherEpochSec && this.toLocalTime().nano() < other.toLocalTime().nano();
9008
10104
  };
9009
10105
 
9010
- _proto.toLocalTime = function toLocalTime() {
9011
- return this._dateTime.toLocalTime();
10106
+ _proto.isEqual = function isEqual(other) {
10107
+ requireNonNull(other, 'other');
10108
+ return this.toEpochSecond() === other.toEpochSecond() && this.toLocalTime().nano() === other.toLocalTime().nano();
9012
10109
  };
9013
10110
 
9014
10111
  _proto.equals = function equals(other) {
@@ -9016,25 +10113,19 @@ var ZonedDateTime = function (_ChronoZonedDateTime) {
9016
10113
  return true;
9017
10114
  }
9018
10115
 
9019
- if (other instanceof ZonedDateTime) {
9020
- return this._dateTime.equals(other._dateTime) && this._offset.equals(other._offset) && this._zone.equals(other._zone);
10116
+ if (other instanceof OffsetDateTime) {
10117
+ return this._dateTime.equals(other._dateTime) && this._offset.equals(other._offset);
9021
10118
  }
9022
10119
 
9023
10120
  return false;
9024
10121
  };
9025
10122
 
9026
10123
  _proto.hashCode = function hashCode() {
9027
- return MathUtil.hashCode(this._dateTime.hashCode(), this._offset.hashCode(), this._zone.hashCode());
10124
+ return this._dateTime.hashCode() ^ this._offset.hashCode();
9028
10125
  };
9029
10126
 
9030
10127
  _proto.toString = function toString() {
9031
- var str = this._dateTime.toString() + this._offset.toString();
9032
-
9033
- if (this._offset !== this._zone) {
9034
- str += '[' + this._zone.toString() + ']';
9035
- }
9036
-
9037
- return str;
10128
+ return this._dateTime.toString() + this._offset.toString();
9038
10129
  };
9039
10130
 
9040
10131
  _proto.toJSON = function toJSON() {
@@ -9042,14 +10133,17 @@ var ZonedDateTime = function (_ChronoZonedDateTime) {
9042
10133
  };
9043
10134
 
9044
10135
  _proto.format = function format(formatter) {
9045
- return _ChronoZonedDateTime.prototype.format.call(this, formatter);
10136
+ requireNonNull(formatter, 'formatter');
10137
+ return formatter.format(this);
9046
10138
  };
9047
10139
 
9048
- return ZonedDateTime;
9049
- }(ChronoZonedDateTime);
9050
- function _init$f() {
9051
- ZonedDateTime.FROM = createTemporalQuery('ZonedDateTime.FROM', function (temporal) {
9052
- return ZonedDateTime.from(temporal);
10140
+ return OffsetDateTime;
10141
+ }(DefaultInterfaceTemporal);
10142
+ function _init$h() {
10143
+ OffsetDateTime.MIN = LocalDateTime.MIN.atOffset(ZoneOffset.MAX);
10144
+ OffsetDateTime.MAX = LocalDateTime.MAX.atOffset(ZoneOffset.MIN);
10145
+ OffsetDateTime.FROM = createTemporalQuery('OffsetDateTime.FROM', function (temporal) {
10146
+ return OffsetDateTime.from(temporal);
9053
10147
  });
9054
10148
  }
9055
10149
 
@@ -9182,6 +10276,9 @@ var LocalDate = function (_ChronoLocalDate) {
9182
10276
  var _this;
9183
10277
 
9184
10278
  _this = _ChronoLocalDate.call(this) || this;
10279
+ requireNonNull(year, 'year');
10280
+ requireNonNull(month, 'month');
10281
+ requireNonNull(dayOfMonth, 'dayOfMonth');
9185
10282
 
9186
10283
  if (month instanceof Month) {
9187
10284
  month = month.value();
@@ -9375,15 +10472,7 @@ var LocalDate = function (_ChronoLocalDate) {
9375
10472
  return this.isLeapYear() ? 366 : 365;
9376
10473
  };
9377
10474
 
9378
- _proto.with = function _with(fieldOrAdjuster, newValue) {
9379
- if (arguments.length < 2) {
9380
- return this.withTemporalAdjuster(fieldOrAdjuster);
9381
- } else {
9382
- return this.withFieldAndValue(fieldOrAdjuster, newValue);
9383
- }
9384
- };
9385
-
9386
- _proto.withTemporalAdjuster = function withTemporalAdjuster(adjuster) {
10475
+ _proto.withAdjuster = function withAdjuster(adjuster) {
9387
10476
  requireNonNull(adjuster, 'adjuster');
9388
10477
 
9389
10478
  if (adjuster instanceof LocalDate) {
@@ -9394,7 +10483,7 @@ var LocalDate = function (_ChronoLocalDate) {
9394
10483
  return adjuster.adjustInto(this);
9395
10484
  };
9396
10485
 
9397
- _proto.withFieldAndValue = function withFieldAndValue(field, newValue) {
10486
+ _proto.withFieldValue = function withFieldValue(field, newValue) {
9398
10487
  assert(field != null, 'field', NullPointerException);
9399
10488
 
9400
10489
  if (field instanceof ChronoField) {
@@ -9484,20 +10573,12 @@ var LocalDate = function (_ChronoLocalDate) {
9484
10573
  return LocalDate.ofYearDay(this._year, dayOfYear);
9485
10574
  };
9486
10575
 
9487
- _proto.plus = function plus(p1, p2) {
9488
- if (arguments.length < 2) {
9489
- return this.plus1(p1);
9490
- } else {
9491
- return this.plus2(p1, p2);
9492
- }
9493
- };
9494
-
9495
- _proto.plus1 = function plus1(amount) {
10576
+ _proto.plusAmount = function plusAmount(amount) {
9496
10577
  requireNonNull(amount, 'amount');
9497
10578
  return amount.addTo(this);
9498
10579
  };
9499
10580
 
9500
- _proto.plus2 = function plus2(amountToAdd, unit) {
10581
+ _proto.plusAmountUnit = function plusAmountUnit(amountToAdd, unit) {
9501
10582
  requireNonNull(amountToAdd, 'amountToAdd');
9502
10583
  requireNonNull(unit, 'unit');
9503
10584
 
@@ -9568,23 +10649,15 @@ var LocalDate = function (_ChronoLocalDate) {
9568
10649
  return LocalDate.ofEpochDay(mjDay);
9569
10650
  };
9570
10651
 
9571
- _proto.minus = function minus(p1, p2) {
9572
- if (arguments.length < 2) {
9573
- return this.minus1(p1);
9574
- } else {
9575
- return this.minus2(p1, p2);
9576
- }
9577
- };
9578
-
9579
- _proto.minus1 = function minus1(amount) {
10652
+ _proto.minusAmount = function minusAmount(amount) {
9580
10653
  requireNonNull(amount, 'amount');
9581
10654
  return amount.subtractFrom(this);
9582
10655
  };
9583
10656
 
9584
- _proto.minus2 = function minus2(amountToSubtract, unit) {
10657
+ _proto.minusAmountUnit = function minusAmountUnit(amountToSubtract, unit) {
9585
10658
  requireNonNull(amountToSubtract, 'amountToSubtract');
9586
10659
  requireNonNull(unit, 'unit');
9587
- return this.plus2(-1 * amountToSubtract, unit);
10660
+ return this.plusAmountUnit(-1 * amountToSubtract, unit);
9588
10661
  };
9589
10662
 
9590
10663
  _proto.minusYears = function minusYears(yearsToSubtract) {
@@ -9701,7 +10774,15 @@ var LocalDate = function (_ChronoLocalDate) {
9701
10774
  };
9702
10775
 
9703
10776
  _proto.atTime1 = function atTime1(time) {
9704
- return LocalDateTime.of(this, time);
10777
+ requireNonNull(time, 'time');
10778
+
10779
+ if (time instanceof LocalTime) {
10780
+ return LocalDateTime.of(this, time);
10781
+ } else if (time instanceof OffsetTime) {
10782
+ return this._atTimeOffsetTime(time);
10783
+ } else {
10784
+ throw new IllegalArgumentException('time must be an instance of LocalTime or OffsetTime' + (time && time.constructor && time.constructor.name ? ', but is ' + time.constructor.name : ''));
10785
+ }
9705
10786
  };
9706
10787
 
9707
10788
  _proto.atTime4 = function atTime4(hour, minute, second, nanoOfSecond) {
@@ -9716,6 +10797,10 @@ var LocalDate = function (_ChronoLocalDate) {
9716
10797
  return this.atTime1(LocalTime.of(hour, minute, second, nanoOfSecond));
9717
10798
  };
9718
10799
 
10800
+ _proto._atTimeOffsetTime = function _atTimeOffsetTime(time) {
10801
+ return OffsetDateTime.of(LocalDateTime.of(this, time.toLocalTime()), time.offset());
10802
+ };
10803
+
9719
10804
  _proto.atStartOfDay = function atStartOfDay(zone) {
9720
10805
  if (zone != null) {
9721
10806
  return this.atStartOfDayWithZone(zone);
@@ -9864,7 +10949,7 @@ var LocalDate = function (_ChronoLocalDate) {
9864
10949
 
9865
10950
  return LocalDate;
9866
10951
  }(ChronoLocalDate);
9867
- function _init$g() {
10952
+ function _init$i() {
9868
10953
  LocalDate.MIN = LocalDate.of(YearConstants.MIN_VALUE, 1, 1);
9869
10954
  LocalDate.MAX = LocalDate.of(YearConstants.MAX_VALUE, 12, 31);
9870
10955
  LocalDate.EPOCH_0 = LocalDate.ofEpochDay(0);
@@ -9873,11 +10958,11 @@ function _init$g() {
9873
10958
  });
9874
10959
  }
9875
10960
 
9876
- var ChronoLocalDateTime = function (_Temporal) {
9877
- _inheritsLoose(ChronoLocalDateTime, _Temporal);
10961
+ var ChronoLocalDateTime = function (_DefaultInterfaceTemp) {
10962
+ _inheritsLoose(ChronoLocalDateTime, _DefaultInterfaceTemp);
9878
10963
 
9879
10964
  function ChronoLocalDateTime() {
9880
- return _Temporal.apply(this, arguments) || this;
10965
+ return _DefaultInterfaceTemp.apply(this, arguments) || this;
9881
10966
  }
9882
10967
 
9883
10968
  var _proto = ChronoLocalDateTime.prototype;
@@ -9899,7 +10984,7 @@ var ChronoLocalDateTime = function (_Temporal) {
9899
10984
  return null;
9900
10985
  }
9901
10986
 
9902
- return _Temporal.prototype.query.call(this, _query);
10987
+ return _DefaultInterfaceTemp.prototype.query.call(this, _query);
9903
10988
  };
9904
10989
 
9905
10990
  _proto.adjustInto = function adjustInto(temporal) {
@@ -9920,7 +11005,7 @@ var ChronoLocalDateTime = function (_Temporal) {
9920
11005
  };
9921
11006
 
9922
11007
  return ChronoLocalDateTime;
9923
- }(Temporal);
11008
+ }(DefaultInterfaceTemporal);
9924
11009
 
9925
11010
  var LocalDateTime = function (_ChronoLocalDateTime) {
9926
11011
  _inheritsLoose(LocalDateTime, _ChronoLocalDateTime);
@@ -10062,7 +11147,7 @@ var LocalDateTime = function (_ChronoLocalDateTime) {
10062
11147
  var _proto = LocalDateTime.prototype;
10063
11148
 
10064
11149
  _proto._withDateTime = function _withDateTime(newDate, newTime) {
10065
- if (this._date === newDate && this._time === newTime) {
11150
+ if (this._date.equals(newDate) && this._time.equals(newTime)) {
10066
11151
  return this;
10067
11152
  }
10068
11153
 
@@ -10145,15 +11230,7 @@ var LocalDateTime = function (_ChronoLocalDateTime) {
10145
11230
  return this._time.nano();
10146
11231
  };
10147
11232
 
10148
- _proto.with = function _with(adjusterOrField, newValue) {
10149
- if (arguments.length === 1) {
10150
- return this.withTemporalAdjuster(adjusterOrField);
10151
- } else {
10152
- return this.with2(adjusterOrField, newValue);
10153
- }
10154
- };
10155
-
10156
- _proto.withTemporalAdjuster = function withTemporalAdjuster(adjuster) {
11233
+ _proto.withAdjuster = function withAdjuster(adjuster) {
10157
11234
  requireNonNull(adjuster, 'adjuster');
10158
11235
 
10159
11236
  if (adjuster instanceof LocalDate) {
@@ -10168,7 +11245,7 @@ var LocalDateTime = function (_ChronoLocalDateTime) {
10168
11245
  return adjuster.adjustInto(this);
10169
11246
  };
10170
11247
 
10171
- _proto.with2 = function with2(field, newValue) {
11248
+ _proto.withFieldValue = function withFieldValue(field, newValue) {
10172
11249
  requireNonNull(field, 'field');
10173
11250
 
10174
11251
  if (field instanceof ChronoField) {
@@ -10226,20 +11303,12 @@ var LocalDateTime = function (_ChronoLocalDateTime) {
10226
11303
  return this._withDateTime(this._date, this._time.truncatedTo(unit));
10227
11304
  };
10228
11305
 
10229
- _proto.plus = function plus(amount, unit) {
10230
- if (arguments.length === 1) {
10231
- return this.plusTemporalAmount(amount);
10232
- } else {
10233
- return this.plus2(amount, unit);
10234
- }
10235
- };
10236
-
10237
- _proto.plusTemporalAmount = function plusTemporalAmount(amount) {
11306
+ _proto.plusAmount = function plusAmount(amount) {
10238
11307
  requireNonNull(amount, 'amount');
10239
11308
  return amount.addTo(this);
10240
11309
  };
10241
11310
 
10242
- _proto.plus2 = function plus2(amountToAdd, unit) {
11311
+ _proto.plusAmountUnit = function plusAmountUnit(amountToAdd, unit) {
10243
11312
  requireNonNull(unit, 'unit');
10244
11313
 
10245
11314
  if (unit instanceof ChronoUnit) {
@@ -10312,22 +11381,14 @@ var LocalDateTime = function (_ChronoLocalDateTime) {
10312
11381
  return this._plusWithOverflow(this._date, 0, 0, 0, nanos, 1);
10313
11382
  };
10314
11383
 
10315
- _proto.minus = function minus(amount, unit) {
10316
- if (arguments.length === 1) {
10317
- return this.minusTemporalAmount(amount);
10318
- } else {
10319
- return this.minus2(amount, unit);
10320
- }
10321
- };
10322
-
10323
- _proto.minusTemporalAmount = function minusTemporalAmount(amount) {
11384
+ _proto.minusAmount = function minusAmount(amount) {
10324
11385
  requireNonNull(amount, 'amount');
10325
11386
  return amount.subtractFrom(this);
10326
11387
  };
10327
11388
 
10328
- _proto.minus2 = function minus2(amountToSubtract, unit) {
11389
+ _proto.minusAmountUnit = function minusAmountUnit(amountToSubtract, unit) {
10329
11390
  requireNonNull(unit, 'unit');
10330
- return this.plus2(-1 * amountToSubtract, unit);
11391
+ return this.plusAmountUnit(-1 * amountToSubtract, unit);
10331
11392
  };
10332
11393
 
10333
11394
  _proto.minusYears = function minusYears(years) {
@@ -10363,7 +11424,7 @@ var LocalDateTime = function (_ChronoLocalDateTime) {
10363
11424
  };
10364
11425
 
10365
11426
  _proto._plusWithOverflow = function _plusWithOverflow(newDate, hours, minutes, seconds, nanos, sign) {
10366
- if ((hours | minutes | seconds | nanos) === 0) {
11427
+ if (hours === 0 && minutes === 0 && seconds === 0 && nanos === 0) {
10367
11428
  return this._withDateTime(newDate, this._time);
10368
11429
  }
10369
11430
 
@@ -10463,6 +11524,10 @@ var LocalDateTime = function (_ChronoLocalDateTime) {
10463
11524
  return unit.between(this, end);
10464
11525
  };
10465
11526
 
11527
+ _proto.atOffset = function atOffset(offset) {
11528
+ return OffsetDateTime.of(this, offset);
11529
+ };
11530
+
10466
11531
  _proto.atZone = function atZone(zone) {
10467
11532
  return ZonedDateTime.of(this, zone);
10468
11533
  };
@@ -10534,7 +11599,7 @@ var LocalDateTime = function (_ChronoLocalDateTime) {
10534
11599
 
10535
11600
  return LocalDateTime;
10536
11601
  }(ChronoLocalDateTime);
10537
- function _init$h() {
11602
+ function _init$j() {
10538
11603
  LocalDateTime.MIN = LocalDateTime.of(LocalDate.MIN, LocalTime.MIN);
10539
11604
  LocalDateTime.MAX = LocalDateTime.of(LocalDate.MAX, LocalTime.MAX);
10540
11605
  LocalDateTime.FROM = createTemporalQuery('LocalDateTime.FROM', function (temporal) {
@@ -10668,7 +11733,7 @@ var LocalTime = function (_Temporal) {
10668
11733
 
10669
11734
  LocalTime._validate(_hour, _minute, _second, _nanoOfSecond);
10670
11735
 
10671
- if ((_minute | _second | _nanoOfSecond) === 0) {
11736
+ if (_minute === 0 && _second === 0 && _nanoOfSecond === 0) {
10672
11737
  if (!LocalTime.HOURS[_hour]) {
10673
11738
  _this._hour = _hour;
10674
11739
  _this._minute = _minute;
@@ -10795,15 +11860,7 @@ var LocalTime = function (_Temporal) {
10795
11860
  return this._nano;
10796
11861
  };
10797
11862
 
10798
- _proto.with = function _with(adjusterOrField, newValue) {
10799
- if (arguments.length < 2) {
10800
- return this.withTemporalAdjuster(adjusterOrField);
10801
- } else {
10802
- return this.with2(adjusterOrField, newValue);
10803
- }
10804
- };
10805
-
10806
- _proto.withTemporalAdjuster = function withTemporalAdjuster(adjuster) {
11863
+ _proto.withAdjuster = function withAdjuster(adjuster) {
10807
11864
  requireNonNull(adjuster, 'adjuster');
10808
11865
 
10809
11866
  if (adjuster instanceof LocalTime) {
@@ -10814,7 +11871,7 @@ var LocalTime = function (_Temporal) {
10814
11871
  return adjuster.adjustInto(this);
10815
11872
  };
10816
11873
 
10817
- _proto.with2 = function with2(field, newValue) {
11874
+ _proto.withFieldValue = function withFieldValue(field, newValue) {
10818
11875
  requireNonNull(field, 'field');
10819
11876
  requireInstance(field, TemporalField, 'field');
10820
11877
 
@@ -10945,20 +12002,12 @@ var LocalTime = function (_Temporal) {
10945
12002
  return LocalTime.ofNanoOfDay(MathUtil.intDiv(nod, dur) * dur);
10946
12003
  };
10947
12004
 
10948
- _proto.plus = function plus(amount, unit) {
10949
- if (arguments.length < 2) {
10950
- return this.plus1(amount);
10951
- } else {
10952
- return this.plus2(amount, unit);
10953
- }
10954
- };
10955
-
10956
- _proto.plus1 = function plus1(amount) {
12005
+ _proto.plusAmount = function plusAmount(amount) {
10957
12006
  requireNonNull(amount, 'amount');
10958
12007
  return amount.addTo(this);
10959
12008
  };
10960
12009
 
10961
- _proto.plus2 = function plus2(amountToAdd, unit) {
12010
+ _proto.plusAmountUnit = function plusAmountUnit(amountToAdd, unit) {
10962
12011
  requireNonNull(unit, 'unit');
10963
12012
 
10964
12013
  if (unit instanceof ChronoUnit) {
@@ -11054,22 +12103,14 @@ var LocalTime = function (_Temporal) {
11054
12103
  return new LocalTime(newHour, newMinute, newSecond, newNano);
11055
12104
  };
11056
12105
 
11057
- _proto.minus = function minus(amount, unit) {
11058
- if (arguments.length < 2) {
11059
- return this.minus1(amount);
11060
- } else {
11061
- return this.minus2(amount, unit);
11062
- }
11063
- };
11064
-
11065
- _proto.minus1 = function minus1(amount) {
12106
+ _proto.minusAmount = function minusAmount(amount) {
11066
12107
  requireNonNull(amount, 'amount');
11067
12108
  return amount.subtractFrom(this);
11068
12109
  };
11069
12110
 
11070
- _proto.minus2 = function minus2(amountToSubtract, unit) {
12111
+ _proto.minusAmountUnit = function minusAmountUnit(amountToSubtract, unit) {
11071
12112
  requireNonNull(unit, 'unit');
11072
- return this.plus2(-1 * amountToSubtract, unit);
12113
+ return this.plusAmountUnit(-1 * amountToSubtract, unit);
11073
12114
  };
11074
12115
 
11075
12116
  _proto.minusHours = function minusHours(hoursToSubtract) {
@@ -11251,7 +12292,7 @@ var LocalTime = function (_Temporal) {
11251
12292
 
11252
12293
  return LocalTime;
11253
12294
  }(Temporal);
11254
- function _init$i() {
12295
+ function _init$k() {
11255
12296
  LocalTime.HOURS = [];
11256
12297
 
11257
12298
  for (var hour = 0; hour < 24; hour++) {
@@ -11403,20 +12444,12 @@ var Instant = function (_Temporal) {
11403
12444
  return this._nanos;
11404
12445
  };
11405
12446
 
11406
- _proto.with = function _with(adjusterOrField, newValue) {
11407
- if (arguments.length === 1) {
11408
- return this.withTemporalAdjuster(adjusterOrField);
11409
- } else {
11410
- return this.with2(adjusterOrField, newValue);
11411
- }
11412
- };
11413
-
11414
- _proto.withTemporalAdjuster = function withTemporalAdjuster(adjuster) {
12447
+ _proto.withAdjuster = function withAdjuster(adjuster) {
11415
12448
  requireNonNull(adjuster, 'adjuster');
11416
12449
  return adjuster.adjustInto(this);
11417
12450
  };
11418
12451
 
11419
- _proto.with2 = function with2(field, newValue) {
12452
+ _proto.withFieldValue = function withFieldValue(field, newValue) {
11420
12453
  requireNonNull(field, 'field');
11421
12454
 
11422
12455
  if (field instanceof ChronoField) {
@@ -11474,20 +12507,12 @@ var Instant = function (_Temporal) {
11474
12507
  return this.plusNanos(result - nod);
11475
12508
  };
11476
12509
 
11477
- _proto.plus = function plus(amount, unit) {
11478
- if (arguments.length === 1) {
11479
- return this.plus1(amount);
11480
- } else {
11481
- return this.plus2(amount, unit);
11482
- }
11483
- };
11484
-
11485
- _proto.plus1 = function plus1(amount) {
12510
+ _proto.plusAmount = function plusAmount(amount) {
11486
12511
  requireNonNull(amount, 'amount');
11487
12512
  return amount.addTo(this);
11488
12513
  };
11489
12514
 
11490
- _proto.plus2 = function plus2(amountToAdd, unit) {
12515
+ _proto.plusAmountUnit = function plusAmountUnit(amountToAdd, unit) {
11491
12516
  requireNonNull(amountToAdd, 'amountToAdd');
11492
12517
  requireNonNull(unit, 'unit');
11493
12518
  requireInstance(unit, TemporalUnit);
@@ -11538,7 +12563,7 @@ var Instant = function (_Temporal) {
11538
12563
  };
11539
12564
 
11540
12565
  _proto._plus = function _plus(secondsToAdd, nanosToAdd) {
11541
- if ((secondsToAdd | nanosToAdd) === 0) {
12566
+ if (secondsToAdd === 0 && nanosToAdd === 0) {
11542
12567
  return this;
11543
12568
  }
11544
12569
 
@@ -11548,21 +12573,13 @@ var Instant = function (_Temporal) {
11548
12573
  return Instant.ofEpochSecond(epochSec, nanoAdjustment);
11549
12574
  };
11550
12575
 
11551
- _proto.minus = function minus(amount, unit) {
11552
- if (arguments.length === 1) {
11553
- return this.minus1(amount);
11554
- } else {
11555
- return this.minus2(amount, unit);
11556
- }
11557
- };
11558
-
11559
- _proto.minus1 = function minus1(amount) {
12576
+ _proto.minusAmount = function minusAmount(amount) {
11560
12577
  requireNonNull(amount, 'amount');
11561
12578
  return amount.subtractFrom(this);
11562
12579
  };
11563
12580
 
11564
- _proto.minus2 = function minus2(amountToSubtract, unit) {
11565
- return this.plus2(-1 * amountToSubtract, unit);
12581
+ _proto.minusAmountUnit = function minusAmountUnit(amountToSubtract, unit) {
12582
+ return this.plusAmountUnit(-1 * amountToSubtract, unit);
11566
12583
  };
11567
12584
 
11568
12585
  _proto.minusSeconds = function minusSeconds(secondsToSubtract) {
@@ -11653,6 +12670,10 @@ var Instant = function (_Temporal) {
11653
12670
  return secsDiff;
11654
12671
  };
11655
12672
 
12673
+ _proto.atOffset = function atOffset(offset) {
12674
+ return OffsetDateTime.ofInstant(this, offset);
12675
+ };
12676
+
11656
12677
  _proto.atZone = function atZone(zone) {
11657
12678
  return ZonedDateTime.ofInstant(this, zone);
11658
12679
  };
@@ -11708,7 +12729,7 @@ var Instant = function (_Temporal) {
11708
12729
 
11709
12730
  return Instant;
11710
12731
  }(Temporal);
11711
- function _init$j() {
12732
+ function _init$l() {
11712
12733
  Instant.MIN_SECONDS = -31619119219200;
11713
12734
  Instant.MAX_SECONDS = 31494816403199;
11714
12735
  Instant.EPOCH = new Instant(0, 0);
@@ -12030,7 +13051,7 @@ var ZoneOffsetTransition = function () {
12030
13051
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
12031
13052
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
12032
13053
  */
12033
- function _init$k() {
13054
+ function _init$m() {
12034
13055
  TemporalQueries.ZONE_ID = createTemporalQuery('ZONE_ID', function (temporal) {
12035
13056
  return temporal.query(TemporalQueries.ZONE_ID);
12036
13057
  });
@@ -12284,7 +13305,7 @@ var ZoneIdFactory = function () {
12284
13305
  return ZoneIdFactory;
12285
13306
  }();
12286
13307
  var SYSTEM_DEFAULT_ZONE_ID_INSTANCE = null;
12287
- function _init$l() {
13308
+ function _init$n() {
12288
13309
  SYSTEM_DEFAULT_ZONE_ID_INSTANCE = new SystemDefaultZoneId();
12289
13310
  ZoneId.systemDefault = ZoneIdFactory.systemDefault;
12290
13311
  ZoneId.getAvailableZoneIds = ZoneIdFactory.getAvailableZoneIds;
@@ -12312,24 +13333,26 @@ function init() {
12312
13333
  _init();
12313
13334
  _init$2();
12314
13335
  _init$3();
12315
- _init$i();
12316
- _init$8();
12317
13336
  _init$k();
13337
+ _init$8();
13338
+ _init$m();
12318
13339
  _init$4();
13340
+ _init$l();
13341
+ _init$i();
12319
13342
  _init$j();
12320
- _init$g();
12321
- _init$h();
12322
13343
  _init$d();
12323
13344
  _init$5();
12324
13345
  _init$c();
12325
13346
  _init$b();
12326
13347
  _init$6();
12327
13348
  _init$7();
12328
- _init$f();
12329
- _init$l();
13349
+ _init$g();
13350
+ _init$n();
12330
13351
  _init$e();
12331
13352
  _init$a();
12332
13353
  _init$9();
13354
+ _init$h();
13355
+ _init$f();
12333
13356
  }
12334
13357
 
12335
13358
  init();
@@ -12496,6 +13519,8 @@ var jsJodaExports = {
12496
13519
  LocalDate: LocalDate,
12497
13520
  LocalTime: LocalTime,
12498
13521
  LocalDateTime: LocalDateTime,
13522
+ OffsetTime: OffsetTime,
13523
+ OffsetDateTime: OffsetDateTime,
12499
13524
  Month: Month,
12500
13525
  MonthDay: MonthDay,
12501
13526
  Period: Period,
@@ -12536,4 +13561,4 @@ var jsJodaExports = {
12536
13561
  var use = bindUse(jsJodaExports);
12537
13562
  jsJodaExports.use = use;
12538
13563
 
12539
- export { ArithmeticException, ChronoField, ChronoLocalDate, ChronoLocalDateTime, ChronoUnit, ChronoZonedDateTime, Clock, DateTimeException, DateTimeFormatter, DateTimeFormatterBuilder, DateTimeParseException, DayOfWeek, DecimalStyle, Duration, IllegalArgumentException, IllegalStateException, Instant, IsoChronology, IsoFields, LocalDate, LocalDateTime, LocalTime, Month, MonthDay, NullPointerException, Period, ResolverStyle, SignStyle, Temporal, TemporalAccessor, TemporalAdjuster, TemporalAdjusters, TemporalAmount, TemporalField, TemporalQueries, TemporalQuery, TemporalUnit, TextStyle, UnsupportedTemporalTypeException, ValueRange, Year, YearConstants, YearMonth, ZoneId, ZoneOffset, ZoneOffsetTransition, ZoneRegion, ZoneRules, ZoneRulesProvider, ZonedDateTime, _, convert, nativeJs, use };
13564
+ export { ArithmeticException, ChronoField, ChronoLocalDate, ChronoLocalDateTime, ChronoUnit, ChronoZonedDateTime, Clock, DateTimeException, DateTimeFormatter, DateTimeFormatterBuilder, DateTimeParseException, DayOfWeek, DecimalStyle, Duration, IllegalArgumentException, IllegalStateException, Instant, IsoChronology, IsoFields, LocalDate, LocalDateTime, LocalTime, Month, MonthDay, NullPointerException, OffsetDateTime, OffsetTime, Period, ResolverStyle, SignStyle, Temporal, TemporalAccessor, TemporalAdjuster, TemporalAdjusters, TemporalAmount, TemporalField, TemporalQueries, TemporalQuery, TemporalUnit, TextStyle, UnsupportedTemporalTypeException, ValueRange, Year, YearConstants, YearMonth, ZoneId, ZoneOffset, ZoneOffsetTransition, ZoneRegion, ZoneRules, ZoneRulesProvider, ZonedDateTime, _, convert, nativeJs, use };