withDayOfYearAdded

Syntax

	$calendar.withDayOfYearAdded($value)

Description

Creates a new calendar from the given calendar, adding value to the day of the year. The addition of the value can have an effect on other values, for example the day.

Parameters

Name Type Description Mandatory Default
calendar Business object The calendar whose day of the year is to be changed. It can be a system or user calendar. yes
value Number Value by which the day of the year should be increased. yes

Return value

Type: Business Object

A calendar with the changed value for the day of the year.

Examples

DayOfYear after adjustment

	dateTime(2012, 8, 14, 7, 55, 24, 13).toUserCalendar().withDayOfYearAdded(5).dayOfYear()

Output: 263

Day after adjustment

	dateTime(2012, 8, 14, 7, 55, 24, 13).toUserCalendar().withDayOfYearAdded(5).day()

Output: 19

Adjusting dayOfYear also changes other values such as day.