Top Description Fields Constructors Methods
com.ibm.icu.util

public final Class EthiopicCalendar

extends CECalendar
Class Inheritance
Imports
java.util.Date, .Locale, com.ibm.icu.impl.CalendarUtil, com.ibm.icu.util.ULocale.Category

Implement the Ethiopic calendar system.

EthiopicCalendar usually should be instantiated using com.ibm.icu.util.Calendar#getInstance(ULocale) passing in a ULocale with the tag "@calendar=ethiopic".

ICU Status
Stable since ICU 3.4.
See Also
com.ibm.icu.util.Calendar

Field Summary

Modifier and TypeField and Description
private static final int
private static final int
private static final int
private static final int
private static final int
private int
public static final int
GENBOT

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

public static final int
HAMLE

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

public static final int
HEDAR

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

private static final int
public static final int
MEGABIT

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

public static final int
MESKEREM

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

public static final int
MIAZIA

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

public static final int
NEHASSE

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

public static final int
PAGUMEN

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

public static final int
SENE

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

private static final long
public static final int
TAHSAS

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

public static final int
TEKEMT

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

public static final int
TER

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

public static final int
YEKATIT

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

Constructor Summary

AccessConstructor and Description
public
EthiopicCalendar()

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

public
EthiopicCalendar(TimeZone
The time zone for the new calendar.
zone
)

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

public
EthiopicCalendar(Locale
The locale for the new calendar.
aLocale
)

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

public
EthiopicCalendar(ULocale
The icu locale for the new calendar.
locale
)

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

public
EthiopicCalendar(TimeZone
The time zone for the new calendar.
zone
,
Locale
The locale for the new calendar.
aLocale
)

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

public
EthiopicCalendar(TimeZone
The time zone for the new calendar.
zone
,
ULocale
The icu locale for the new calendar.
locale
)

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

public
EthiopicCalendar(int
The value used to set the calendar's YEAR time field.
year
,
int
The value used to set the calendar's MONTH time field. The value is 0-based. e.g., 0 for Meskerem.
month
,
int
The value used to set the calendar's DATE time field.
date
)

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

public
EthiopicCalendar(Date
The date to which the new calendar is set.
date
)

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

public
EthiopicCalendar(int
The value used to set the calendar's YEAR time field.
year
,
int
The value used to set the calendar's MONTH time field. The value is 0-based. e.g., 0 for Meskerem.
month
,
int
The value used to set the calendar's DATE time field.
date
,
int
The value used to set the calendar's HOUR_OF_DAY time field.
hour
,
int
The value used to set the calendar's MINUTE time field.
minute
,
int
The value used to set the calendar's SECOND time field.
second
)

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

Method Summary

Modifier and TypeMethod and Description
public static int
EthiopicToJD(long
the year
year
,
int
the month
month
,
int
the day
date
)

Convert an Ethiopic year, month, and day to a Julian day.

protected int
getJDEpochOffset()

Implements abstract com.ibm.icu.util.CECalendar.getJDEpochOffset.

Deprecated This API is ICU internal only.
The Coptic and Ethiopic calendars differ only in their epochs.
public String
protected void
handleComputeFields(int julianDay)

Overrides com.ibm.icu.util.Calendar.handleComputeFields.

Deprecated This API is ICU internal only.
Subclasses may override this method to compute several fields specific to each calendar system.
protected int
handleGetExtendedYear()

Implements abstract com.ibm.icu.util.Calendar.handleGetExtendedYear.

Deprecated This API is ICU internal only.
Returns the extended year defined by the current fields.
protected int
handleGetLimit(int
one of the above field numbers
field
,
int
one of MINIMUM, GREATEST_MINIMUM, LEAST_MAXIMUM, or MAXIMUM
limitType
)

Overrides com.ibm.icu.util.CECalendar.handleGetLimit.

Deprecated This API is ICU internal only.
Calculate the limit for a specified type of limit and field
public boolean

Returns:

true if set to the Amete Alem era.
isAmeteAlemEra
()

Return true if this calendar is set to the Amete Alem era.

public void
setAmeteAlemEra(boolean
Set Amete Alem era if true, otherwise set Amete Mihret era.
onOff
)

Set Alem or Mihret era.

private void
setCalcTypeForLocale(ULocale locale)

set type based on locale

Inherited from com.ibm.icu.util.CECalendar:
ceToJDgetTemporalMonthCodehandleComputeMonthStarthandleGetMonthLengthjdToCEsetTemporalMonthCode

Field Detail

AMETE_ALEMback to summary
private static final int AMETE_ALEM
AMETE_ALEM_ERAback to summary
private static final int AMETE_ALEM_ERA
AMETE_MIHRETback to summary
private static final int AMETE_MIHRET
AMETE_MIHRET_DELTAback to summary
private static final int AMETE_MIHRET_DELTA
AMETE_MIHRET_ERAback to summary
private static final int AMETE_MIHRET_ERA
eraTypeback to summary
private int eraType
GENBOTback to summary
public static final int GENBOT

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

ICU Status
Stable since ICU 3.4.
HAMLEback to summary
public static final int HAMLE

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

ICU Status
Stable since ICU 3.4.
HEDARback to summary
public static final int HEDAR

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

ICU Status
Stable since ICU 3.4.
JD_EPOCH_OFFSET_AMETE_MIHRETback to summary
private static final int JD_EPOCH_OFFSET_AMETE_MIHRET
MEGABITback to summary
public static final int MEGABIT

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

ICU Status
Stable since ICU 3.4.
MESKEREMback to summary
public static final int MESKEREM

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

ICU Status
Stable since ICU 3.4.
MIAZIAback to summary
public static final int MIAZIA

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

ICU Status
Stable since ICU 3.4.
NEHASSEback to summary
public static final int NEHASSE

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

ICU Status
Stable since ICU 3.4.
PAGUMENback to summary
public static final int PAGUMEN

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

ICU Status
Stable since ICU 3.4.
SENEback to summary
public static final int SENE

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

ICU Status
Stable since ICU 3.4.
serialVersionUIDback to summary
private static final long serialVersionUID

Hides com.ibm.icu.util.CECalendar.serialVersionUID.

TAHSASback to summary
public static final int TAHSAS

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

ICU Status
Stable since ICU 3.4.
TEKEMTback to summary
public static final int TEKEMT

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

ICU Status
Stable since ICU 3.4.
TERback to summary
public static final int TER

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

ICU Status
Stable since ICU 3.4.
YEKATITback to summary
public static final int YEKATIT

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

ICU Status
Stable since ICU 3.4.

Constructor Detail

EthiopicCalendarback to summary
public EthiopicCalendar()

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

ICU Status
Stable since ICU 3.4.
EthiopicCalendarback to summary
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.

ICU Status
Stable since ICU 3.4.
EthiopicCalendarback to summary
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.

ICU Status
Stable since ICU 3.4.
EthiopicCalendarback to summary
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.

ICU Status
Stable since ICU 3.4.
EthiopicCalendarback to summary
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.

ICU Status
Stable since ICU 3.4.
EthiopicCalendarback to summary
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.

ICU Status
Stable since ICU 3.4.
EthiopicCalendarback to summary
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.

ICU Status
Stable since ICU 3.4.
EthiopicCalendarback to summary
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.

ICU Status
Stable since ICU 3.4.
EthiopicCalendarback to summary
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.

ICU Status
Stable since ICU 3.4.

Method Detail

EthiopicToJDback to summary
public static int EthiopicToJD(long year, int month, int date)

Convert an Ethiopic year, month, and day to a Julian day.

Parameters
year:long

the year

month:int

the month

date:int

the day

ICU Status
Draft since ICU 3.4 (retain).
getJDEpochOffsetback to summary
protected int getJDEpochOffset()

Implements abstract com.ibm.icu.util.CECalendar.getJDEpochOffset.

Doc from com.ibm.icu.util.CECalendar.getJDEpochOffset.

Deprecated

This API is ICU internal only.

The Coptic and Ethiopic calendars differ only in their epochs. This method must be implemented by CECalendar subclasses to return the date offset from Julian.

Annotations
@Override
@Deprecated
ICU Status
Internal ICU component.
getTypeback to summary
public String getType()

Overrides com.ibm.icu.util.Calendar.getType.

Doc from com.ibm.icu.util.Calendar.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

Annotations
@Override
ICU Status
Stable since ICU 3.8.
handleComputeFieldsback to summary
protected void handleComputeFields(int julianDay)

Overrides com.ibm.icu.util.Calendar.handleComputeFields.

Doc from com.ibm.icu.util.Calendar.handleComputeFields.

Deprecated

This API is ICU internal only.

Subclasses may override this method to compute several fields specific to each calendar system. These are:

  • ERA
  • YEAR
  • MONTH
  • DAY_OF_MONTH
  • DAY_OF_YEAR
  • EXTENDED_YEAR
Subclasses can refer to the DAY_OF_WEEK and DOW_LOCAL fields, which will be set when this method is called. Subclasses can also call the getGregorianXxx() methods to obtain Gregorian calendar equivalents for the given Julian day.

In addition, subclasses should compute any subclass-specific fields, that is, fields from BASE_FIELD_COUNT to getFieldCount() - 1.

The default implementation in Calendar implements a pure proleptic Gregorian calendar.

Annotations
@Override
@Deprecated
ICU Status
Internal ICU component.
handleGetExtendedYearback to summary
protected int handleGetExtendedYear()

Implements abstract com.ibm.icu.util.Calendar.handleGetExtendedYear.

Doc from com.ibm.icu.util.Calendar.handleGetExtendedYear.

Deprecated

This API is ICU internal only.

Returns the extended year defined by the current fields. This will use the EXTENDED_YEAR field or the YEAR and supra-year fields (such as ERA) specific to the calendar system, depending on which set of fields is newer.

Returns:int

the extended year

Annotations
@Override
@Deprecated
ICU Status
Internal ICU component.
handleGetLimitback to summary
protected int handleGetLimit(int field, int limitType)

Overrides com.ibm.icu.util.CECalendar.handleGetLimit.

Doc from com.ibm.icu.util.CECalendar.handleGetLimit.

Deprecated

This API is ICU internal only.

Calculate the limit for a specified type of limit and field

Parameters
field:int

Doc from com.ibm.icu.util.Calendar.handleGetLimit.

one of the above field numbers

limitType:int

Doc from com.ibm.icu.util.Calendar.handleGetLimit.

one of MINIMUM, GREATEST_MINIMUM, LEAST_MAXIMUM, or MAXIMUM

Annotations
@Override
@Deprecated
ICU Status
Internal ICU component.
isAmeteAlemEraback to summary
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.

ICU Status
Stable since ICU 3.4.
setAmeteAlemEraback to summary
public void setAmeteAlemEra(boolean onOff)

Set Alem or Mihret era.

Parameters
onOff:boolean

Set Amete Alem era if true, otherwise set Amete Mihret era.

ICU Status
Stable since ICU 3.4.
setCalcTypeForLocaleback to summary
private void setCalcTypeForLocale(ULocale locale)

set type based on locale