18 lines
393 B
JavaScript
18 lines
393 B
JavaScript
|
module.exports = () => {
|
||
|
Date.vnNew = () => {
|
||
|
return new Date(Date.vnUTC());
|
||
|
};
|
||
|
|
||
|
Date.vnNow = () => {
|
||
|
return new Date(Date.vnUTC()).getTime();
|
||
|
};
|
||
|
|
||
|
Date.vnUTC = () => {
|
||
|
const env = process.env.NODE_ENV;
|
||
|
if (!env || env === 'development')
|
||
|
return new Date(Date.UTC(2022, 5, 15, 11));
|
||
|
|
||
|
return new Date(Date.UTC());
|
||
|
};
|
||
|
};
|