Content deleted Content added
Cyborg Coder (talk | contribs) No edit summary |
Cyborg Coder (talk | contribs) No edit summary |
||
(8 intermediate revisions by the same user not shown) | |||
Line 24:
end
return "Valid"
end
function p.date(frame)
local date = frame.args.text or mw.text.trim(frame.args[1] or "")
date = " " .. date
local dformat = frame.args.format or
if date == "" then date = "No date" end
--local d, y = date:match("(%d+)%D+(%d+)")
local d = date:match("%D(
local y = date:match("(%d%d%d+)")
local mnth = date:match("%a+") or ""
mnth = string.upper(string.sub(mnth, 1, 1)) .. string.sub(mnth, 2)
if
d, y = tonumber(d) or 1, tonumber(y) or 0
local m = month_idx[mnth:sub(1,3):lower()] or tonumber(date:match("%D0(%d)")) or 0
|