improvement: Calendar preview: weeks start on Mondays

This commit is contained in:
2025-06-15 21:07:15 +02:00
parent 06020740cc
commit 0b8066923b
3 changed files with 38 additions and 11 deletions

19
src/awk/calshift.awk Normal file
View File

@@ -0,0 +1,19 @@
BEGIN {
ORS = ""
W3 = " "
W17 = W3 W3 W3 W3 W3 " "
}
NR == 1 { i++; print $0 "\n"; next }
NR == 2 { i++; print substr($0, 4, 17) " " substr($0, 1, 3) " \n"; next }
NR == 3 && /^ 1/ { print W17; }
NR == 3 && /^ / { print substr($0, 4, 17); next }
/[0-9]/ {
i++
print " " substr($0, 1, 3) " \n" substr($0, 4, 17)
}
END {
i++
print " " W3 " \n"
for (i; i<8; i++)
print " " W17 W3 " \n"
}