compareTo method

  1. @override
int compareTo(
  1. Date other
)
override

Compare dates

returns -1,0,+1

Implementation

@override
int compareTo(Date other) {
  if (identical(this, other)) {
    return 0;
  } else if (julianDayNumber == other.julianDayNumber) {
    return time.compareTo(other.time);
  } else if (julianDayNumber > other.julianDayNumber) {
    return 1;
  } else {
    return -1;
  }
}