isSameYear method

bool isSameYear(
  1. DateTime other
)

Returns true if the date is in the same year as other, false otherwise.

Implementation

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