Rollen Chunk 6: Team-Tab mit Matrix-Kalender und Genehmigungen
This commit is contained in:
1 parent
54970b97e8
commit
45cf022192
1 file changed
+2
-15
@@ -25,11 +25,6 @@ interface YearTableProps {
|
||||
|
||||
const WEEKDAY_SHORT = ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"];
|
||||
|
||||
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()];
|
||||
}
|
||||
|
||||
const MONTH_SHORT = [
|
||||
"Jan",
|
||||
"Feb",
|
||||
@@ -49,20 +44,12 @@ function daysInMonth(year: number, month: number): number {
|
||||
return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();
|
||||
}
|
||||
|
||||
import { shortGermanDate, weekdayShort } from "@/lib/format";
|
||||
|
||||
function isoDate(year: number, month: number, day: number): string {
|
||||
return `${year}-${String(month + 1).padStart(2, "0")}-${String(day).padStart(2, "0")}`;
|
||||
}
|
||||
|
||||
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",
|
||||
});
|
||||
}
|
||||
|
||||
export function YearTable({
|
||||
year,
|
||||
workEntries,
|
||||
|
||||
Reference in new issue
Block a user