I have two LocalDates:
LocalDate
LocalDate date1; LocalDate date2; //...
How to find the number of days between these dates?
LocalDate.until- this is what you are looking for. (LocalDate implements Temporal, which takes days, and ChronoUnit is a library of TemporalUnit instances.)
LocalDate.until
long days = date1.until(date2, ChronoUnit.DAYS);
I would do something like
long daysBetween = DAYS.between(date1, date2);