mirror of
https://github.com/strapi/strapi.git
synced 2025-09-19 05:23:05 +00:00
Update packages/generators/generators/lib/plops/utils/get-formatted-date.js
Co-authored-by: Ben Irvin <ben@innerdvations.com>
This commit is contained in:
parent
adda5275fc
commit
ab9ba1a43d
@ -1,5 +1,8 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
module.exports = (date = new Date()) => {
|
module.exports = (date = new Date()) => {
|
||||||
return new Date(date.getTime() - date.getTimezoneOffset() * 60000).toJSON().replace(/[-:T]/g, "").replace(/\....Z/, "");
|
return new Date(date.getTime() - date.getTimezoneOffset() * 60000)
|
||||||
|
.toJSON()
|
||||||
|
.replace(/[-:]/g, '.')
|
||||||
|
.replace(/\....Z/, '');
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user