Content deleted Content added
No edit summary |
No edit summary |
||
Line 197:
args.year = args.year and tonumber(args.year) or thisyear;
if args.month then
local mnum = tonumber(args.month) if args.month == "current" then
-- mnum = thismonth
-- year = thisyear
args.month = thismonth
args.year = thisyear
elseif args.month == "last" then
mnum = thismonth - 1
if mnum == 0 then
-- mnum = 12
-- year = thisyear - 1
args.month = 12
args.year = thisyear - 1
else▼
end▼
elseif args.month == "next" then
if mnum == 13 then▼
-- mnum = 1
-- year = thisyear + 1▼
else▼
end
else
-- mnum = monthnumber[month:sub(1,3)] or thismonth▼
▲ args.month = mnum; -- previous month
args.month = thismonth
▲ if mnum == 13 then
▲-- year = thisyear + 1
▲ args.month = 1 -- january next year
▲ args.year = thisyear + 1 -- next year
▲ else
▲ args.month = mnum; -- next month
▲ end
▲ else
▲-- mnum = monthnumber[month:sub(1,3)] or thismonth
▲ args.month = thismonth
end
end
end
|