title: Number of months between 2 java.util.Date, excluding day of month
body: <p>I want the number of months between 2 <code>java.util.Date</code>'s, without the days in month counted.
  So I just want the year and month in the comparison.</p>
  <h3>Example:</h3>
  <pre><code> monthsBetween(new Date(2012,01,28), new Date(2012,02,01)) ---&gt; 1
  
   monthsBetween(new Date(2012,02,27), new Date(2012,02,28)) ---&gt; 0
  
   monthsBetween(new Date(2012,03,28), new Date(2012,07,01)) ---&gt; 4
  </code></pre>
  <p>I have tried this (returns 0, expected 1), using Joda-time:</p>
  <pre><code>private static int monthsBetween(final Date fromDate, final Date toDate) {
      DateTime date1 = new DateTime().withDate(2012, 1, 20);
      DateTime date2 = new DateTime().withDate(2012, 2, 13);
      PeriodType monthDay = PeriodType.yearDayTime().withDaysRemoved();
      Period difference = new Period(date1, date2, monthDay);
      int months = difference.getMonths();
      
      return months;
   }
  </code></pre>
  <p>And also this (same results), using Joda-time:</p>
  <pre><code>private static int monthsBetween(final Date fromDate, final Date toDate) {
          return Months.monthsBetween(new DateTime(fromDate), new   DateTime(toDate).getMonths();
      }
  </code></pre>
  <p>How can I accomplish this?</p>