daysInMonth static method
Returns the number of days in month of year.
Implementation
static int daysInMonth(int year, int month) {
if (month == DateTime.december) {
return DateTime(year + 1, DateTime.january, 0).day;
}
return DateTime(year, month + 1, 0).day;
}