withWeek

Syntax

	$calendar.withWeek($week)

Description

Creates a new calendar from the given calendar, setting the calendar week to week. Changing the calendar week can also change other values such as the month.

Parameters

Name Type Description Mandatory Default
calendar Business object The calendar whose calendar week is to be changed. It can be a system or user calendar. yes
week Number Value for the new calendar week to be set for the calendar. yes

Return value

Type: Business object

A calendar with the changed value for the calendar week.

Examples

	dateTime(2012, 8, 10, 7, 55, 24, 13).toUserCalendar().withWeek(15).week()

Output: 15