mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 20:42:43 +00:00
HealthLog — personal health-tracking PWA with weight, blood pressure, pulse, mood tracking, medication compliance, Withings integration, doctor report PDF export, and Dracula-themed UI.
12 lines
380 B
TypeScript
12 lines
380 B
TypeScript
export function formatTimeWindowPart(value: string): string {
|
|
const m = /^(\d{1,2}):(\d{2})$/.exec(value.trim());
|
|
if (!m) return value;
|
|
const hh = m[1].padStart(2, "0");
|
|
const mm = m[2];
|
|
return `${hh}:${mm}`;
|
|
}
|
|
|
|
export function formatTimeWindowRange(start: string, end: string): string {
|
|
return `${formatTimeWindowPart(start)} bis ${formatTimeWindowPart(end)} Uhr`;
|
|
}
|