1Using equals() LocalDate does override equals:
2
3int compareTo0(LocalDate otherDate) {
4 int cmp = (year - otherDate.year);
5 if (cmp == 0) {
6 cmp = (month - otherDate.month);
7 if (cmp == 0) {
8 cmp = (day - otherDate.day);
9 }
10 }
11 return cmp;
12}
13If you are not happy with the result of equals(), you are good using the predefined methods of LocalDate.
14
15isAfter()
16isBefore()
17isEqual()
18Notice that all of those method are using the compareTo0() method and just check the cmp value. if you are still getting weird result (which you shouldn't), please attach an example of input and output