withDayOfYear
Syntax
$calendar.withDayOfYear($day)
Description
Creates a new calendar from the given calendar, setting day of the year to day
. Changing the day can also change other values such as the month.
Parameters
Name | Type | Description | Mandatory | Default |
---|---|---|---|---|
calendar | Business object | The calendar whose day if the year is to be changed. It can be a system or user calendar. | yes | |
day | Number | Value for the new day if the year to set for the calendar. | yes |
Return value
Type: Business object
A calendar with the changed value for the day of the year.
Examples
dateTime(2012, 8, 10, 7, 55, 24, 13).toUserCalendar().withDayOfYear(200).dayOfYear()
Output: 200