addMonth()
Adds or subtracts the specified amount of time to the given
Month
field, based on the calendar's rules.
Syntax
Calendar addMonth(Numeric amount)
- amount is the amount of date or time to be added to the
Month
field.
Usage
For example, to subtract 5 months from the current time of the calendar, you can achieve it by
calling:
addMonth(-5)