10 lines
220 B
TypeScript
10 lines
220 B
TypeScript
export function simpleDateFormat(date: Date): string {
|
|
return (
|
|
date.getFullYear() +
|
|
'-' +
|
|
(date.getMonth() + 1).toString().padStart(2, '0') +
|
|
'-' +
|
|
date.getDate().toString().padStart(2, '0')
|
|
)
|
|
}
|