isSameYear method

bool isSameYear(
  1. DateTime other
)

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

Implementation

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