isSameDayByTimestamp static method

bool isSameDayByTimestamp(
  1. int timestamp1,
  2. int timestamp2
)

Implementation

static bool isSameDayByTimestamp(int timestamp1, int timestamp2) {
  DateTime date1 = DateTime.fromMillisecondsSinceEpoch(timestamp1);
  DateTime date2 = DateTime.fromMillisecondsSinceEpoch(timestamp2);

  return date1.year == date2.year &&
      date1.month == date2.month &&
      date1.day == date2.day;
}