feat: Czech day name format 'Pondělí (20.2)' in canvas + PDF; wider date column
Some checks failed
Build & Push Docker / build (push) Has been cancelled

This commit is contained in:
2026-02-20 17:34:14 +01:00
parent 47add509ca
commit f0e7c3b093
2 changed files with 23 additions and 4 deletions

View File

@@ -7,7 +7,7 @@
const Canvas = {
GRID_MINUTES: 15,
ROW_H: 52, // px height of one day row
TIME_LABEL_W: 80, // px width of date label column
TIME_LABEL_W: 110, // px width of date label column (Czech day names: "Pondělí (20.2)")
HEADER_H: 28, // px height of time axis header
MIN_BLOCK_MIN: 15, // minimum block duration in minutes
@@ -189,7 +189,12 @@ const Canvas = {
_formatDate(dateStr) {
const d = new Date(dateStr + 'T12:00:00');
return d.toLocaleDateString('cs-CZ', { weekday: 'short', day: 'numeric', month: 'numeric' });
const weekday = d.toLocaleDateString('cs-CZ', { weekday: 'long' });
// Capitalize first letter
const weekdayCap = weekday.charAt(0).toUpperCase() + weekday.slice(1);
const day = d.getDate();
const month = d.getMonth() + 1;
return `${weekdayCap} (${day}.${month})`;
},
_createBlockEl(block, typeMap, totalMin) {