isSameDay function

bool isSameDay(
  1. String date1,
  2. String date2
)

Returns true if date1 and date2 represent the same UTC calendar day.

Implementation

bool isSameDay(String date1, String date2) {
  final d1 = tryParseDate(date1);
  final d2 = tryParseDate(date2);
  if (d1 == null || d2 == null) return false;
  return d1.year == d2.year && d1.month == d2.month && d1.day == d2.day;
}