$calendar.withAmPm($value)
Creates a new calendar from the given calendar, setting the time of day (a.m. or p.m.) to amPm. Changing the time of day can also change other values such as the hour.
| Name | Type | Description | Mandatory | Default |
|---|---|---|---|---|
| calendar | Business object | The calendar whose time of day is to be changed. It can be a system or user calendar. | yes | |
| amPm | Number | Value for the morning a.m. (0) and the afternoon p.m. (1). | yes |
Type: Business object
A calendar with the modified value for the time of day.
dateTime(2012, 8, 10, 7, 55, 24, 13).toUserCalendar().withAmPm(1).amPm()
Output: 1
dateTime(2012, 8, 10, 7, 55, 24, 13).toUserCalendar().withAmPm(1).hour()
Output: 19
By changing to p.m., 7 now stands for 19 hours.