isLeapYear = function(year) return year%4==0 and (year % 100 or not year % 400) end function