@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.
- package/dist/js-joda.cjs.js +32 -4
- package/dist/js-joda.cjs.js.map +1 -1
- package/dist/js-joda.esm.js +32 -4
- package/dist/js-joda.esm.js.map +1 -1
- package/dist/js-joda.js +32 -4
- package/dist/js-joda.js.map +1 -1
- package/dist/js-joda.min.js +2 -2
- package/package.json +3 -4
- package/src/MathUtil.js +5 -1
package/dist/js-joda.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//! @version @js-joda/core - 5.6.
|
|
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)
|
|
@@ -126,10 +126,10 @@
|
|
|
126
126
|
|
|
127
127
|
var assert$1 = /*#__PURE__*/Object.freeze({
|
|
128
128
|
__proto__: null,
|
|
129
|
+
abstractMethodFail: abstractMethodFail,
|
|
129
130
|
assert: assert,
|
|
130
|
-
requireNonNull: requireNonNull,
|
|
131
131
|
requireInstance: requireInstance,
|
|
132
|
-
|
|
132
|
+
requireNonNull: requireNonNull
|
|
133
133
|
});
|
|
134
134
|
|
|
135
135
|
/**
|
|
@@ -234,7 +234,11 @@
|
|
|
234
234
|
if (isNaN(value)) {
|
|
235
235
|
throw new ArithmeticException('Invalid int value, using NaN as argument');
|
|
236
236
|
}
|
|
237
|
-
if (
|
|
237
|
+
if (Number.isInteger) {
|
|
238
|
+
if (!Number.isInteger(Number(value))) {
|
|
239
|
+
throw new ArithmeticException("Invalid value: '" + value + "' is a float");
|
|
240
|
+
}
|
|
241
|
+
} else if (value % 1 !== 0) {
|
|
238
242
|
throw new ArithmeticException("Invalid value: '" + value + "' is a float");
|
|
239
243
|
}
|
|
240
244
|
if (value > MAX_SAFE_INTEGER || value < MIN_SAFE_INTEGER) {
|
|
@@ -308,6 +312,7 @@
|
|
|
308
312
|
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
309
313
|
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
310
314
|
*/
|
|
315
|
+
|
|
311
316
|
var TemporalAmount = function () {
|
|
312
317
|
function TemporalAmount() {}
|
|
313
318
|
var _proto = TemporalAmount.prototype;
|
|
@@ -339,6 +344,7 @@
|
|
|
339
344
|
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
340
345
|
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
341
346
|
*/
|
|
347
|
+
|
|
342
348
|
var TemporalUnit = function () {
|
|
343
349
|
function TemporalUnit() {}
|
|
344
350
|
var _proto = TemporalUnit.prototype;
|
|
@@ -933,6 +939,7 @@
|
|
|
933
939
|
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
934
940
|
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
935
941
|
*/
|
|
942
|
+
|
|
936
943
|
var ValueRange = function () {
|
|
937
944
|
function ValueRange(minSmallest, minLargest, maxSmallest, maxLargest) {
|
|
938
945
|
assert(!(minSmallest > minLargest), "Smallest minimum value '" + minSmallest + "' must be less than largest minimum value '" + minLargest + "'", IllegalArgumentException);
|
|
@@ -1156,6 +1163,7 @@
|
|
|
1156
1163
|
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
1157
1164
|
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
1158
1165
|
*/
|
|
1166
|
+
|
|
1159
1167
|
var TemporalAccessor = function () {
|
|
1160
1168
|
function TemporalAccessor() {}
|
|
1161
1169
|
var _proto = TemporalAccessor.prototype;
|
|
@@ -2075,6 +2083,7 @@
|
|
|
2075
2083
|
* @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
|
|
2076
2084
|
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
2077
2085
|
*/
|
|
2086
|
+
|
|
2078
2087
|
var StringUtil = function () {
|
|
2079
2088
|
function StringUtil() {}
|
|
2080
2089
|
StringUtil.startsWith = function startsWith(text, pattern) {
|
|
@@ -2101,6 +2110,7 @@
|
|
|
2101
2110
|
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
2102
2111
|
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
2103
2112
|
*/
|
|
2113
|
+
|
|
2104
2114
|
var ZoneId = function () {
|
|
2105
2115
|
function ZoneId() {}
|
|
2106
2116
|
ZoneId.systemDefault = function systemDefault() {
|
|
@@ -3008,6 +3018,7 @@
|
|
|
3008
3018
|
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
3009
3019
|
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
3010
3020
|
*/
|
|
3021
|
+
|
|
3011
3022
|
var DateTimePrintContext = function () {
|
|
3012
3023
|
function DateTimePrintContext(temporal, localeOrFormatter, symbols) {
|
|
3013
3024
|
if (arguments.length === 2 && arguments[1] instanceof DateTimeFormatter) {
|
|
@@ -3643,6 +3654,7 @@
|
|
|
3643
3654
|
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
3644
3655
|
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
3645
3656
|
*/
|
|
3657
|
+
|
|
3646
3658
|
var CharLiteralPrinterParser = function () {
|
|
3647
3659
|
function CharLiteralPrinterParser(literal) {
|
|
3648
3660
|
if (literal.length > 1) {
|
|
@@ -3756,6 +3768,7 @@
|
|
|
3756
3768
|
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
3757
3769
|
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
3758
3770
|
*/
|
|
3771
|
+
|
|
3759
3772
|
var FractionPrinterParser = function () {
|
|
3760
3773
|
function FractionPrinterParser(field, minWidth, maxWidth, decimalPoint) {
|
|
3761
3774
|
requireNonNull(field, 'field');
|
|
@@ -4139,6 +4152,7 @@
|
|
|
4139
4152
|
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
4140
4153
|
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
4141
4154
|
*/
|
|
4155
|
+
|
|
4142
4156
|
var PATTERNS = ['+HH', '+HHmm', '+HH:mm', '+HHMM', '+HH:MM', '+HHMMss', '+HH:MM:ss', '+HHMMSS', '+HH:MM:SS'];
|
|
4143
4157
|
var OffsetIdPrinterParser = function () {
|
|
4144
4158
|
function OffsetIdPrinterParser(noOffsetText, pattern) {
|
|
@@ -4257,6 +4271,7 @@
|
|
|
4257
4271
|
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
4258
4272
|
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
4259
4273
|
*/
|
|
4274
|
+
|
|
4260
4275
|
var PadPrinterParserDecorator = function () {
|
|
4261
4276
|
function PadPrinterParserDecorator(printerParser, padWidth, padChar) {
|
|
4262
4277
|
this._printerParser = printerParser;
|
|
@@ -4360,6 +4375,7 @@
|
|
|
4360
4375
|
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
4361
4376
|
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
4362
4377
|
*/
|
|
4378
|
+
|
|
4363
4379
|
var StringLiteralPrinterParser = function () {
|
|
4364
4380
|
function StringLiteralPrinterParser(literal) {
|
|
4365
4381
|
this._literal = literal;
|
|
@@ -4389,6 +4405,7 @@
|
|
|
4389
4405
|
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
4390
4406
|
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
4391
4407
|
*/
|
|
4408
|
+
|
|
4392
4409
|
var ZoneRulesProvider = function () {
|
|
4393
4410
|
function ZoneRulesProvider() {}
|
|
4394
4411
|
ZoneRulesProvider.getRules = function getRules(zoneId) {
|
|
@@ -4428,6 +4445,7 @@
|
|
|
4428
4445
|
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
4429
4446
|
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
4430
4447
|
*/
|
|
4448
|
+
|
|
4431
4449
|
var ZoneIdPrinterParser = function () {
|
|
4432
4450
|
function ZoneIdPrinterParser(query, description) {
|
|
4433
4451
|
this.query = query;
|
|
@@ -4580,6 +4598,7 @@
|
|
|
4580
4598
|
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
4581
4599
|
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
4582
4600
|
*/
|
|
4601
|
+
|
|
4583
4602
|
var MAX_WIDTH = 15;
|
|
4584
4603
|
var DateTimeFormatterBuilder = function () {
|
|
4585
4604
|
function DateTimeFormatterBuilder() {
|
|
@@ -5336,6 +5355,7 @@
|
|
|
5336
5355
|
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
5337
5356
|
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
5338
5357
|
*/
|
|
5358
|
+
|
|
5339
5359
|
var DateTimeFormatter = function () {
|
|
5340
5360
|
DateTimeFormatter.parsedExcessDays = function parsedExcessDays() {
|
|
5341
5361
|
return DateTimeFormatter.PARSED_EXCESS_DAYS;
|
|
@@ -6333,6 +6353,7 @@
|
|
|
6333
6353
|
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
6334
6354
|
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
6335
6355
|
*/
|
|
6356
|
+
|
|
6336
6357
|
var TemporalAdjuster = function () {
|
|
6337
6358
|
function TemporalAdjuster() {}
|
|
6338
6359
|
var _proto = TemporalAdjuster.prototype;
|
|
@@ -9997,6 +10018,7 @@
|
|
|
9997
10018
|
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
9998
10019
|
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
9999
10020
|
*/
|
|
10021
|
+
|
|
10000
10022
|
var ZoneOffsetTransition = function () {
|
|
10001
10023
|
ZoneOffsetTransition.of = function of(transition, offsetBefore, offsetAfter) {
|
|
10002
10024
|
return new ZoneOffsetTransition(transition, offsetBefore, offsetAfter);
|
|
@@ -10087,6 +10109,7 @@
|
|
|
10087
10109
|
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
10088
10110
|
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
10089
10111
|
*/
|
|
10112
|
+
|
|
10090
10113
|
function _init$1() {
|
|
10091
10114
|
TemporalQueries.ZONE_ID = createTemporalQuery('ZONE_ID', function (temporal) {
|
|
10092
10115
|
return temporal.query(TemporalQueries.ZONE_ID);
|
|
@@ -10220,6 +10243,7 @@
|
|
|
10220
10243
|
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
10221
10244
|
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
10222
10245
|
*/
|
|
10246
|
+
|
|
10223
10247
|
var ZoneIdFactory = function () {
|
|
10224
10248
|
function ZoneIdFactory() {}
|
|
10225
10249
|
ZoneIdFactory.systemDefault = function systemDefault() {
|
|
@@ -10302,6 +10326,7 @@
|
|
|
10302
10326
|
* @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
|
|
10303
10327
|
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
10304
10328
|
*/
|
|
10329
|
+
|
|
10305
10330
|
var isInit = false;
|
|
10306
10331
|
function init() {
|
|
10307
10332
|
if (isInit) {
|
|
@@ -10339,6 +10364,7 @@
|
|
|
10339
10364
|
* @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
|
|
10340
10365
|
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
10341
10366
|
*/
|
|
10367
|
+
|
|
10342
10368
|
var ToNativeJsConverter = function () {
|
|
10343
10369
|
function ToNativeJsConverter(temporal, zone) {
|
|
10344
10370
|
var zonedDateTime;
|
|
@@ -10379,6 +10405,7 @@
|
|
|
10379
10405
|
* @copyright (c) 2015-present, Philipp Thürwächter, Pattrick Hüper & js-joda contributors
|
|
10380
10406
|
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
10381
10407
|
*/
|
|
10408
|
+
|
|
10382
10409
|
function nativeJs(date, zone) {
|
|
10383
10410
|
if (zone === void 0) {
|
|
10384
10411
|
zone = ZoneId.systemDefault();
|
|
@@ -10408,6 +10435,7 @@
|
|
|
10408
10435
|
* @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
|
|
10409
10436
|
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
10410
10437
|
*/
|
|
10438
|
+
|
|
10411
10439
|
var _ = {
|
|
10412
10440
|
assert: assert$1,
|
|
10413
10441
|
DateTimeBuilder: DateTimeBuilder,
|