isSameDay method
Check if a date is the same day as another date.
dateTime1
and dateTime2
are the dates to compare.
Implementation
bool isSameDay(DateTime dateTimeToCompare) {
if (this == null) return false;
return this!.year == dateTimeToCompare.year &&
this!.month == dateTimeToCompare.month &&
this!.day == dateTimeToCompare.day;
}