isAtSameYearAs method

bool isAtSameYearAs(
  1. DateTime other
)

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

Does not account for timezones.

Implementation

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