Module:Sandbox/Ohmomar/Dates Explained

local p = p.dateextract = function(frame) local date = frame.args.date or "" local months = local d, y = date:match("(%d+)%D+(%d+)") local mnth = date:match("%a+") or "" d, y = tonumber(d) or 1, tonumber(y) or 0 local m = mnth:sub(1,3):lower or 0 if format

"dmy" then local out = d.." "..m.." "..y return out else if format

"mdy" then local out = m.." "..d.." "..y return out else end endendreturn p