mirror of
https://github.com/crystelf/crystelf-core.git
synced 2025-07-04 14:49:19 +00:00
12 lines
328 B
TypeScript
12 lines
328 B
TypeScript
let date = {
|
|
getCurrentDate: () => {
|
|
const now = new Date();
|
|
return `${now.getFullYear()}${(now.getMonth() + 1).toString().padStart(2, '0')}${now.getDate().toString().padStart(2, '0')}`;
|
|
},
|
|
getCurrentTime: () => {
|
|
return new Date().toLocaleTimeString('en-US', { hour12: false });
|
|
},
|
|
};
|
|
|
|
export default date;
|