isSameMonth method

bool isSameMonth(
  1. DateTime other
)

Whether it is the same month (and year) as other.

Implementation

bool isSameMonth(DateTime other) =>
    year == other.year && month == other.month;