getDaysInMonth method
Returns the number of days in the given month within the given year.
year
: The year in which to consider the monthmonth
: The month to determine the number of days in
Returns: The number of days in the given month and year.
ArgumentOutOfRangeException
: The given year / month combination is invalid for this calendar.
Implementation
int getDaysInMonth(int year, int month) {
// Simplest way to validate the year and month. Assume it's quick enough to validate the day...
_validateYearMonthDay(year, month, 1);
return _yearMonthDayCalculator.getDaysInMonth(year, month);
}