@js-joda/core 5.7.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/js-joda.cjs.js +3 -12
- package/dist/js-joda.cjs.js.map +1 -1
- package/dist/js-joda.esm.js +3 -12
- package/dist/js-joda.esm.js.map +1 -1
- package/dist/js-joda.js +3 -12
- package/dist/js-joda.js.map +1 -1
- package/dist/js-joda.min.js +2 -2
- package/package.json +2 -3
- package/src/MathUtil.js +1 -5
- package/src/nativeJs.js +2 -8
package/dist/js-joda.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//! @version @js-joda/core -
|
|
1
|
+
//! @version @js-joda/core - 6.0.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)
|
|
@@ -234,11 +234,7 @@
|
|
|
234
234
|
if (isNaN(value)) {
|
|
235
235
|
throw new ArithmeticException('Invalid int value, using NaN as argument');
|
|
236
236
|
}
|
|
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) {
|
|
237
|
+
if (!Number.isInteger(Number(value))) {
|
|
242
238
|
throw new ArithmeticException("Invalid value: '" + value + "' is a float");
|
|
243
239
|
}
|
|
244
240
|
if (value > MAX_SAFE_INTEGER || value < MIN_SAFE_INTEGER) {
|
|
@@ -10424,12 +10420,7 @@
|
|
|
10424
10420
|
}
|
|
10425
10421
|
requireNonNull(date, 'date');
|
|
10426
10422
|
requireNonNull(zone, 'zone');
|
|
10427
|
-
|
|
10428
|
-
return Instant.ofEpochMilli(date.getTime()).atZone(zone);
|
|
10429
|
-
} else if (typeof date.toDate === 'function' && date.toDate() instanceof Date) {
|
|
10430
|
-
return Instant.ofEpochMilli(date.toDate().getTime()).atZone(zone);
|
|
10431
|
-
}
|
|
10432
|
-
throw new IllegalArgumentException('date must be a javascript Date or a moment instance');
|
|
10423
|
+
return Instant.ofEpochMilli(date.valueOf()).atZone(zone);
|
|
10433
10424
|
}
|
|
10434
10425
|
|
|
10435
10426
|
function bindUse(jsJoda) {
|