withSecond
Syntax
$calendar.withSecond($second)
Description
Creates a new calendar from the given calendar, setting the seconds to second
.
Parameters
Name | Type | Description | Mandatory | Default |
---|---|---|---|---|
calendar | Business object | The calendar whose second is to be changed. It can be a system or user calendar. | yes | |
second | Number | Value for the new second to be set for the calendar. | yes |
Return value
Type: Business object
A calendar with the changed value for the second.
Examples
dateTime(2012, 8, 15, 5, 55, 24, 45).toUserCalendar().withSecond(22).second()
Output: 22