Indicates whether two DateTime objects are in the same year.
bool isSameYear(DateTime date) { return year == date.year; }