roundToFirstDayOfYear static method

DateTime roundToFirstDayOfYear(
  1. DateTime date
)

Rounds the given DateTime to the first day of the year.

Implementation

static DateTime roundToFirstDayOfYear(DateTime date) {
  return DateTime(date.year, 1, 1);
}