dateOnly property

DateTime dateOnly

Returns a DateTime with the date of the original, but time set to midnight.

Implementation

DateTime get dateOnly => DateTime(this.year, this.month, this.day);