rollYear()

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

Syntax

Calendar rollYear(Numeric amount)
  1. amount is the signed amount to add to the Year field.

Usage

This method rolls the year value in the range between 1 and the value returned by calling getMaximumYear().