initial commit of the paytime session frontend

This commit is contained in:
jenz
2026-08-22 14:53:27 +02:00
parent 4ad037bd13
commit 9e8e8378a2
43 changed files with 2936 additions and 0 deletions
@@ -0,0 +1,14 @@
import { parseDbDateTime } from './timezone';
// Parses a MySQL DATETIME string correctly regardless of the Node
// process's own timezone — see lib/timezone.ts.
export function parseDbDate(s: string): Date {
return parseDbDateTime(s);
}
export function diffMinutes(startStr: string, endStr: string | null): number | null {
if (!endStr) return null;
const start = parseDbDate(startStr);
const end = parseDbDate(endStr);
return Math.round((end.getTime() - start.getTime()) / 60000);
}