withMonthAdded
Syntax
$calendar.withMonthAdded($value)
Description
Creates a new calendar from the given calendar, increasing the month by value
. The addition of the value can have an effect on other values, for example the year.
Parameters
Name | Type | Description | Mandatory | Default |
---|---|---|---|---|
calendar | Business object | The calendar whose month is to be changed. It can be a system or user calendar. | yes | |
value | number | Value to be added to the current month of the calendar. | yes |
Return value
Type: Business object
A calendar with the modified value for the month.
Examples
date(2012, 8, 10).toUserCalendar().withMonthAdded(10).month()
Output: 6