public XMLGregorianCalendar addMonths(final XMLGregorianCalendar cal, final int amount) {
        XMLGregorianCalendar to = buildXMLGregorianCalendarDate(cal);
        // Add amount of months
        to.add(addMonths(amount));
        return to;
    }
public XMLGregorianCalendar addMonths ( final XMLGregorianCalendar cal , final int amount ) { XMLGregorianCalendar to = buildXMLGregorianCalendarDate ( cal ) ; to . add ( addMonths ( amount ) ) ; return to ; }
Add Months to a Gregorian Calendar.

@param cal The XMLGregorianCalendar source
@param amount The amount of months. Can be a negative Integer to
substract.
@return A XMLGregorianCalendar with the new Date