Content deleted Content added
to raw as well |
feb29 check on no year |
||
Line 52:
-- February leap year check
if (month == 2) then
-- On Feb 29, if we don't have a year (incomplete date), assume 29 can be valid once every
if (day == 29 and not year) then return true end
-- On Feb 29, check for valid year - every 4 but not 100 but 400
if (day == 29 and not ((year % 4 == 0) and (year % 100 ~= 0) or (year % 400 == 0))) then
return false
|