calcDateCount function
Implementation
int calcDateCount(int year, int month) {
if (_leapYearMonths.contains(month)) {
return 31;
} else if (month == 2) {
if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {
return 29;
}
return 28;
}
return 30;
}