Module:Deathage: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:


function p.formatDate(frame)
function p.formatDate(frame)
     local day = frame.args[1] or 1
     local day = tonumber(frame.args[4]) or 1
     local month = frame.args[2] or 1
     local month = tonumber(frame.args[5]) or 1
     local year = frame.args[3] or 1970
     local year = tonumber(frame.args[6]) or 1970
     return mw.getContentLanguage():formatDate('j F Y', string.format('%d-%d-%d', year, month, day))
     return mw.getContentLanguage():formatDate('j F Y', string.format('%d-%d-%d', year, month, day))
end
end