nextMonth method
Returns a new DateTime
in the next calendar month.
If the month is December (12), the returned DateTime
is in the next year
Implementation
static DateTime nextMonth(DateTime m) {
var year = m.year;
var month = m.month;
if (month == 12) {
year++;
month = 1;
} else {
month++;
}
return normalizeDate(DateTime(year, month));
}