isSameMonth method

  1. @useResult
bool isSameMonth(
  1. DateTime other
)

Checks if the current DateTime has the same month as another DateTime.

Returns true when the month values match.

Implementation

@useResult
bool isSameMonth(DateTime other) => month == other.month;