milestone 30: overview as a dashboard, explicit health contract, period aggregations
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user