pleshevski.ru/render.ts

8 lines
166 B
TypeScript
Raw Normal View History

export function renderDate(date: Date): string {
return date.toLocaleDateString(undefined, {
year: "numeric",
month: "2-digit",
day: "2-digit",
});
}