previousMonth method
Implementation
MonthAndYear previousMonth() {
if (month == 1) {
return MonthAndYear(
month: 12,
year: year - 1,
);
}
return MonthAndYear(
month: month - 1,
year: year,
);
}
MonthAndYear previousMonth() {
if (month == 1) {
return MonthAndYear(
month: 12,
year: year - 1,
);
}
return MonthAndYear(
month: month - 1,
year: year,
);
}