Package com.ibm.icu.util
Class EthiopicCalendar
- java.lang.Object
-
- com.ibm.icu.util.Calendar
-
- com.ibm.icu.util.CECalendar
-
- com.ibm.icu.util.EthiopicCalendar
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.lang.Comparable<Calendar>
public final class EthiopicCalendar extends CECalendar
Implement the Ethiopic calendar system.EthiopicCalendar usually should be instantiated using
Calendar.getInstance(ULocale)
passing in aULocale
with the tag"@calendar=ethiopic"
.- See Also:
Calendar
, Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.ibm.icu.util.Calendar
Calendar.FormatConfiguration, Calendar.PatternData, Calendar.WeekData
-
-
Field Summary
Fields Modifier and Type Field Description private static int
AMETE_ALEM
private static int
AMETE_ALEM_ERA
private static int
AMETE_MIHRET
private static int
AMETE_MIHRET_DELTA
private static int
AMETE_MIHRET_ERA
private int
eraType
static int
GENBOT
Constant for ግንቦት, the 9th month of the Ethiopic year.static int
HAMLE
Constant for ሐምሌ, the 11th month of the Ethiopic year.static int
HEDAR
Constant for ኅዳር, the 3rd month of the Ethiopic year.private static int
JD_EPOCH_OFFSET_AMETE_MIHRET
static int
MEGABIT
Constant for መጋቢት, the 7th month of the Ethiopic year.static int
MESKEREM
Constant for መስከረም, the 1st month of the Ethiopic year.static int
MIAZIA
Constant for ሚያዝያ, the 8th month of the Ethiopic year.static int
NEHASSE
Constant for ነሐሴ, the 12th month of the Ethiopic year.static int
PAGUMEN
Constant for ጳጉሜን, the 13th month of the Ethiopic year.static int
SENE
Constant for ሰኔ, the 10th month of the Ethiopic year.private static long
serialVersionUID
static int
TAHSAS
Constant for ታኅሣሥ, the 4th month of the Ethiopic year.static int
TEKEMT
Constant for ጥቅምት, the 2nd month of the Ethiopic year.static int
TER
Constant for ጥር, the 5th month of the Ethiopic year.static int
YEKATIT
Constant for የካቲት, the 6th month of the Ethiopic year.-
Fields inherited from class com.ibm.icu.util.Calendar
AM, AM_PM, APRIL, AUGUST, BASE_FIELD_COUNT, DATE, DATE_PRECEDENCE, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_WEEK_IN_MONTH, DAY_OF_YEAR, DECEMBER, DOW_LOCAL, DOW_PRECEDENCE, DST_OFFSET, EPOCH_JULIAN_DAY, ERA, EXTENDED_YEAR, FEBRUARY, FRIDAY, GREATEST_MINIMUM, HOUR, HOUR_OF_DAY, INTERNALLY_SET, IS_LEAP_MONTH, JAN_1_1_JULIAN_DAY, JANUARY, JULIAN_DAY, JULY, JUNE, LEAST_MAXIMUM, MARCH, MAX_DATE, MAX_FIELD_COUNT, MAX_JULIAN, MAX_MILLIS, MAXIMUM, MAY, MILLISECOND, MILLISECONDS_IN_DAY, MIN_DATE, MIN_JULIAN, MIN_MILLIS, MINIMUM, MINIMUM_USER_STAMP, MINUTE, MONDAY, MONTH, MONTH_PRECEDENCE, NOVEMBER, OCTOBER, ONE_DAY, ONE_HOUR, ONE_MINUTE, ONE_SECOND, ONE_WEEK, ORDINAL_MONTH, PM, RESOLVE_REMAP, SATURDAY, SECOND, SEPTEMBER, SUNDAY, THURSDAY, TUESDAY, UNDECIMBER, UNSET, WALLTIME_FIRST, WALLTIME_LAST, WALLTIME_NEXT_VALID, WEDNESDAY, WEEK_OF_MONTH, WEEK_OF_YEAR, WEEKDAY, WEEKEND, WEEKEND_CEASE, WEEKEND_ONSET, YEAR, YEAR_WOY, ZONE_OFFSET
-
-
Constructor Summary
Constructors Constructor Description EthiopicCalendar()
Constructs a defaultEthiopicCalendar
using the current time in the default time zone with the default locale.EthiopicCalendar(int year, int month, int date)
Constructs aEthiopicCalendar
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 aEthiopicCalendar
with the given date and time set for the default time zone with the default locale.EthiopicCalendar(TimeZone zone)
Constructs aEthiopicCalendar
based on the current time in the given time zone with the default locale.EthiopicCalendar(TimeZone zone, ULocale locale)
Constructs aEthiopicCalendar
based on the current time in the given time zone with the given locale.EthiopicCalendar(TimeZone zone, java.util.Locale aLocale)
Constructs aEthiopicCalendar
based on the current time in the given time zone with the given locale.EthiopicCalendar(ULocale locale)
Constructs aEthiopicCalendar
based on the current time in the default time zone with the given locale.EthiopicCalendar(java.util.Date date)
Constructs aEthiopicCalendar
with the given date set in the default time zone with the default locale.EthiopicCalendar(java.util.Locale aLocale)
Constructs aEthiopicCalendar
based on the current time in the default time zone with the given locale.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static int
EthiopicToJD(long year, int month, int date)
Convert an Ethiopic year, month, and day to a Julian day.protected int
getJDEpochOffset()
Deprecated.This API is ICU internal only.java.lang.String
getType()
Returns the calendar type name string for this Calendar object.protected void
handleComputeFields(int julianDay)
Deprecated.This API is ICU internal only.protected int
handleGetExtendedYear()
Deprecated.This API is ICU internal only.protected int
handleGetLimit(int field, int limitType)
Deprecated.This API is ICU internal only.boolean
isAmeteAlemEra()
Return true if this calendar is set to the Amete Alem era.void
setAmeteAlemEra(boolean onOff)
Set Alem or Mihret era.private void
setCalcTypeForLocale(ULocale locale)
set type based on locale-
Methods inherited from class com.ibm.icu.util.CECalendar
ceToJD, getTemporalMonthCode, handleComputeMonthStart, handleGetMonthLength, jdToCE, setTemporalMonthCode
-
Methods inherited from class com.ibm.icu.util.Calendar
add, after, before, clear, clear, clone, compareTo, complete, computeFields, computeGregorianFields, computeGregorianMonthStart, computeJulianDay, computeMillisInDay, computeMillisInDayLong, computeTime, computeZoneOffset, computeZoneOffset, equals, fieldDifference, fieldName, floorDivide, floorDivide, floorDivide, floorDivide, get, getActualMaximum, getActualMinimum, getAvailableLocales, getAvailableULocales, getDateAtTimePattern, getDateTimeFormat, getDateTimeFormat, getDateTimePattern, getDayOfWeekType, getDefaultDayInMonth, getDefaultMonthInYear, getDisplayName, getDisplayName, getFieldCount, getFieldResolutionTable, getFirstDayOfWeek, getGreatestMinimum, getGregorianDayOfMonth, getGregorianDayOfYear, getGregorianMonth, getGregorianYear, getInstance, getInstance, getInstance, getInstance, getInstance, getInstance, getKeywordValuesForLocale, getLeastMaximum, getLimit, getLocale, getMaximum, getMinimalDaysInFirstWeek, getMinimum, getRelatedYear, getRepeatedWallTimeOption, getSkippedWallTimeOption, getStamp, getTime, getTimeInMillis, getTimeZone, getWeekData, getWeekDataForRegion, getWeekendTransition, gregorianMonthLength, gregorianPreviousMonthLength, handleComputeJulianDay, handleCreateFields, handleGetDateFormat, handleGetDateFormat, handleGetDateFormat, handleGetDateFormat, handleGetYearLength, hashCode, haveDefaultCentury, inTemporalLeapYear, internalGet, internalGet, internalGetMonth, internalGetMonth, internalGetTimeInMillis, internalSet, isEquivalentTo, isEra0CountingBackward, isGregorianLeapYear, isLenient, isSet, isWeekend, isWeekend, julianDayToDayOfWeek, julianDayToMillis, millisToJulianDay, newerField, newestStamp, pinField, prepareGetActual, resolveFields, roll, roll, set, set, set, set, setFirstDayOfWeek, setLenient, setLocale, setMinimalDaysInFirstWeek, setRelatedYear, setRepeatedWallTimeOption, setSkippedWallTimeOption, setTime, setTimeInMillis, setTimeZone, setWeekData, toString, validateField, validateField, validateFields, weekNumber, weekNumber
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
MESKEREM
public static final int MESKEREM
Constant for መስከረም, the 1st month of the Ethiopic year.- See Also:
- Constant Field Values
-
TEKEMT
public static final int TEKEMT
Constant for ጥቅምት, the 2nd month of the Ethiopic year.- See Also:
- Constant Field Values
-
HEDAR
public static final int HEDAR
Constant for ኅዳር, the 3rd month of the Ethiopic year.- See Also:
- Constant Field Values
-
TAHSAS
public static final int TAHSAS
Constant for ታኅሣሥ, the 4th month of the Ethiopic year.- See Also:
- Constant Field Values
-
TER
public static final int TER
Constant for ጥር, the 5th month of the Ethiopic year.- See Also:
- Constant Field Values
-
YEKATIT
public static final int YEKATIT
Constant for የካቲት, the 6th month of the Ethiopic year.- See Also:
- Constant Field Values
-
MEGABIT
public static final int MEGABIT
Constant for መጋቢት, the 7th month of the Ethiopic year.- See Also:
- Constant Field Values
-
MIAZIA
public static final int MIAZIA
Constant for ሚያዝያ, the 8th month of the Ethiopic year.- See Also:
- Constant Field Values
-
GENBOT
public static final int GENBOT
Constant for ግንቦት, the 9th month of the Ethiopic year.- See Also:
- Constant Field Values
-
SENE
public static final int SENE
Constant for ሰኔ, the 10th month of the Ethiopic year.- See Also:
- Constant Field Values
-
HAMLE
public static final int HAMLE
Constant for ሐምሌ, the 11th month of the Ethiopic year.- See Also:
- Constant Field Values
-
NEHASSE
public static final int NEHASSE
Constant for ነሐሴ, the 12th month of the Ethiopic year.- See Also:
- Constant Field Values
-
PAGUMEN
public static final int PAGUMEN
Constant for ጳጉሜን, the 13th month of the Ethiopic year.- See Also:
- Constant Field Values
-
JD_EPOCH_OFFSET_AMETE_MIHRET
private static final int JD_EPOCH_OFFSET_AMETE_MIHRET
- See Also:
- Constant Field Values
-
AMETE_MIHRET_DELTA
private static final int AMETE_MIHRET_DELTA
- See Also:
- Constant Field Values
-
AMETE_ALEM
private static final int AMETE_ALEM
- See Also:
- Constant Field Values
-
AMETE_MIHRET
private static final int AMETE_MIHRET
- See Also:
- Constant Field Values
-
AMETE_MIHRET_ERA
private static final int AMETE_MIHRET_ERA
- See Also:
- Constant Field Values
-
AMETE_ALEM_ERA
private static final int AMETE_ALEM_ERA
- See Also:
- Constant Field Values
-
eraType
private int eraType
-
-
Constructor Detail
-
EthiopicCalendar
public EthiopicCalendar()
Constructs a defaultEthiopicCalendar
using the current time in the default time zone with the default locale.
-
EthiopicCalendar
public EthiopicCalendar(TimeZone zone)
Constructs aEthiopicCalendar
based on the current time in the given time zone with the default locale.- Parameters:
zone
- The time zone for the new calendar.
-
EthiopicCalendar
public EthiopicCalendar(java.util.Locale aLocale)
Constructs aEthiopicCalendar
based on the current time in the default time zone with the given locale.- Parameters:
aLocale
- The locale for the new calendar.
-
EthiopicCalendar
public EthiopicCalendar(ULocale locale)
Constructs aEthiopicCalendar
based on the current time in the default time zone with the given locale.- Parameters:
locale
- The icu locale for the new calendar.
-
EthiopicCalendar
public EthiopicCalendar(TimeZone zone, java.util.Locale aLocale)
Constructs aEthiopicCalendar
based on the current time in the given time zone with the given locale.- Parameters:
zone
- The time zone for the new calendar.aLocale
- The locale for the new calendar.
-
EthiopicCalendar
public EthiopicCalendar(TimeZone zone, ULocale locale)
Constructs aEthiopicCalendar
based on the current time in the given time zone with the given locale.- Parameters:
zone
- The time zone for the new calendar.locale
- The icu locale for the new calendar.
-
EthiopicCalendar
public EthiopicCalendar(int year, int month, int date)
Constructs aEthiopicCalendar
with the given date set in the default time zone with the default locale.
-
EthiopicCalendar
public EthiopicCalendar(java.util.Date date)
Constructs aEthiopicCalendar
with the given date set in the default time zone with the default locale.- Parameters:
date
- The date to which the new calendar is set.
-
EthiopicCalendar
public EthiopicCalendar(int year, int month, int date, int hour, int minute, int second)
Constructs aEthiopicCalendar
with the given date and time set for the default time zone with the default locale.- Parameters:
year
- The value used to set the calendar'sYEAR
time field.month
- The value used to set the calendar'sMONTH
time field. The value is 0-based. e.g., 0 for Meskerem.date
- The value used to set the calendar'sDATE
time field.hour
- The value used to set the calendar'sHOUR_OF_DAY
time field.minute
- The value used to set the calendar'sMINUTE
time field.second
- The value used to set the calendar'sSECOND
time field.
-
-
Method Detail
-
getType
public java.lang.String getType()
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
-
setAmeteAlemEra
public void setAmeteAlemEra(boolean onOff)
Set Alem or Mihret era.- Parameters:
onOff
- Set Amete Alem era if true, otherwise set Amete Mihret era.
-
isAmeteAlemEra
public boolean isAmeteAlemEra()
Return true if this calendar is set to the Amete Alem era.- Returns:
- true if set to the Amete Alem era.
-
handleGetExtendedYear
@Deprecated protected int 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.- Specified by:
handleGetExtendedYear
in classCalendar
- Returns:
- the extended year
-
handleComputeFields
@Deprecated protected void handleComputeFields(int julianDay)
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
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.- Overrides:
handleComputeFields
in classCalendar
-
handleGetLimit
@Deprecated protected int handleGetLimit(int field, int limitType)
Deprecated.This API is ICU internal only.Calculate the limit for a specified type of limit and field- Overrides:
handleGetLimit
in classCECalendar
- Parameters:
field
- one of the above field numberslimitType
- one ofMINIMUM
,GREATEST_MINIMUM
,LEAST_MAXIMUM
, orMAXIMUM
-
getJDEpochOffset
@Deprecated protected int 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.- Specified by:
getJDEpochOffset
in classCECalendar
-
EthiopicToJD
public static int EthiopicToJD(long year, int month, int date)
Convert an Ethiopic year, month, and day to a Julian day.- Parameters:
year
- the yearmonth
- the monthdate
- the day
-
setCalcTypeForLocale
private void setCalcTypeForLocale(ULocale locale)
set type based on locale
-
-