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. Audited: 2026-06-12 11:26 EDT

Implementation

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