Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.

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 ግንቦት, the 9th month of the Ethiopic year.

int HAMLE

Constant for ሐምሌ, the 11th month of the Ethiopic year.

int HEDAR

Constant for ኅዳር, the 3rd month of the Ethiopic year.

int MEGABIT

Constant for መጋቢት, the 7th month of the Ethiopic year.

int MESKEREM

Constant for መስከረም, the 1st month of the Ethiopic year.

int MIAZIA

Constant for ሚያዝያ, the 8th month of the Ethiopic year.

int NEHASSE

Constant for ነሐሴ, the 12th month of the Ethiopic year.

int PAGUMEN

Constant for ጳጉሜን, the 13th month of the Ethiopic year.

int SENE

Constant for ሰኔ, the 10th month of the Ethiopic year.

int TAHSAS

Constant for ታኅሣሥ, the 4th month of the Ethiopic year.

int TEKEMT

Constant for ጥቅምት, the 2nd month of the Ethiopic year.

int TER

Constant for ጥር, the 5th month of the Ethiopic year.

int YEKATIT

Constant for የካቲት, the 6th month of the Ethiopic year.

Inherited constants

Inherited fields

Public constructors

EthiopicCalendar()

Constructs a default EthiopicCalendar using the current time in the default time zone with the default locale.

EthiopicCalendar(TimeZone zone)

Constructs a EthiopicCalendar based on the current time in the given time zone with the default locale.

EthiopicCalendar(Locale aLocale)

Constructs a EthiopicCalendar based on the current time in the default time zone with the given locale.

EthiopicCalendar(ULocale locale)

Constructs a EthiopicCalendar based on the current time in the default time zone with the given locale.

EthiopicCalendar(TimeZone zone, Locale aLocale)

Constructs a EthiopicCalendar based on the current time in the given time zone with the given locale.

EthiopicCalendar(TimeZone zone, ULocale locale)

Constructs a EthiopicCalendar based on the current time in the given time zone with the given locale.

EthiopicCalendar(int year, int month, int date)

Constructs a EthiopicCalendar with the given date set in the default time zone with the default locale.

EthiopicCalendar(Date date)

Constructs a EthiopicCalendar with the given date set in the default time zone with the default locale.

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.

Public methods

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.

Protected methods

int handleComputeMonthStart(int eyear, int emonth, boolean useMonth)

Return JD of start of given month/extended year

int handleGetLimit(int field, int limitType)

Calculate the limit for a specified type of limit and field

int handleGetMonthLength(int extendedYear, int month)

Return the number of days in the given month of the given extended year of this calendar system.

Inherited methods

Constants

GENBOT

added in API level 26
public static final int GENBOT

Constant for ግንቦት, the 9th month of the Ethiopic year.

Constant Value: 8 (0x00000008)

HAMLE

added in API level 26
public static final int HAMLE

Constant for ሐምሌ, the 11th month of the Ethiopic year.

Constant Value: 10 (0x0000000a)

HEDAR

added in API level 26
public static final int HEDAR

Constant for ኅዳር, the 3rd month of the Ethiopic year.

Constant Value: 2 (0x00000002)

MEGABIT

added in API level 26
public static final int MEGABIT

Constant for መጋቢት, the 7th month of the Ethiopic year.

Constant Value: 6 (0x00000006)

MESKEREM

added in API level 26
public static final int MESKEREM

Constant for መስከረም, the 1st month of the Ethiopic year.

Constant Value: 0 (0x00000000)

MIAZIA

added in API level 26
public static final int MIAZIA

Constant for ሚያዝያ, the 8th month of the Ethiopic year.

Constant Value: 7 (0x00000007)

NEHASSE

added in API level 26
public static final int NEHASSE

Constant for ነሐሴ, the 12th month of the Ethiopic year.

Constant Value: 11 (0x0000000b)

PAGUMEN

added in API level 26
public static final int PAGUMEN

Constant for ጳጉሜን, the 13th month of the Ethiopic year.

Constant Value: 12 (0x0000000c)

SENE

added in API level 26
public static final int SENE

Constant for ሰኔ, the 10th month of the Ethiopic year.

Constant Value: 9 (0x00000009)

TAHSAS

added in API level 26
public static final int TAHSAS

Constant for ታኅሣሥ, the 4th month of the Ethiopic year.

Constant Value: 3 (0x00000003)

TEKEMT

added in API level 26
public static final int TEKEMT

Constant for ጥቅምት, the 2nd month of the Ethiopic year.

Constant Value: 1 (0x00000001)

TER

added in API level 26
public static final int TER

Constant for ጥር, the 5th month of the Ethiopic year.

Constant Value: 4 (0x00000004)

YEKATIT

added in API level 26
public static final int YEKATIT

Constant for የካቲት, the 6th month of the Ethiopic year.

Constant Value: 5 (0x00000005)

Public constructors

EthiopicCalendar

added in API level 26
public EthiopicCalendar ()

Constructs a default EthiopicCalendar using the current time in the default time zone with the default locale.

EthiopicCalendar

added in API level 26
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

added in API level 26
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.

EthiopicCalendar

added in API level 26
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

added in API level 26
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

added in API level 26
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

added in API level 26
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

added in API level 26
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

added in API level 26
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.

Public methods

getType

added in API level 26
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

added in API level 26
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

added in API level 26
public void setAmeteAlemEra (boolean onOff)

Set Alem or Mihret era.

Parameters
onOff boolean: Set Amete Alem era if true, otherwise set Amete Mihret era.

Protected methods

handleComputeMonthStart

added in API level 26
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

handleGetLimit

added in API level 26
protected int handleGetLimit (int field, 
                int limitType)

Calculate the limit for a specified type of limit and field

Parameters
field int: one of the above field numbers

limitType int: one of MINIMUM, GREATEST_MINIMUM, LEAST_MAXIMUM, or MAXIMUM

Returns
int

handleGetMonthLength

added in API level 26
protected int handleGetMonthLength (int extendedYear, 
                int month)

Return the number of days in the given month of the given extended year of this calendar system. Subclasses should override this method if they can provide a more correct or more efficient implementation than the default implementation in Calendar.

Parameters
extendedYear int

month int

Returns
int