isSameYear method

bool isSameYear(
  1. DateTime other
)

Check if this date is in the same year than other

Implementation

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