Calendar.addYears

Add the specified number of years to the given Time.

The generic algorithm uses information provided by the abstract methods. Derived classes may re-implement this in order to optimize the algorithm

Note that the generic algorithm does not take into account crossing era boundaries. Derived classes may support this.

class Calendar
Time
addYears
(
Time t
,
int nYears
)

Parameters

nYears int

The number of years to add. This can be negative.

Return Value

Type: Time

A Time that represents the provided time with the number of years added.

Meta