roundToDayEnd static method

DateTime roundToDayEnd(
  1. DateTime date
)

Rounds the given DateTime to the end of the day (23:59:59).

Implementation

static DateTime roundToDayEnd(DateTime date) {
  return DateTime(date.year, date.month, date.day, 23, 59, 59);
}