dayOfYear property

  1. @useResult
int get dayOfYear

The ordinal day of the year.

DateTime(2023, 4, 1).toDayOfYear(); // 91

Implementation

@useResult int get dayOfYear => Dates.dayOfYear(year, month, day);