$calendar.withYearAdded($value)
Creates a new calendar from the given calendar, adding value to the year. The addition of the value can have an effect on other values, for example the day of the week.
| Name | Type | Description | Mandatory | Default |
|---|---|---|---|---|
| calendar | Business object | The calendar whose day is to be changed. It can be a system or user calendar. | yes | |
| value | Number | Value to be added to the current year of the calendar. | yes |
Type: Business object
A calendar with the modified value for the year.
date(2012, 8, 10).toUserCalendar().withYearAdded(2).year()
Output: 2014