addWeekOfYear()

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

Syntax

Calendar addWeekOfYear(Numeric amount)
  1. amount is the amount of date or time to be added to the Week of Year field.

Usage

For example, add 12 weeks to the current time of the Week of Year field by calling:
Calendar.fromDate(Date.parseString("08/31/1999","mm/dd/yyyy")).addWeekOfYear(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("08/31/1999","mm/dd/yyyy")).addWeekOfYear(12).toDate()