isSameDateAs method
Returns true if the date of this occurs on the same day as
the date of other
.
The comparison is independent of whether the time is in UTC or in the local time zone.
Implementation
bool isSameDateAs(DateTime other) =>
dateOnly.isAtSameMomentAs(other.dateOnly);