endOfDay property

DateTime get endOfDay

Returns a DateTime object representing the end of the day (23:59:59).

Implementation

DateTime get endOfDay {
  return add(Duration(
    hours: 23 - hour,
    minutes: 59 - minute,
    seconds: 59 - second,
    milliseconds: -millisecond,
    microseconds: -microsecond,
  ));
}