fix(ui): keep a formatted time on one line
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:
co-authored by
Claude Opus 5.5
parent
068129a9b1
commit
f5c8d52686
+6
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user