withDayAdded

Syntax

	$calendar.withDayAdded($value)

Description

Creates a new calendar from the given calendar, adding value to the day. The addition of the value can affect other values, for example the month.

Parameters

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 day of the calendar. yes

Return value

Type: Business object

A calendar with the modified value for the day.

Examples

	date(2012, 8, 10).toUserCalendar().withDayAdded(5).day()

Output: 15