I am trying to get the difference between the two dates using joda time, but somehow I am not able to get the exact difference.
LocalDate endofCentury = new LocalDate(2014, 01, 01);
LocalDate now = LocalDate.now(); //2017-04-11
Period diff = new Period(endofCentury, now);
System.out.printf("Difference is %d years, %d months and %d days old",
diff.getYears(), diff.getMonths(), diff.getDays());
The difference should come as 3 years, 3 months, 10 days but I am getting 3 years, 3 months and 3 days.
Not sure what I am missing, please help me out.
Thanks