Exosphere is a set of small, modular, self-hostable community tools built on the AT Protocol. app.exosphere.site
at main 9 lines 321 B view raw
1const defaultOptions: Intl.DateTimeFormatOptions = { 2 month: "short", 3 day: "numeric", 4}; 5 6export function formatDate(iso: string, opts?: Intl.DateTimeFormatOptions): string { 7 const date = iso.endsWith("Z") ? new Date(iso) : new Date(iso + "Z"); 8 return date.toLocaleDateString(undefined, opts ?? defaultOptions); 9}