compareTo method

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

Returns 0 if this is at the same date as other, 1 if this is after other and -1 if this is before other.

Implementation

@override
int compareTo(final Date other) {
  if (this == other) {
    return 0;
  } else {
    if (_date.isBefore(other.toDateTime())) {
      return -1;
    } else {
      return 1;
    }
  }
}