$calendar.withDayOfWeekAdded($value)
Creates a new calendar from the given calendar, adding value to the day of the 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 day of the week is to be changed. It can be a system or user calendar. | yes | |
| value | Number | Value by which the day of the week should be increased. | yes |
Type: Business object
A calendar with the changed value for the day of the week.
dateTime(2012, 8, 14, 7, 55, 24, 13).toUserCalendar().withDayOfWeekAdded(1).dayOfWeek()
Output: 7
dateTime(2012, 8, 14, 7, 55, 24, 13).toUserCalendar().withDayOfWeekAdded(1).day()
Output: 15
Adjusting dayOfWeek also changes other values such as the day.