Update packages/generators/generators/lib/plops/utils/get-formatted-date.js

Co-authored-by: Ben Irvin <ben@innerdvations.com>
This commit is contained in:
dogusdeniz 2023-02-09 17:25:15 +03:00 committed by GitHub
parent adda5275fc
commit ab9ba1a43d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,8 @@
'use strict';
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/, '');
};