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.

Usage

For example, add 12 days to the current Day of Month field by calling:
Calendar.fromDate(Date.parseString("10/08/1999","mm/dd/yyyy")).addDayOfMonth(12).toDate().format("mm/dd/yyyy")
This example populates a Word Box. To achieve the same goal and populate a Date box, call:
Calendar.fromDate(Date.parseString("10/08/1999","mm/dd/yyyy")).addDayOfMonth(12).toDate()