isSameDay static method
Returns true if the two DateTime objects have the same day, month, and year, or are both null.
Implementation
static bool isSameDay(DateTime? dateA, DateTime? dateB) {
return
dateA?.year == dateB?.year &&
dateA?.month == dateB?.month &&
dateA?.day == dateB?.day;
}