endOfDay property

DateTime get endOfDay

Get the end of the day (23:59:59.999)

Example:

final date = DateTime(2023, 12, 25, 15, 30, 45);
print(date.endOfDay); // 2023-12-25 23:59:59.999

Implementation

DateTime get endOfDay => DateTime(year, month, day, 23, 59, 59, 999);