getDaysInMonth static method
Get the number of days in a month
year - The year
month - The month (1-12)
Returns number of days in the month
Implementation
static int getDaysInMonth(int year, int month) {
return DateTime(year, month + 1, 0).day;
}