Fixed weekday
This commit is contained in:
parent
6ad6ebd1c1
commit
076e318434
1 changed files with 3 additions and 5 deletions
|
|
@ -35,11 +35,9 @@ function generate_calendar(calendarID, year, month)
|
||||||
local first_day = tonumber(os.date("%w", os.time{year=year, month=month, day=1})) + 1
|
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
|
-- Adjust the first day based on the week start setting
|
||||||
if week_start_on_monday then
|
first_day = first_day - 1
|
||||||
first_day = first_day - 1
|
if first_day == 0 then
|
||||||
if first_day == 0 then
|
first_day = 7
|
||||||
first_day = 7
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local html = [[
|
local html = [[
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue