List<LocalDate> totalDates = new ArrayList<>();
String stratdate = 20-12-2017;
String enddate = 25-12-2017;
output:
20-12-2017,
21-12-2017,
22-12-2017,
23-12-2017,
24-12-2017,
25-12-2017 ,
Please reply me as early as possible if any solution regrding this.
This is the code so far (from comments):
List<LocalDate> totalDates = new ArrayList<>();
String stratdate = fromdate1;
String enddate = todate1;
LocalDate start = LocalDate.parse(stratdate);
LocalDate end = LocalDate.parse(enddate);
System.out.println("Converted start date is : " + start);
System.out.println("Converted end date is : " + end);
while (!start.isBefore(end)) {
totalDates.add(start);
start = start.plusDays(1);
System.out.println("dates are ..."+start);
}