Java Número de dias entre datas
LocalDate start = LocalDate.parse("2020-11-03");
LocalDate end = LocalDate.parse("2020-12-15");
long diff = DAYS.between(start, end);
vmxes
LocalDate start = LocalDate.parse("2020-11-03");
LocalDate end = LocalDate.parse("2020-12-15");
long diff = DAYS.between(start, end);
// for example, february of 2000
YearMonth.of(2000, 2).lengthOfMonth();
LocalDate jamesBirthDay = new LocalDate(1955, 5, 19);
LocalDate now = new LocalDate(2015, 7, 30);
int monthsBetween = Months.monthsBetween(jamesBirthDay, now).getMonths();
int yearsBetween = Years.yearsBetween(jamesBirthDay, now).getYears();
System.out.println("Month since father of Java born : "
+ monthsBetween);
System.out.println("Number of years since father of Java born : "
+ yearsBetween);