lastDayOfYear static method
Returns DateTime that represents a beginning
of the last day of the year containing date
.
Example: (2020, 4, 9, 15, 16) -> (2020, 12, 31, 0, 0, 0, 0).
Implementation
static DateTime lastDayOfYear(DateTime dateTime) {
return _date(dateTime.isUtc, dateTime.year, DateTime.december, 31);
}