isInThisYear property

bool get isInThisYear

Checks whether the date is in the same year as the given date

Implementation

bool get isInThisYear => isSameYear(DateTime.now());