mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
at schema-errors 18 lines 427 B view raw
1import {AtUri} from '@atproto/api' 2 3export function niceDate(date: number | string | Date) { 4 const d = new Date(date) 5 return `${d.toLocaleDateString('en-us', { 6 year: 'numeric', 7 month: 'short', 8 day: 'numeric', 9 })} at ${d.toLocaleTimeString(undefined, { 10 hour: 'numeric', 11 minute: '2-digit', 12 })}` 13} 14 15export function getRkey({uri}: {uri: string}): string { 16 const at = new AtUri(uri) 17 return at.rkey 18}