fix(ui): keep a formatted time on one line
CI / Typecheck, test, feed (push) Successful in 15s
CI / Build site (push) Successful in 8s
CI / Container image (push) Successful in 32s

The detail sheet wrapped "09:00 AM" and left "AM" on a line of its own.
The time's spaces are now non-breaking, which also covers the footer's
"last refreshed" time.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Lucas Winther
2026-10-01 04:18:45 +02:00
co-authored by Claude Opus 5.5
parent 068129a9b1
commit f5c8d52686
+6 -1
View File
@@ -283,7 +283,12 @@ export function formatAbsolute(iso: string | number, withTime: boolean): string
year: "numeric",
});
if (!withTime) return date;
return `${date}, ${d.toLocaleTimeString(undefined, { hour: "2-digit", minute: "2-digit" })}`;
// The time is one reading: a line break inside it strands "AM" on a line of
// its own, so its spaces are made non-breaking.
const time = d
.toLocaleTimeString(undefined, { hour: "2-digit", minute: "2-digit" })
.replace(/\s/g, " ");
return `${date}, ${time}`;
}
export interface EventClock {