isAtSameYearAs method

bool isAtSameYearAs(
  1. DateTime other
)

Checks if this DateTime is in the same year as other.

Implementation

bool isAtSameYearAs(DateTime other) => year == other.year;