Module:Calendar widget: Difference between revisions

Content deleted Content added
cleaner handling of frame and its parent; validate monthname
split code for when month is present
Line 58:
local year = args.year or thisyear
local month = args.month
if month then
local monthnum = tonumber(month)
if not local monthnum then= tonumber(month)
if not monthnum then
monthnum = monthnumber[month:sub(1,3)]
end
local monthnum month = monthname[tonumber(month)]
return ">" .. year .. "< >" .. (month or "noname") .. "<"
else
return ">" .. year .. "<"
end
month = monthname[tonumber(month)]
local out = {}
return ">" .. year .. "< >" .. (month or "noname") .. "<"
end