Returns number of days in the month of the year.
month
year
static int getDaysInMonth(int year, int monthNum) { assert(monthNum > 0); assert(monthNum <= 12); return DateTime(year, monthNum + 1, 0).day; }