Fixed weekday

This commit is contained in:
Magnus Åhall 2025-09-09 23:46:11 +02:00
parent 6ad6ebd1c1
commit 076e318434

View file

@ -35,12 +35,10 @@ function generate_calendar(calendarID, year, month)
local first_day = tonumber(os.date("%w", os.time{year=year, month=month, day=1})) + 1
-- Adjust the first day based on the week start setting
if week_start_on_monday then
first_day = first_day - 1
if first_day == 0 then
first_day = 7
end
end
local html = [[
<table border='1'>