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