isYearCurrent method
Checks if the date is in the current calendar year.
Returns true if this date's year matches now's year.
Pass now to override the current time (useful for testing).
Implementation
@useResult
bool isYearCurrent({DateTime? now}) => year == (now ?? DateTime.now()).year;