endOfYear property

DateTime get endOfYear

Returns the last moment of this date's year.

Implementation

DateTime get endOfYear =>
    DateTime(year + 1).subtract(const Duration(milliseconds: 1));