isSameHour static method

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

Check if two dates are on the same hour

Implementation

static bool isSameHour(DateTime date1, DateTime date2) {
  return date1.year == date2.year &&
      date1.month == date2.month &&
      date1.day == date2.day &&
      date1.hour == date2.hour;
}