pleshevski.ru/docs/.vuepress/global.ts

10 lines
211 B
TypeScript
Raw Permalink Normal View History

2024-07-24 17:15:05 +03:00
export type NonEmptyArray<T> = [T, ...T[]];
export function renderDate(date: Date): string {
return date.toLocaleDateString(undefined, {
year: "numeric",
month: "2-digit",
day: "2-digit",
});
}