// Shared Temporal display helpers. Storage and logic stay in ISO instants; // these format one for the viewer in their own timezone. /** Format an ISO instant in the viewer's timezone. */ export function formatInstant( iso: string, options: Intl.DateTimeFormatOptions, ): string { return Temporal.Instant.from(iso) .toZonedDateTimeISO(Temporal.Now.timeZoneId()) .toLocaleString('fr-FR', options); } /** Short day-month stamp ("8 sept."). */ export function formatDayMonth(iso: string): string { return formatInstant(iso, { day: 'numeric', month: 'short' }); } /** Day-month-year stamp ("8 sept. 2026"). */ export function formatDayMonthYear(iso: string): string { return formatInstant(iso, { day: 'numeric', month: 'short', year: 'numeric', }); }