@js-joda/core 5.5.0 → 5.5.1
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 +6 -8
- package/dist/js-joda.cjs.js.map +1 -1
- package/dist/js-joda.esm.js +6 -8
- package/dist/js-joda.esm.js.map +1 -1
- package/dist/js-joda.js +6 -8
- package/dist/js-joda.js.map +1 -1
- package/dist/js-joda.min.js +2 -2
- package/package.json +2 -2
- package/src/nativeJs.js +5 -7
package/dist/js-joda.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//! @version @js-joda/core - 5.5.
|
|
1
|
+
//! @version @js-joda/core - 5.5.1
|
|
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)
|
|
@@ -10359,14 +10359,12 @@ function nativeJs(date, zone) {
|
|
|
10359
10359
|
}
|
|
10360
10360
|
requireNonNull(date, 'date');
|
|
10361
10361
|
requireNonNull(zone, 'zone');
|
|
10362
|
-
|
|
10363
|
-
|
|
10364
|
-
|
|
10365
|
-
|
|
10366
|
-
return Instant.ofEpochMilli(date.valueOf()).atZone(zone);
|
|
10367
|
-
default:
|
|
10368
|
-
throw new IllegalArgumentException('date must be a javascript Date or a moment instance');
|
|
10362
|
+
if (date instanceof Date) {
|
|
10363
|
+
return Instant.ofEpochMilli(date.getTime()).atZone(zone);
|
|
10364
|
+
} else if (typeof date.toDate === 'function' && date.toDate() instanceof Date) {
|
|
10365
|
+
return Instant.ofEpochMilli(date.valueOf()).atZone(zone);
|
|
10369
10366
|
}
|
|
10367
|
+
throw new IllegalArgumentException('date must be a javascript Date or a moment instance');
|
|
10370
10368
|
}
|
|
10371
10369
|
|
|
10372
10370
|
function bindUse(jsJoda) {
|