public class EraRules extends Object
EraRules represents calendar era rules specified
in supplementalData/calendarData.| Modifier and Type | Field and Description |
|---|---|
static int |
MIN_ENCODED_START |
| Modifier and Type | Method and Description |
|---|---|
int |
getCurrentEraIndex()
Gets the current era index.
|
int |
getEraIndex(int year,
int month,
int day)
Returns era index for the specified year/month/day.
|
static EraRules |
getInstance(CalType calType,
boolean includeTentativeEra) |
int |
getNumberOfEras()
Gets number of effective eras
|
int[] |
getStartDate(int eraIdx,
int[] fillIn)
Gets start date of an era
|
int |
getStartYear(int eraIdx)
Gets start year of an era
|
public int getNumberOfEras()
public int[] getStartDate(int eraIdx,
int[] fillIn)
eraIdx - Era indexfillIn - Receives date fields if supplied. If null, or size of array
is less than 3, then a new int[] will be newly allocated.public int getStartYear(int eraIdx)
eraIdx - Era indexpublic int getEraIndex(int year,
int month,
int day)
year - Yearmonth - Month (1-base)day - Day of monthpublic int getCurrentEraIndex()