firstDayOfNextYear static method

DateTime firstDayOfNextYear(
  1. DateTime dateTime
)

Returns DateTime that represents a beginning of the first day of the next year.

Example: (2020, 3, 9, 15, 16) -> (2021, 1, 1, 0, 0, 0, 0).

Implementation

static DateTime firstDayOfNextYear(DateTime dateTime) {
  return _date(dateTime.isUtc, dateTime.year + 1, 1, 1);
}