add month to date in apex
date + ( ( 365 / 12 ) * Number_months )
//or
DATE(
YEAR( date ) + FLOOR( ( MONTH ( date ) + 2 - 1 ) / 12 ),
MOD( MONTH ( date ) + 2 - 1 +
IF( DAY ( date ) > CASE( MOD( MONTH( date ) + 2 - 1, 12 ) + 1,
2, 28,
4, 30,
6, 30,
9, 30,
11, 30,
31 ), 1, 0 ), 12 ) + 1,
IF( DAY( date ) > CASE( MOD( MONTH( date ) + 2 - 1, 12 ) + 1,
2, 28,
4, 30,
6, 30,
9, 30,
11, 30,
31 ),
1, DAY( date )
)
)