EthiopicCalendar
public
final
class
EthiopicCalendar
extends Calendar
| java.lang.Object | ||
| ↳ | android.icu.util.Calendar | |
| ↳ | android.icu.util.EthiopicCalendar | |
Implement the Ethiopic calendar system.
EthiopicCalendar usually should be instantiated using
Calendar.getInstance(ULocale) passing in a ULocale
with the tag "@calendar=ethiopic".
See also:
Summary
Constants | |
|---|---|
int |
GENBOT
Constant for \u130d\u1295\u1266\u1275, the 9th month of the Ethiopic year. |
int |
HAMLE
Constant for \u1210\u121d\u120c, the 11th month of the Ethiopic year. |
int |
HEDAR
Constant for \u1285\u12f3\u122d, the 3rd month of the Ethiopic year. |
int |
MEGABIT
Constant for \u1218\u130b\u1262\u1275, the 7th month of the Ethiopic year. |
int |
MESKEREM
Constant for \u1218\u1235\u12a8\u1228\u121d, the 1st month of the Ethiopic year. |
int |
MIAZIA
Constant for \u121a\u12eb\u12dd\u12eb, the 8th month of the Ethiopic year. |
int |
NEHASSE
Constant for \u1290\u1210\u1234, the 12th month of the Ethiopic year. |
int |
PAGUMEN
Constant for \u1333\u1309\u121c\u1295, the 13th month of the Ethiopic year. |
int |
SENE
Constant for \u1230\u1294, the 10th month of the Ethiopic year. |
int |
TAHSAS
Constant for \u1273\u1285\u1223\u1225, the 4th month of the Ethiopic year. |
int |
TEKEMT
Constant for \u1325\u1245\u121d\u1275, the 2nd month of the Ethiopic year. |
int |
TER
Constant for \u1325\u122d, the 5th month of the Ethiopic year. |
int |
YEKATIT
Constant for \u12e8\u12ab\u1272\u1275, the 6th month of the Ethiopic year. |
Inherited constants |
|---|
Inherited fields |
|---|
Public constructors | |
|---|---|
EthiopicCalendar()
Constructs a default |
|
EthiopicCalendar(TimeZone zone)
Constructs a |
|
EthiopicCalendar(TimeZone zone, ULocale locale)
Constructs a |
|
EthiopicCalendar(TimeZone zone, Locale aLocale)
Constructs a |
|
EthiopicCalendar(ULocale locale)
Constructs a |
|
EthiopicCalendar(int year, int month, int date)
Constructs a |
|
EthiopicCalendar(int year, int month, int date, int hour, int minute, int second)
Constructs a |
|
EthiopicCalendar(Date date)
Constructs a |
|
EthiopicCalendar(Locale aLocale)
Constructs a |
|
Public methods | |
|---|---|
String
|
getTemporalMonthCode()
Gets The Temporal monthCode value corresponding to the month for the date. |
String
|
getType()
[icu] Returns the calendar type name string for this Calendar object. |
boolean
|
isAmeteAlemEra()
Return true if this calendar is set to the Amete Alem era. |
void
|
setAmeteAlemEra(boolean onOff)
Set Alem or Mihret era. |
void
|
setTemporalMonthCode(String temporalMonth)
Sets The Temporal monthCode which is a string identifier that starts with the literal grapheme "M" followed by two graphemes representing the zero-padded month number of the current month in a normal (non-leap) year. |
Protected methods | |
|---|---|
int
|
handleComputeMonthStart(int eyear, int emonth, boolean useMonth)
Return JD of start of given month/extended year |
Inherited methods | |
|---|---|
Constants
GENBOT
public static final int GENBOT
Constant for \u130d\u1295\u1266\u1275, the 9th month of the Ethiopic year.
Constant Value: 8 (0x00000008)
HAMLE
public static final int HAMLE
Constant for \u1210\u121d\u120c, the 11th month of the Ethiopic year.
Constant Value: 10 (0x0000000a)
HEDAR
public static final int HEDAR
Constant for \u1285\u12f3\u122d, the 3rd month of the Ethiopic year.
Constant Value: 2 (0x00000002)
MEGABIT
public static final int MEGABIT
Constant for \u1218\u130b\u1262\u1275, the 7th month of the Ethiopic year.
Constant Value: 6 (0x00000006)
MESKEREM
public static final int MESKEREM
Constant for \u1218\u1235\u12a8\u1228\u121d, the 1st month of the Ethiopic year.
Constant Value: 0 (0x00000000)
MIAZIA
public static final int MIAZIA
Constant for \u121a\u12eb\u12dd\u12eb, the 8th month of the Ethiopic year.
Constant Value: 7 (0x00000007)
NEHASSE
public static final int NEHASSE
Constant for \u1290\u1210\u1234, the 12th month of the Ethiopic year.
Constant Value: 11 (0x0000000b)
PAGUMEN
public static final int PAGUMEN
Constant for \u1333\u1309\u121c\u1295, the 13th month of the Ethiopic year.
Constant Value: 12 (0x0000000c)
SENE
public static final int SENE
Constant for \u1230\u1294, the 10th month of the Ethiopic year.
Constant Value: 9 (0x00000009)
TAHSAS
public static final int TAHSAS
Constant for \u1273\u1285\u1223\u1225, the 4th month of the Ethiopic year.
Constant Value: 3 (0x00000003)
TEKEMT
public static final int TEKEMT
Constant for \u1325\u1245\u121d\u1275, the 2nd month of the Ethiopic year.
Constant Value: 1 (0x00000001)
TER
public static final int TER
Constant for \u1325\u122d, the 5th month of the Ethiopic year.
Constant Value: 4 (0x00000004)
YEKATIT
public static final int YEKATIT
Constant for \u12e8\u12ab\u1272\u1275, the 6th month of the Ethiopic year.
Constant Value: 5 (0x00000005)
Public constructors
EthiopicCalendar
public EthiopicCalendar ()
Constructs a default EthiopicCalendar using the current time
in the default time zone with the default locale.
EthiopicCalendar
public EthiopicCalendar (TimeZone zone)
Constructs a EthiopicCalendar based on the current time
in the given time zone with the default locale.
| Parameters | |
|---|---|
zone |
TimeZone: The time zone for the new calendar. |
EthiopicCalendar
public EthiopicCalendar (TimeZone zone, ULocale locale)
Constructs a EthiopicCalendar based on the current time
in the given time zone with the given locale.
| Parameters | |
|---|---|
zone |
TimeZone: The time zone for the new calendar. |
locale |
ULocale: The icu locale for the new calendar. |
EthiopicCalendar
public EthiopicCalendar (TimeZone zone, Locale aLocale)
Constructs a EthiopicCalendar based on the current time
in the given time zone with the given locale.
| Parameters | |
|---|---|
zone |
TimeZone: The time zone for the new calendar. |
aLocale |
Locale: The locale for the new calendar. |
EthiopicCalendar
public EthiopicCalendar (ULocale locale)
Constructs a EthiopicCalendar based on the current time
in the default time zone with the given locale.
| Parameters | |
|---|---|
locale |
ULocale: The icu locale for the new calendar. |
EthiopicCalendar
public EthiopicCalendar (int year,
int month,
int date)Constructs a EthiopicCalendar with the given date set
in the default time zone with the default locale.
| Parameters | |
|---|---|
year |
int: The value used to set the calendar's YEAR time field. |
month |
int: The value used to set the calendar's MONTH time field.
The value is 0-based. e.g., 0 for Meskerem. |
date |
int: The value used to set the calendar's DATE time field. |
EthiopicCalendar
public EthiopicCalendar (int year,
int month,
int date,
int hour,
int minute,
int second)Constructs a EthiopicCalendar with the given date
and time set for the default time zone with the default locale.
| Parameters | |
|---|---|
year |
int: The value used to set the calendar's YEAR time field. |
month |
int: The value used to set the calendar's MONTH time field.
The value is 0-based. e.g., 0 for Meskerem. |
date |
int: The value used to set the calendar's DATE time field. |
hour |
int: The value used to set the calendar's HOUR_OF_DAY time field. |
minute |
int: The value used to set the calendar's MINUTE time field. |
second |
int: The value used to set the calendar's SECOND time field. |
EthiopicCalendar
public EthiopicCalendar (Date date)
Constructs a EthiopicCalendar with the given date set
in the default time zone with the default locale.
| Parameters | |
|---|---|
date |
Date: The date to which the new calendar is set. |
EthiopicCalendar
public EthiopicCalendar (Locale aLocale)
Constructs a EthiopicCalendar based on the current time
in the default time zone with the given locale.
| Parameters | |
|---|---|
aLocale |
Locale: The locale for the new calendar. |
Public methods
getTemporalMonthCode
public String getTemporalMonthCode ()
Gets The Temporal monthCode value corresponding to the month for the date. The value is a string identifier that starts with the literal grapheme "M" followed by two graphemes representing the zero-padded month number of the current month in a normal (non-leap) year. For the short thirteen month in each year in the CECalendar, the value is "M13".
| Returns | |
|---|---|
String |
One of 13 possible strings in {"M01".. "M12", "M13"}. |
getType
public String getType ()
[icu] Returns the calendar type name string for this Calendar object. The returned string is the legacy ICU calendar attribute value, for example, "gregorian" or "japanese".
See type="old type name" for the calendar attribute of locale IDs at http://www.unicode.org/reports/tr35/#Key_Type_Definitions
| Returns | |
|---|---|
String |
legacy calendar type name string |
isAmeteAlemEra
public boolean isAmeteAlemEra ()
Return true if this calendar is set to the Amete Alem era.
| Returns | |
|---|---|
boolean |
true if set to the Amete Alem era. |
setAmeteAlemEra
public void setAmeteAlemEra (boolean onOff)
Set Alem or Mihret era.
| Parameters | |
|---|---|
onOff |
boolean: Set Amete Alem era if true, otherwise set Amete Mihret era. |
setTemporalMonthCode
public void setTemporalMonthCode (String temporalMonth)
Sets The Temporal monthCode which is a string identifier that starts with the literal grapheme "M" followed by two graphemes representing the zero-padded month number of the current month in a normal (non-leap) year. For CECalendar calendar, the values are "M01" .. "M13" while the "M13" is represent the short thirteen month in each year.
| Parameters | |
|---|---|
temporalMonth |
String: One of 13 possible strings in {"M01".. "M12", "M13"}. |
Protected methods
handleComputeMonthStart
protected int handleComputeMonthStart (int eyear,
int emonth,
boolean useMonth)Return JD of start of given month/extended year
| Parameters | |
|---|---|
eyear |
int: the extended year |
emonth |
int: the zero-based month, or 0 if useMonth is false |
useMonth |
boolean: if false, compute the day before the first day of
the given year, otherwise, compute the day before the first day of
the given month |
| Returns | |
|---|---|
int |
the Julian day number of the day before the first day of the given month and year |