isSameDay function
Checks if two DateTime objects are the same day.
Returns false
if either of them is null.
Implementation
bool isSameDay(DateTime? a, DateTime? b) {
if (a == null || b == null) {
return false;
}
return a.year == b.year && a.month == b.month && a.day == b.day;
}