@tmsfe/tms-core 0.0.57 → 0.0.58
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/package.json +1 -1
- package/src/timeUtils.js +1 -1
package/package.json
CHANGED
package/src/timeUtils.js
CHANGED
|
@@ -154,7 +154,7 @@ const formatDateTime = (date, fmt = 'yyyy-MM-dd hh:mm:ss') => {
|
|
|
154
154
|
const dateToString = (date, withTime = false, withSeconds = false, join = '-') => {
|
|
155
155
|
let fmt = `yyyy${join}MM${join}dd`;
|
|
156
156
|
if (withTime) fmt += withSeconds ? 'hh:mm:ss' : 'hh:mm';
|
|
157
|
-
return formatDateTime(date, fmt);
|
|
157
|
+
return formatDateTime(date || new Date(), fmt);
|
|
158
158
|
};
|
|
159
159
|
|
|
160
160
|
export {
|