Content deleted Content added
Cyborg Coder (talk | contribs) No edit summary |
Cyborg Coder (talk | contribs) No edit summary |
||
Line 37:
function p.date(frame)
local date = frame.args.text or mw.text.trim(frame.args[1] or "")
local dformat = frame.args.format or default
if date == "" then date = "No date" end
local d, y = date:match("(%d+)%D+(%d+)")
Line 42 ⟶ 43:
d, y = tonumber(d) or 1, tonumber(y) or 0
local m = month_idx[mnth:sub(1,3):lower()] or 0
m = string.upper(string.sub(m, 1, 1)) .. string.sub(m, 2)
local out = date .. " = " .. d .. "
out = out .. " = " .. day_try(d, m, y)
return out .. "<br>"
|