getDateOnly method

DateTime getDateOnly({
  1. bool withDay = true,
})

Returns a DateTime with the same date as this but no reference to time

Implementation

DateTime getDateOnly({bool withDay = true}) =>
    DateTime.utc(year, month, withDay ? day : 1);