code: public static Date addMonths(Date date, int iMonths) {
      Calendar dateTime = dateToCalendar(date);
      dateTime.add(Calendar.MONTH, iMonths);
      return dateTime.getTime();
    }
docs: Adds the specified (signed) amount of months to the given date. For
  example, to subtract 5 months from the current date, you can
  achieve it by calling: <code>addMonths(Date, -5)</code>.
  
  @param date    The time.
  @param iMonths The amount of months to add.
  
  @return A new date with the months added.