public static Date addMonths ( Date d , int months ) { Calendar cal = Calendar . getInstance ( ) ; cal . setTime ( d ) ; cal . add ( Calendar . MONTH , months ) ; return cal . getTime ( ) ; }
Add months to a date