isBefore method

bool isBefore(
  1. MonthAndYear other
)

Implementation

bool isBefore(MonthAndYear other) {
  return year < other.year || (year == other.year && month < other.month);
}