7 lines
195 B
TypeScript
7 lines
195 B
TypeScript
|
export function dateObjectToString(date: Date): string {
|
||
|
return `${date.getUTCFullYear()}-${`${date.getUTCMonth()}`.padStart(2, '0')}-${`${date.getUTCDate()}`.padStart(
|
||
|
2,
|
||
|
'0'
|
||
|
)}`;
|
||
|
}
|