isSameYear method

bool isSameYear(
  1. DateTime other
)

Checks if the current date is in the same year as other

Implementation

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