withDay
Syntax
$calendar.withDay(day)
Description
Creates a new calendar from the given calendar, setting the day to day
. Changing the day can also change other values such as the calendar week .
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 | |
day | Number | Value for the new day to set for the calendar. | yes |
Return value
Type: Business object
A calendar with the changed value for the day.
Examples
date(2012, 8, 15).toUserCalendar().withDay(22).day()
Output: 22