📅  最后修改于: 2022-03-11 14:52:29.059000             🧑  作者: Mango
//24-May-2017, change this to your desired Start Date
LocalDate dateBefore = LocalDate.of(2017, Month.MAY, 24);
//29-July-2017, change this to your desired End Date
LocalDate dateAfter = LocalDate.of(2017, Month.JULY, 29);
long noOfDaysBetween = ChronoUnit.DAYS.between(dateBefore, dateAfter);
System.out.println(noOfDaysBetween);