dayInYear function

int dayInYear(
  1. DateTime date
)

Implementation

int dayInYear(DateTime date) =>
    date.difference(DateTime(date.year, 1, 1)).inDays;