This commit is contained in:
@@ -93,7 +93,7 @@ export function formatDate(date: Date, format?: string) {
|
||||
let month = String(date.getMonth() + 1).padStart(2, "0");
|
||||
let year = String(date.getFullYear());
|
||||
|
||||
const f = (format === undefined) ? 'YYYY-MM-DD' : format;
|
||||
const f = format ?? 'YYYY-MM-DD';
|
||||
return f.replace('DD', day).replace('MM', month).replace('YYYY', year);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user