Content deleted Content added
Cyborg Coder (talk | contribs) No edit summary |
Cyborg Coder (talk | contribs) No edit summary |
||
Line 40:
if date == "" then date = "No date" end
--local d, y = date:match("(%d+)%D+(%d+)")
local d = date:match("([1-3]%d)%D")
local y = date:match("(%d%d%d%d)")
local mnth = date:match("%a+") or ""
mnth = string.upper(string.sub(mnth, 1, 1)) .. string.sub(mnth, 2)
d, y = tonumber(d) or 1, tonumber(y) or 0
local m = month_idx[mnth:sub(1,3):lower()] or date:match("0(%d)") or 0
local v = day_try(d, m, y)
local out = date .. " = " .. d .. " " .. m .. " " .. y .. " " .. mnth
|