toUserCalendar
Syntax
$date.toUserCalendar()
Description
Transforms a date value to a user calendar to be able to access and manipulate fields like year, month, etc.
The date value is expected to be of type tl.core:DateTime
.
Parameters
Name | Type | Description | Mandatory | Default |
---|---|---|---|---|
date | Business object | A date value to be represented by the calendar. | yes |
Return value
Type: Business object
A user calendar representing the date from date
.
Examples
Note: The output may differ depending on the calendar's time zone.
toUserCalendar(date(2012, 5, 5))
Output: (User) calendar object