@js-joda/core 5.6.3 → 5.6.4

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 - 5.6.3
1
+ //! @version @js-joda/core - 5.6.4
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)
@@ -122,10 +122,10 @@ function abstractMethodFail(methodName) {
122
122
 
123
123
  var assert$1 = /*#__PURE__*/Object.freeze({
124
124
  __proto__: null,
125
+ abstractMethodFail: abstractMethodFail,
125
126
  assert: assert,
126
- requireNonNull: requireNonNull,
127
127
  requireInstance: requireInstance,
128
- abstractMethodFail: abstractMethodFail
128
+ requireNonNull: requireNonNull
129
129
  });
130
130
 
131
131
  /**
@@ -230,7 +230,11 @@ var MathUtil = function () {
230
230
  if (isNaN(value)) {
231
231
  throw new ArithmeticException('Invalid int value, using NaN as argument');
232
232
  }
233
- if (value % 1 !== 0) {
233
+ if (Number.isInteger) {
234
+ if (!Number.isInteger(Number(value))) {
235
+ throw new ArithmeticException("Invalid value: '" + value + "' is a float");
236
+ }
237
+ } else if (value % 1 !== 0) {
234
238
  throw new ArithmeticException("Invalid value: '" + value + "' is a float");
235
239
  }
236
240
  if (value > MAX_SAFE_INTEGER || value < MIN_SAFE_INTEGER) {
@@ -304,6 +308,7 @@ MathUtil.MIN_SAFE_INTEGER = MIN_SAFE_INTEGER;
304
308
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
305
309
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
306
310
  */
311
+
307
312
  var TemporalAmount = function () {
308
313
  function TemporalAmount() {}
309
314
  var _proto = TemporalAmount.prototype;
@@ -335,6 +340,7 @@ if (typeof Symbol !== 'undefined' && Symbol.toPrimitive) {
335
340
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
336
341
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
337
342
  */
343
+
338
344
  var TemporalUnit = function () {
339
345
  function TemporalUnit() {}
340
346
  var _proto = TemporalUnit.prototype;
@@ -929,6 +935,7 @@ var TemporalField = function () {
929
935
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
930
936
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
931
937
  */
938
+
932
939
  var ValueRange = function () {
933
940
  function ValueRange(minSmallest, minLargest, maxSmallest, maxLargest) {
934
941
  assert(!(minSmallest > minLargest), "Smallest minimum value '" + minSmallest + "' must be less than largest minimum value '" + minLargest + "'", IllegalArgumentException);
@@ -1152,6 +1159,7 @@ function _init$k() {
1152
1159
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
1153
1160
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
1154
1161
  */
1162
+
1155
1163
  var TemporalAccessor = function () {
1156
1164
  function TemporalAccessor() {}
1157
1165
  var _proto = TemporalAccessor.prototype;
@@ -2071,6 +2079,7 @@ var ChronoLocalDate = function (_Temporal) {
2071
2079
  * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
2072
2080
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
2073
2081
  */
2082
+
2074
2083
  var StringUtil = function () {
2075
2084
  function StringUtil() {}
2076
2085
  StringUtil.startsWith = function startsWith(text, pattern) {
@@ -2097,6 +2106,7 @@ var StringUtil = function () {
2097
2106
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
2098
2107
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
2099
2108
  */
2109
+
2100
2110
  var ZoneId = function () {
2101
2111
  function ZoneId() {}
2102
2112
  ZoneId.systemDefault = function systemDefault() {
@@ -3004,6 +3014,7 @@ var Parsed = function (_Temporal) {
3004
3014
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
3005
3015
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
3006
3016
  */
3017
+
3007
3018
  var DateTimePrintContext = function () {
3008
3019
  function DateTimePrintContext(temporal, localeOrFormatter, symbols) {
3009
3020
  if (arguments.length === 2 && arguments[1] instanceof DateTimeFormatter) {
@@ -3639,6 +3650,7 @@ TextStyle.NARROW_STANDALONE = new TextStyle('NARROW_STANDALONE');
3639
3650
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
3640
3651
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
3641
3652
  */
3653
+
3642
3654
  var CharLiteralPrinterParser = function () {
3643
3655
  function CharLiteralPrinterParser(literal) {
3644
3656
  if (literal.length > 1) {
@@ -3752,6 +3764,7 @@ var CharLiteralPrinterParser = function () {
3752
3764
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
3753
3765
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
3754
3766
  */
3767
+
3755
3768
  var FractionPrinterParser = function () {
3756
3769
  function FractionPrinterParser(field, minWidth, maxWidth, decimalPoint) {
3757
3770
  requireNonNull(field, 'field');
@@ -4135,6 +4148,7 @@ var ReducedPrinterParser = function (_NumberPrinterParser) {
4135
4148
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
4136
4149
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
4137
4150
  */
4151
+
4138
4152
  var PATTERNS = ['+HH', '+HHmm', '+HH:mm', '+HHMM', '+HH:MM', '+HHMMss', '+HH:MM:ss', '+HHMMSS', '+HH:MM:SS'];
4139
4153
  var OffsetIdPrinterParser = function () {
4140
4154
  function OffsetIdPrinterParser(noOffsetText, pattern) {
@@ -4253,6 +4267,7 @@ OffsetIdPrinterParser.PATTERNS = PATTERNS;
4253
4267
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
4254
4268
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
4255
4269
  */
4270
+
4256
4271
  var PadPrinterParserDecorator = function () {
4257
4272
  function PadPrinterParserDecorator(printerParser, padWidth, padChar) {
4258
4273
  this._printerParser = printerParser;
@@ -4356,6 +4371,7 @@ SettingsParser.LENIENT = new SettingsParser('LENIENT');
4356
4371
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
4357
4372
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
4358
4373
  */
4374
+
4359
4375
  var StringLiteralPrinterParser = function () {
4360
4376
  function StringLiteralPrinterParser(literal) {
4361
4377
  this._literal = literal;
@@ -4385,6 +4401,7 @@ var StringLiteralPrinterParser = function () {
4385
4401
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
4386
4402
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
4387
4403
  */
4404
+
4388
4405
  var ZoneRulesProvider = function () {
4389
4406
  function ZoneRulesProvider() {}
4390
4407
  ZoneRulesProvider.getRules = function getRules(zoneId) {
@@ -4424,6 +4441,7 @@ var ZoneRegion = function (_ZoneId) {
4424
4441
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
4425
4442
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
4426
4443
  */
4444
+
4427
4445
  var ZoneIdPrinterParser = function () {
4428
4446
  function ZoneIdPrinterParser(query, description) {
4429
4447
  this.query = query;
@@ -4576,6 +4594,7 @@ var zoneIdTree = new ZoneIdTree([]);
4576
4594
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
4577
4595
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
4578
4596
  */
4597
+
4579
4598
  var MAX_WIDTH = 15;
4580
4599
  var DateTimeFormatterBuilder = function () {
4581
4600
  function DateTimeFormatterBuilder() {
@@ -5332,6 +5351,7 @@ function _init$e() {
5332
5351
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
5333
5352
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
5334
5353
  */
5354
+
5335
5355
  var DateTimeFormatter = function () {
5336
5356
  DateTimeFormatter.parsedExcessDays = function parsedExcessDays() {
5337
5357
  return DateTimeFormatter.PARSED_EXCESS_DAYS;
@@ -6329,6 +6349,7 @@ function _init$a() {
6329
6349
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
6330
6350
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
6331
6351
  */
6352
+
6332
6353
  var TemporalAdjuster = function () {
6333
6354
  function TemporalAdjuster() {}
6334
6355
  var _proto = TemporalAdjuster.prototype;
@@ -9993,6 +10014,7 @@ var OffsetClock = function (_Clock3) {
9993
10014
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
9994
10015
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
9995
10016
  */
10017
+
9996
10018
  var ZoneOffsetTransition = function () {
9997
10019
  ZoneOffsetTransition.of = function of(transition, offsetBefore, offsetAfter) {
9998
10020
  return new ZoneOffsetTransition(transition, offsetBefore, offsetAfter);
@@ -10083,6 +10105,7 @@ var ZoneOffsetTransition = function () {
10083
10105
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
10084
10106
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
10085
10107
  */
10108
+
10086
10109
  function _init$1() {
10087
10110
  TemporalQueries.ZONE_ID = createTemporalQuery('ZONE_ID', function (temporal) {
10088
10111
  return temporal.query(TemporalQueries.ZONE_ID);
@@ -10216,6 +10239,7 @@ var SystemDefaultZoneId = function (_ZoneId) {
10216
10239
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
10217
10240
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
10218
10241
  */
10242
+
10219
10243
  var ZoneIdFactory = function () {
10220
10244
  function ZoneIdFactory() {}
10221
10245
  ZoneIdFactory.systemDefault = function systemDefault() {
@@ -10298,6 +10322,7 @@ function _init() {
10298
10322
  * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
10299
10323
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
10300
10324
  */
10325
+
10301
10326
  var isInit = false;
10302
10327
  function init() {
10303
10328
  if (isInit) {
@@ -10335,6 +10360,7 @@ init();
10335
10360
  * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
10336
10361
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
10337
10362
  */
10363
+
10338
10364
  var ToNativeJsConverter = function () {
10339
10365
  function ToNativeJsConverter(temporal, zone) {
10340
10366
  var zonedDateTime;
@@ -10375,6 +10401,7 @@ function convert(temporal, zone) {
10375
10401
  * @copyright (c) 2015-present, Philipp Thürwächter, Pattrick Hüper & js-joda contributors
10376
10402
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
10377
10403
  */
10404
+
10378
10405
  function nativeJs(date, zone) {
10379
10406
  if (zone === void 0) {
10380
10407
  zone = ZoneId.systemDefault();
@@ -10404,6 +10431,7 @@ function bindUse(jsJoda) {
10404
10431
  * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
10405
10432
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
10406
10433
  */
10434
+
10407
10435
  var _ = {
10408
10436
  assert: assert$1,
10409
10437
  DateTimeBuilder: DateTimeBuilder,