Comments and Discussions
You don't need to login to post your comment
Comments:
30
Views:
60k
Likes:
120k
Anonymous
🌐 India
A
Was this answer helpful?
Anonymous
🌐 India
LocalDate date1 = LocalDate.now();
LocalDate date2 = date1.plus(1, ChronoUnit.MONTHS);
Period period = Period.between(date2, date1);
System.out.println("Period: " + period);
LocalDate date2 = date1.plus(1, ChronoUnit.MONTHS);
Period period = Period.between(date2, date1);
System.out.println("Period: " + period);
Was this answer helpful?