@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)
@@ -120,10 +120,10 @@ function abstractMethodFail(methodName) {
120
120
 
121
121
  var assert$1 = /*#__PURE__*/Object.freeze({
122
122
  __proto__: null,
123
+ abstractMethodFail: abstractMethodFail,
123
124
  assert: assert,
124
- requireNonNull: requireNonNull,
125
125
  requireInstance: requireInstance,
126
- abstractMethodFail: abstractMethodFail
126
+ requireNonNull: requireNonNull
127
127
  });
128
128
 
129
129
  /**
@@ -228,7 +228,11 @@ var MathUtil = function () {
228
228
  if (isNaN(value)) {
229
229
  throw new ArithmeticException('Invalid int value, using NaN as argument');
230
230
  }
231
- if (value % 1 !== 0) {
231
+ if (Number.isInteger) {
232
+ if (!Number.isInteger(Number(value))) {
233
+ throw new ArithmeticException("Invalid value: '" + value + "' is a float");
234
+ }
235
+ } else if (value % 1 !== 0) {
232
236
  throw new ArithmeticException("Invalid value: '" + value + "' is a float");
233
237
  }
234
238
  if (value > MAX_SAFE_INTEGER || value < MIN_SAFE_INTEGER) {
@@ -302,6 +306,7 @@ MathUtil.MIN_SAFE_INTEGER = MIN_SAFE_INTEGER;
302
306
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
303
307
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
304
308
  */
309
+
305
310
  var TemporalAmount = function () {
306
311
  function TemporalAmount() {}
307
312
  var _proto = TemporalAmount.prototype;
@@ -333,6 +338,7 @@ if (typeof Symbol !== 'undefined' && Symbol.toPrimitive) {
333
338
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
334
339
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
335
340
  */
341
+
336
342
  var TemporalUnit = function () {
337
343
  function TemporalUnit() {}
338
344
  var _proto = TemporalUnit.prototype;
@@ -927,6 +933,7 @@ var TemporalField = function () {
927
933
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
928
934
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
929
935
  */
936
+
930
937
  var ValueRange = function () {
931
938
  function ValueRange(minSmallest, minLargest, maxSmallest, maxLargest) {
932
939
  assert(!(minSmallest > minLargest), "Smallest minimum value '" + minSmallest + "' must be less than largest minimum value '" + minLargest + "'", IllegalArgumentException);
@@ -1150,6 +1157,7 @@ function _init$k() {
1150
1157
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
1151
1158
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
1152
1159
  */
1160
+
1153
1161
  var TemporalAccessor = function () {
1154
1162
  function TemporalAccessor() {}
1155
1163
  var _proto = TemporalAccessor.prototype;
@@ -2069,6 +2077,7 @@ var ChronoLocalDate = function (_Temporal) {
2069
2077
  * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
2070
2078
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
2071
2079
  */
2080
+
2072
2081
  var StringUtil = function () {
2073
2082
  function StringUtil() {}
2074
2083
  StringUtil.startsWith = function startsWith(text, pattern) {
@@ -2095,6 +2104,7 @@ var StringUtil = function () {
2095
2104
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
2096
2105
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
2097
2106
  */
2107
+
2098
2108
  var ZoneId = function () {
2099
2109
  function ZoneId() {}
2100
2110
  ZoneId.systemDefault = function systemDefault() {
@@ -3002,6 +3012,7 @@ var Parsed = function (_Temporal) {
3002
3012
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
3003
3013
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
3004
3014
  */
3015
+
3005
3016
  var DateTimePrintContext = function () {
3006
3017
  function DateTimePrintContext(temporal, localeOrFormatter, symbols) {
3007
3018
  if (arguments.length === 2 && arguments[1] instanceof DateTimeFormatter) {
@@ -3637,6 +3648,7 @@ TextStyle.NARROW_STANDALONE = new TextStyle('NARROW_STANDALONE');
3637
3648
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
3638
3649
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
3639
3650
  */
3651
+
3640
3652
  var CharLiteralPrinterParser = function () {
3641
3653
  function CharLiteralPrinterParser(literal) {
3642
3654
  if (literal.length > 1) {
@@ -3750,6 +3762,7 @@ var CharLiteralPrinterParser = function () {
3750
3762
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
3751
3763
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
3752
3764
  */
3765
+
3753
3766
  var FractionPrinterParser = function () {
3754
3767
  function FractionPrinterParser(field, minWidth, maxWidth, decimalPoint) {
3755
3768
  requireNonNull(field, 'field');
@@ -4133,6 +4146,7 @@ var ReducedPrinterParser = function (_NumberPrinterParser) {
4133
4146
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
4134
4147
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
4135
4148
  */
4149
+
4136
4150
  var PATTERNS = ['+HH', '+HHmm', '+HH:mm', '+HHMM', '+HH:MM', '+HHMMss', '+HH:MM:ss', '+HHMMSS', '+HH:MM:SS'];
4137
4151
  var OffsetIdPrinterParser = function () {
4138
4152
  function OffsetIdPrinterParser(noOffsetText, pattern) {
@@ -4251,6 +4265,7 @@ OffsetIdPrinterParser.PATTERNS = PATTERNS;
4251
4265
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
4252
4266
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
4253
4267
  */
4268
+
4254
4269
  var PadPrinterParserDecorator = function () {
4255
4270
  function PadPrinterParserDecorator(printerParser, padWidth, padChar) {
4256
4271
  this._printerParser = printerParser;
@@ -4354,6 +4369,7 @@ SettingsParser.LENIENT = new SettingsParser('LENIENT');
4354
4369
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
4355
4370
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
4356
4371
  */
4372
+
4357
4373
  var StringLiteralPrinterParser = function () {
4358
4374
  function StringLiteralPrinterParser(literal) {
4359
4375
  this._literal = literal;
@@ -4383,6 +4399,7 @@ var StringLiteralPrinterParser = function () {
4383
4399
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
4384
4400
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
4385
4401
  */
4402
+
4386
4403
  var ZoneRulesProvider = function () {
4387
4404
  function ZoneRulesProvider() {}
4388
4405
  ZoneRulesProvider.getRules = function getRules(zoneId) {
@@ -4422,6 +4439,7 @@ var ZoneRegion = function (_ZoneId) {
4422
4439
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
4423
4440
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
4424
4441
  */
4442
+
4425
4443
  var ZoneIdPrinterParser = function () {
4426
4444
  function ZoneIdPrinterParser(query, description) {
4427
4445
  this.query = query;
@@ -4574,6 +4592,7 @@ var zoneIdTree = new ZoneIdTree([]);
4574
4592
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
4575
4593
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
4576
4594
  */
4595
+
4577
4596
  var MAX_WIDTH = 15;
4578
4597
  var DateTimeFormatterBuilder = function () {
4579
4598
  function DateTimeFormatterBuilder() {
@@ -5330,6 +5349,7 @@ function _init$e() {
5330
5349
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
5331
5350
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
5332
5351
  */
5352
+
5333
5353
  var DateTimeFormatter = function () {
5334
5354
  DateTimeFormatter.parsedExcessDays = function parsedExcessDays() {
5335
5355
  return DateTimeFormatter.PARSED_EXCESS_DAYS;
@@ -6327,6 +6347,7 @@ function _init$a() {
6327
6347
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
6328
6348
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
6329
6349
  */
6350
+
6330
6351
  var TemporalAdjuster = function () {
6331
6352
  function TemporalAdjuster() {}
6332
6353
  var _proto = TemporalAdjuster.prototype;
@@ -9991,6 +10012,7 @@ var OffsetClock = function (_Clock3) {
9991
10012
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
9992
10013
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
9993
10014
  */
10015
+
9994
10016
  var ZoneOffsetTransition = function () {
9995
10017
  ZoneOffsetTransition.of = function of(transition, offsetBefore, offsetAfter) {
9996
10018
  return new ZoneOffsetTransition(transition, offsetBefore, offsetAfter);
@@ -10081,6 +10103,7 @@ var ZoneOffsetTransition = function () {
10081
10103
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
10082
10104
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
10083
10105
  */
10106
+
10084
10107
  function _init$1() {
10085
10108
  TemporalQueries.ZONE_ID = createTemporalQuery('ZONE_ID', function (temporal) {
10086
10109
  return temporal.query(TemporalQueries.ZONE_ID);
@@ -10214,6 +10237,7 @@ var SystemDefaultZoneId = function (_ZoneId) {
10214
10237
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
10215
10238
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
10216
10239
  */
10240
+
10217
10241
  var ZoneIdFactory = function () {
10218
10242
  function ZoneIdFactory() {}
10219
10243
  ZoneIdFactory.systemDefault = function systemDefault() {
@@ -10296,6 +10320,7 @@ function _init() {
10296
10320
  * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
10297
10321
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
10298
10322
  */
10323
+
10299
10324
  var isInit = false;
10300
10325
  function init() {
10301
10326
  if (isInit) {
@@ -10333,6 +10358,7 @@ init();
10333
10358
  * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
10334
10359
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
10335
10360
  */
10361
+
10336
10362
  var ToNativeJsConverter = function () {
10337
10363
  function ToNativeJsConverter(temporal, zone) {
10338
10364
  var zonedDateTime;
@@ -10373,6 +10399,7 @@ function convert(temporal, zone) {
10373
10399
  * @copyright (c) 2015-present, Philipp Thürwächter, Pattrick Hüper & js-joda contributors
10374
10400
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
10375
10401
  */
10402
+
10376
10403
  function nativeJs(date, zone) {
10377
10404
  if (zone === void 0) {
10378
10405
  zone = ZoneId.systemDefault();
@@ -10402,6 +10429,7 @@ function bindUse(jsJoda) {
10402
10429
  * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
10403
10430
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
10404
10431
  */
10432
+
10405
10433
  var _ = {
10406
10434
  assert: assert$1,
10407
10435
  DateTimeBuilder: DateTimeBuilder,