$calendar.withWeekAdded($value)
Creates a new calendar from the given calendar, adding value to the calendar week. The addition of the value can have an effect on other values, for example the day.
| Name | Type | Description | Mandatory | Default |
|---|---|---|---|---|
| calendar | Business object | The calendar whose calendar week is to be changed. It can be a system or user calendar. | yes | |
| value | Number | Value by which the calendar week should be increased. | yes |
Type: Business object
A calendar with the changed value for the calendar week.
dateTime(2012, 8, 15, 7, 55, 24, 13).toUserCalendar().withWeekAdded(5).week()
Output: 42
dateTime(2012, 8, 15, 7, 55, 24, 13).toUserCalendar().withWeekAdded(5).day()
Output: 20
Adjusting week also changes other values such as day.