rollWeekOfYear()

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

Syntax

Calendar rollWeekOfYear(Numeric amount)
  1. amount is the signed amount to add to the Week of Year field.

Usage

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