I am writing a program that is supposed to just calculate the months between 2 given dates and return the value to the program. For instance, if I have to calculate the numb
DateTime start = new DateTime().withDate(2011, 4, 1);
DateTime end = new DateTime().withDate(2011, 2, 1);
Period p = new Period(start, end, PeriodType.months().withDaysRemoved());
int months = p.getMonths();
System.out.println(months);
wrong output in this case