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