endOfDay property

DateTime get endOfDay

Returns the end of the day (23:59:59.999).

Example:

DateTime(2024, 1, 15, 14, 30).endOfDay;
// DateTime(2024, 1, 15, 23, 59, 59, 999)

Implementation

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