isOnSameDayAs method

bool isOnSameDayAs (
  1. DateTime another
)

Returns true if this DateTime object is on the same day as another.

Implementation

bool isOnSameDayAs(DateTime another) {
  if (another == null) {
    return false;
  }
  if (year != another.year || month != another.month || day != another.day) {
    return false;
  }
  return true;
}