It is necessary to calculate the difference (in days) between two points in time. Does not work. Help is needed.
package util; import java.time.LocalDate; import java.time.Period; import java.time.temporal.ChronoUnit; public class CountOfLivedDays { public static void main(String[] args) { LocalDate born = LocalDate.of(2000, 9, 29); LocalDate now = LocalDate.now(); Period period = Period.between(born, now); System.out.println(period.get(ChronoUnit.DAYS)) // 22 System.out.println(period.getYears()); // 16 System.out.println(period.getMonths()); // 2 System.out.println(period.getDays()); // 22 } }