Check if the DateTime is in the same year as the other.
other
bool isSameYear(DateTime other) { return year == other.year; }