Open birthdaybook opened 6 years ago
Correction follows: added in this fact - Years divisible by 400 are NOT leap years.
_getNumberOfDaysOfMonth: function(iMonth, iYear) { var apo = this; var iArrMonthDays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], iArrLeapYearMonthDays = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; if(iYear % 4 === 0 && iYear % 400 != 0) return iArrLeapYearMonthDays[iMonth]; else return iArrMonthDays[iMonth]; },
Correction follows: added in this fact - Years divisible by 400 are NOT leap years.