startOfYear property

DateTime get startOfYear

The first day of the year that contains this date.

DateTime(2025, 6, 15).startOfYear; // DateTime(2025, 1, 1)

Implementation

DateTime get startOfYear => DateTime(year, 1, 1);