* add Frontmatter CMS * add biome * update * update * fixed & add docs * fix translation.ts * fix translation
7 lines
254 B
TypeScript
7 lines
254 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}`
|
|
}
|