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