19 lines
415 B
JavaScript
19 lines
415 B
JavaScript
|
import { boot } from 'quasar/wrappers';
|
||
|
|
||
|
export default boot(() => {
|
||
|
Date.vnUTC = () => {
|
||
|
const env = process.env.NODE_ENV;
|
||
|
if (!env || env === 'development') return new Date(Date.UTC(2001, 0, 1, 11));
|
||
|
|
||
|
return new Date();
|
||
|
};
|
||
|
|
||
|
Date.vnNew = () => {
|
||
|
return new Date(Date.vnUTC());
|
||
|
};
|
||
|
|
||
|
Date.vnNow = () => {
|
||
|
return new Date(Date.vnUTC()).getTime();
|
||
|
};
|
||
|
});
|