Content deleted Content added
extract month number |
don't assume value of y |
||
Line 15:
local months = { "jan", "feb", "mar", "apr", "may", "jun",
"jul", "aug", "sep", "oct", "nov", "dec" }
local days_in_month = { 31,
local month_idx = {}
for i, v in ipairs(months) do
Line 22:
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
end
|