isSameMonth method

bool isSameMonth(
  1. DateTime date
)

Checks whether the date is in the same month as the given date

Implementation

bool isSameMonth(DateTime date) {
  return date.year == year && date.month == month;
}