era
Syntax
$calendar.era()
Description
Returns the epoch of the given calendar. Depending on the type of calendar, the return values mean a different epoch. In the GregorianCalendar the time before Christ (BC) corresponds to the number 0 and after Christ (AD) to the number 1.
Parameters
Name | Type | Description | Mandatory | Default |
---|---|---|---|---|
calendar | Business object | The calendar whose epoch is to be determined. It can be a system or user calendar. | yes |
Return value
Type: Number
A number corresponding to the epoch of the given calendar.
Examples
date(2021, 9, 12).toSystemCalendar().era()
Output: 1
Corresponds to the epoch "AD", that is, after Christ.