isSameMonth method

bool isSameMonth(
  1. DateTime other
)

Returns true if this date is in the same month and year as other.

Implementation

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