function monthHaveManyDays(year,month){ var days; var monthArr = [4,6,9,11] if(month == 2){ days = year % 4 == 0 && year % 100 != 0 || year % 400 == 0 ? 29 : 28 }else if(monthArr.inculdes(month)){ days = 30 }else{ days = 31 } return days }