roundToLastDayOfYear static method

DateTime roundToLastDayOfYear(
  1. DateTime date
)

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

Implementation

static DateTime roundToLastDayOfYear(DateTime date) {
  return DateTime(date.year, 12, 31);
}