isSameDay static method

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

Implementation

static bool isSameDay(DateTime date1, DateTime date2){
  bool isSameDay = date1.day == date2.day;
  bool isSameMonth = date1.month == date2.month;
  bool isSameYear = date1.year == date2.year;
  return isSameDay && isSameMonth && isSameYear;
}