732
edits
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[ | local day = tonumber(frame.args[4]) or 1 | ||
local month = frame.args[ | local month = tonumber(frame.args[5]) or 1 | ||
local year = frame.args[ | 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 |