isPastMonthYear static method
Implementation
static bool isPastMonthYear(String input) {
try {
final inputDate = DateFormat('MM-yyyy').parseStrict(input);
final now = DateTime(DateTime.now().year, DateTime.now().month);
return inputDate.isBefore(now) || inputDate.isAtSameMomentAs(now);
} catch (_) {
return false;
}
}