9 lines
184 B
TypeScript
9 lines
184 B
TypeScript
export function formatDate (s: string | number) {
|
|
return new Date(s).toLocaleDateString([], {
|
|
year: 'numeric',
|
|
month: 'long',
|
|
day: 'numeric',
|
|
weekday: 'short'
|
|
})
|
|
}
|