addDayOfMonth()

Adds or subtracts the specified amount of time to the given Day of Month field, based on the calendar's rules.

Syntax

Calendar addDayOfMonth(Numeric amount)
  1. amount is the amount of date or time to be added to the Day of Month field.

Example

To subtract 5 days from the current time of the calendar:

addDayOfMonth(-5)