Module:Calendar widget: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 20:
dayabbr[i] = v:sub(1, 2)
end
--local monthname = {
-- "January", "February", "March", "April", "May", "June",
-- "July", "August", "September", "October", "November", "December"
--}
--local monthnumbermonthabbr = {}
--for i, v in ipairs(monthabbrmonthname) do
-- monthabbr[i] = v:sub(1, 3)
--end
 
local monthname = {}
local monthabbr = {}
forif i,0 v== in ipairs(#monthname) dothen
monthabbr[i]for m = v:sub(1, 3)12 do
monthname[m] = lang_obj:formatDate ("F", '2019-' .. m); -- table of long month names
end
monthabbr[m] = lang_obj:formatDate ("M", '2019-' .. m):sub(1, 3); -- table of abbreviated month names
local monthnumber = {}
end
for i, v in ipairs(monthabbr) do
monthnumber[v] = i
end
 
--local monthnumber = {}
--for i, v in ipairs(monthabbr) do
-- monthnumber[v] = i
--end
local thisyear = tonumber( lang_obj:formatDate ("Y") )
local thismonth = tonumber( lang_obj:formatDate ("n") )