@indra.ai/deva 1.1.127 → 1.1.128
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/index.js +3 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1637,6 +1637,9 @@ class Deva {
|
|
|
1637
1637
|
system based on the language and locale in the client profile.
|
|
1638
1638
|
***************/
|
|
1639
1639
|
formatDate(d, format='milli', time=false) {
|
|
1640
|
+
if (!d) d = Date.now();
|
|
1641
|
+
d = new Date(d);
|
|
1642
|
+
|
|
1640
1643
|
if (format === 'milli') return d.getTime();
|
|
1641
1644
|
// pre-set date formats for returning user dates.
|
|
1642
1645
|
const formats = {
|