compareTo method

int compareTo(
  1. Date other
)

Implementation

int compareTo(Date other) {
  DateTime dateTime = DateTime(year, month, day);
  return dateTime.compareTo(DateTime(other.year, other.month, other.day));
}