isSameYear method

bool isSameYear(
  1. Date other
)

Check if this date is in the same year than other

Implementation

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