endOfYear property

DateTime get endOfYear

The last day of the year that contains this date.

DateTime(2025, 6, 15).endOfYear; // DateTime(2025, 12, 31)

Implementation

DateTime get endOfYear => DateTime(year, 13, 0);