Module:Sandbox/RexxS/Dates: Difference between revisions

Content deleted Content added
empty as well
default day to 1, so month, year is valid
 
Line 35:
local d, y = date:match("(%d+)%D+(%d+)")
local mnth = date:match("%a+") or ""
d, y = tonumber(d) or 01, tonumber(y) or 0
local m = month_idx[mnth:sub(1,3):lower()] or 0
local out = date .. " = " .. d .. " -- " .. m .. " -- " .. y .. " -- " .. mnth