1 define(['../lang/isDate', './isLeapYear'], function (isDate, isLeapYear) {
3 var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
6 * returns the total amount of days in the month (considering leap years)
8 function totalDaysInMonth(fullYear, monthIndex){
9 if (isDate(fullYear)) {
10 monthIndex = fullYear.getMonth();
13 if (monthIndex === 1 && isLeapYear(fullYear)) {
16 return DAYS_IN_MONTH[monthIndex];
20 return totalDaysInMonth;