124843848f
(cherry picked from commit 44c4d7b9521fe449e61edc614446195861932f8c)
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}`;
|
|
}
|