Module:Sandbox/RexxS/Dates: Difference between revisions

Content deleted Content added
debug
debug
Line 21:
end
 
local function day_try( d, m, y)
days_in_month[2] = leapd(y)
if d <= days_in_month[m] then return "Valid" else return "Invalid" end
Line 29:
local date = frame.args.date or mw.text.trim(frame.args[1] or "")
local d, y = date:match("(%d+)%D+(%d+)")
local mmnth = date:match("%a+") or ""
local mnthm = mmnth:sub(1,3):lower()
returnlocal out = d .. " -- " .. m .. " -- " .. y .. " -- " .. mnth .. day_try(d, mnth, y) .. "<br>"
-- return day_try(d, mnth, y)
out = out .. days_in_month[2]
return d .. " -- " .. m .. " -- " .. y .. " -- " .. mnth .. day_try(d, mnth, y) .. "<br>"
--out return= out .. day_try(d, mnthm, y)
return out .. "<br>"
end