endOfDay property

DateTime endOfDay

Returns the end of the day for this DateTime object.

Example:

var now = DateTime.now();
var end = now.endOfDay;
print(end); // Output: "YYYY-MM-DD 23:59:59.999"

Implementation

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