dayInYear function

int dayInYear(
  1. DateTime date
)

Implementation

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