I tried generating the list of the in-between dates using Joda-Time. Check out the below code:
int myDates = Days.daysBetween(startDate, endDate).getDays();
List<LocalDate> dates = new ArrayList<LocalDate>(myDates); // Set initial capacity to `days`.
for (int i=0; i < myDates; i++) {
LocalDate dt = startDate.withFieldAdded(DurationFieldType.days(), i);
dates.add(dt);
}
Hope this helps!
To know more about Java, It's recommended to join our Java Training in Chennai today.