Subtract months from date in velocity
问题 I am trying to get the date a certain number of months ago from a given date I've tried converting to Calendar to then use the add method, but that didn't work: #set( $myCalendar = $date.toCalendar($endDate)) #set( $startdate = $calendarstart.add("MONTH", -$minusMonths)) I've tried to do this in a few different ways: #set( $temp = 0 - $numberOfMissedPremiums) #evaluate($calendarstart.add( 2 , $temp )) #set( $a = $calendarstart.add( 2 , $temp )) I've even tried defining blocks, but that didn't