rollDayOfMonth()

Adds the specified (signed) amount to the Day of Month field, without changing larger fields.

Syntax

Calendar rollDayOfMonth(Numeric amount)
  1. amount is the signed amount to add to the Day of Month field.

Usage

For example, to roll the current date up by one day call:
Calendar.fromDate(Date.parseString("08/05/1999","mm/dd/yyyy")).rollDayOfMonth(1).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("08/05/1999","mm/dd/yyyy")).rollDayOfMonth(1).toDate()