endOfDay method

DateTime endOfDay()

Create a new date setting hour to 23, minute to 59, and second to 59.

Implementation

DateTime endOfDay() {
  final tomorrow = this.tomorrow().startOfDay();
  return tomorrow.subtract(Duration(microseconds: 1));
}