milestone 30: overview as a dashboard, explicit health contract, period aggregations

This commit is contained in:
2026-08-22 16:45:15 +02:00
parent 0e83477d80
commit 623667e475
89 changed files with 7222 additions and 4239 deletions
+11
View File
@@ -7,6 +7,17 @@ export function formatTime(unixSeconds: number, locale?: string, timeZone?: stri
}).format(new Date(unixSeconds * 1000));
}
/**
* Unix seconds → the time of day alone, "14:05". For a stamp the reader places
* against now — a pause that ends shortly, the last row that was dropped —
* where the date would be noise on every reading but one.
*/
export function formatClock(unixSeconds: number, locale?: string, timeZone?: string): string {
return new Intl.DateTimeFormat(locale, { hour: "2-digit", minute: "2-digit", timeZone }).format(
new Date(unixSeconds * 1000),
);
}
const BYTE_UNITS = ["KiB", "MiB", "GiB", "TiB"] as const;
export function formatBytes(bytes: number): string {