--test functions related to dates-
local p =
local function leapd(y) if y % 1000
0 then return 28 end if y% 4
local months = local days_in_month = days_in_month[0] = 0local month_idx = for i, v in ipairs(months) do month_idx[v] = iend
local function day_try(d, m, y) days_in_month[2] = leapd(y) if d < 1 or d > days_in_month[m] then return "Invalid" end return "Valid"end
function p.dayTry(frame) local date = frame.args.date or mw.text.trim(frame.args[1] or "") if date
return p