Rollen Chunk 6: Team-Tab mit Matrix-Kalender und Genehmigungen
Docker Image / test (push) Canceled after 0s
Docker Image / image (push) Canceled after 0s

This commit is contained in:
loki committed 2026-10-11 20:19:08 +02:00
1 parent 8d0f6d8cc7
commit 3cefcefad1
1 file changed
+17
+17
View File
@@ -88,3 +88,20 @@ export function eachDay(start: string, end: string): string[] {
}
return days;
}
const WEEKDAY_SHORT = ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"];
export function weekdayShort(iso: string): string {
const [year, month, day] = iso.split("-").map(Number);
return WEEKDAY_SHORT[new Date(Date.UTC(year, month - 1, day)).getUTCDay()];
}
export function shortGermanDate(iso: string): string {
const [year, month, day] = iso.split("-").map(Number);
return new Date(Date.UTC(year, month - 1, day)).toLocaleDateString("de-DE", {
day: "2-digit",
month: "2-digit",
year: "numeric",
timeZone: "UTC",
});
}