mirror of
https://github.com/MCKero6423/fuwari.git
synced 2026-10-02 03:15:35 +00:00
8 lines
266 B
TypeScript
8 lines
266 B
TypeScript
export function formatDateToYYYYMMDD(date: Date): string {
|
|
const year = date.getFullYear();
|
|
const month = (date.getMonth() + 1).toString().padStart(2, '0');
|
|
const day = date.getDate().toString().padStart(2, '0');
|
|
|
|
return `${year}-${month}-${day}`;
|
|
}
|