Fixed weekday
This commit is contained in:
parent
6ad6ebd1c1
commit
076e318434
1 changed files with 3 additions and 5 deletions
|
|
@ -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'>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue