Module:Calendar widget: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 128:
-- local year = args.year or thisyear
-- local year = args.year
-- local month = props.month
-- if month then
-- local mnum = tonumber(month)
-- if not mnum then
-- if month == "current" then
Line 152:
-- end
-- args.year = year
if mnum > 0 and mnum <13props.month then
-- if mnum > 0 and mnum <13 then
props.show_year = true; -- show year in individual month calendars
return displaymonth(props, mnumprops.month);
-- return displayyeardisplaymonth(props, mnum)
-- else
return displayyear(props)
-- return displayyear(props)
-- end
else
-- args.year = year
Line 234 ⟶ 236:
local good
good, cal_props.month = pcall (lang_obj.formatDate, lang_obj, 'n', args.month);
if not good then
cal_props.month = thismonth
else
cal_props.month = tonumber (cal_props.month)
end
end
else
cal_props.month = (13 > mnum and 0 < mnum) and mnum or thismonth; -- month provided as a number
end
end