b70e5b2f38
* update vite+typescript * update atproto api to latest, split out utils * add checkmark to post * add checkie to embed * revert change to example post * fix ext link color
12 lines
287 B
TypeScript
12 lines
287 B
TypeScript
export function niceDate(date: number | string | Date) {
|
|
const d = new Date(date)
|
|
return `${d.toLocaleDateString('en-us', {
|
|
year: 'numeric',
|
|
month: 'short',
|
|
day: 'numeric',
|
|
})} at ${d.toLocaleTimeString(undefined, {
|
|
hour: 'numeric',
|
|
minute: '2-digit',
|
|
})}`
|
|
}
|