Class EthiopicCalendar
java.lang.Object
com.ibm.icu.util.Calendar
com.ibm.icu.util.CECalendar
com.ibm.icu.util.EthiopicCalendar
- All Implemented Interfaces:
Serializable, Cloneable, Comparable<Calendar>
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class Calendar
Calendar.FormatConfiguration, Calendar.PatternData, Calendar.WeekData -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate intprivate static final intstatic final intConstant for ግንቦት, the 9th month of the Ethiopic year.static final intConstant for ሐምሌ, the 11th month of the Ethiopic year.static final intConstant for ኅዳር, the 3rd month of the Ethiopic year.private static final intprivate static final intstatic final intConstant for መጋቢት, the 7th month of the Ethiopic year.static final intConstant for መስከረም, the 1st month of the Ethiopic year.static final intConstant for ሚያዝያ, the 8th month of the Ethiopic year.static final intConstant for ነሐሴ, the 12th month of the Ethiopic year.static final intConstant for ጳጉሜን, the 13th month of the Ethiopic year.static final intConstant for ሰኔ, the 10th month of the Ethiopic year.private static final longstatic final intConstant for ታኅሣሥ, the 4th month of the Ethiopic year.static final intConstant for ጥቅምት, the 2nd month of the Ethiopic year.static final intConstant for ጥር, the 5th month of the Ethiopic year.static final intConstant for የካቲት, the 6th month of the Ethiopic year.Fields inherited from class 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
ConstructorsConstructorDescriptionConstructs a defaultEthiopicCalendarusing the current time in the default time zone with the default locale.EthiopicCalendar(int year, int month, int date) Constructs aEthiopicCalendarwith 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 aEthiopicCalendarwith the given date and time set for the default time zone with the default locale.EthiopicCalendar(TimeZone zone) Constructs aEthiopicCalendarbased on the current time in the given time zone with the default locale.EthiopicCalendar(TimeZone zone, ULocale locale) Constructs aEthiopicCalendarbased on the current time in the given time zone with the given locale.EthiopicCalendar(TimeZone zone, Locale aLocale) Constructs aEthiopicCalendarbased on the current time in the given time zone with the given locale.EthiopicCalendar(ULocale locale) Constructs aEthiopicCalendarbased on the current time in the default time zone with the given locale.EthiopicCalendar(Date date) Constructs aEthiopicCalendarwith the given date set in the default time zone with the default locale.EthiopicCalendar(Locale aLocale) Constructs aEthiopicCalendarbased on the current time in the default time zone with the given locale. -
Method Summary
Modifier and TypeMethodDescriptionstatic intEthiopicToJD(long year, int month, int date) Convert an Ethiopic year, month, and day to a Julian day.protected intextendedYearToEra(int eyear) Deprecated.This API is ICU internal only.protected intextendedYearToYear(int eyear) Deprecated.This API is ICU internal only.protected intDeprecated.This API is ICU internal only.protected final intDeprecated.This API is ICU internal only.getType()Returns the calendar type name string for this Calendar object.protected intDeprecated.This API is ICU internal only.protected inthandleGetLimit(int field, int limitType) Deprecated.This API is ICU internal only.booleanReturn true if this calendar is set to the Amete Alem era.voidsetAmeteAlemEra(boolean onOff) Set Alem or Mihret era.private voidsetCalcTypeForLocale(ULocale locale) set type based on localeMethods inherited from class CECalendar
ceToJD, getTemporalMonthCode, handleComputeFields, handleComputeMonthStart, handleGetMonthLength, jdToCE, setTemporalMonthCodeMethods inherited from class 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 Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
MESKEREM
public static final int MESKEREMConstant for መስከረም, the 1st month of the Ethiopic year.- See Also:
-
TEKEMT
public static final int TEKEMTConstant for ጥቅምት, the 2nd month of the Ethiopic year.- See Also:
-
HEDAR
public static final int HEDARConstant for ኅዳር, the 3rd month of the Ethiopic year.- See Also:
-
TAHSAS
public static final int TAHSASConstant for ታኅሣሥ, the 4th month of the Ethiopic year.- See Also:
-
TER
public static final int TERConstant for ጥር, the 5th month of the Ethiopic year.- See Also:
-
YEKATIT
public static final int YEKATITConstant for የካቲት, the 6th month of the Ethiopic year.- See Also:
-
MEGABIT
public static final int MEGABITConstant for መጋቢት, the 7th month of the Ethiopic year.- See Also:
-
MIAZIA
public static final int MIAZIAConstant for ሚያዝያ, the 8th month of the Ethiopic year.- See Also:
-
GENBOT
public static final int GENBOTConstant for ግንቦት, the 9th month of the Ethiopic year.- See Also:
-
SENE
public static final int SENEConstant for ሰኔ, the 10th month of the Ethiopic year.- See Also:
-
HAMLE
public static final int HAMLEConstant for ሐምሌ, the 11th month of the Ethiopic year.- See Also:
-
NEHASSE
public static final int NEHASSEConstant for ነሐሴ, the 12th month of the Ethiopic year.- See Also:
-
PAGUMEN
public static final int PAGUMENConstant for ጳጉሜን, the 13th month of the Ethiopic year.- See Also:
-
JD_EPOCH_OFFSET_AMETE_ALEM
private static final int JD_EPOCH_OFFSET_AMETE_ALEM- See Also:
-
JD_EPOCH_OFFSET_AMETE_MIHRET
private static final int JD_EPOCH_OFFSET_AMETE_MIHRET- See Also:
-
AMETE_MIHRET_DELTA
private static final int AMETE_MIHRET_DELTA- See Also:
-
AMETE_ALEM
private static final int AMETE_ALEM- See Also:
-
AMETE_MIHRET
private static final int AMETE_MIHRET- See Also:
-
AMETE_MIHRET_ERA
private static final int AMETE_MIHRET_ERA- See Also:
-
AMETE_ALEM_ERA
private static final int AMETE_ALEM_ERA- See Also:
-
eraType
private int eraType -
ETHIOPIC_CALENDAR_RELATED_YEAR_DIFFERENCE
private static final int ETHIOPIC_CALENDAR_RELATED_YEAR_DIFFERENCE- See Also:
-
-
Constructor Details
-
EthiopicCalendar
public EthiopicCalendar()Constructs a defaultEthiopicCalendarusing the current time in the default time zone with the default locale. -
EthiopicCalendar
Constructs aEthiopicCalendarbased on the current time in the given time zone with the default locale.- Parameters:
zone- The time zone for the new calendar.
-
EthiopicCalendar
Constructs aEthiopicCalendarbased on the current time in the default time zone with the given locale.- Parameters:
aLocale- The locale for the new calendar.
-
EthiopicCalendar
Constructs aEthiopicCalendarbased on the current time in the default time zone with the given locale.- Parameters:
locale- The icu locale for the new calendar.
-
EthiopicCalendar
-
EthiopicCalendar
-
EthiopicCalendar
public EthiopicCalendar(int year, int month, int date) Constructs aEthiopicCalendarwith the given date set in the default time zone with the default locale. -
EthiopicCalendar
Constructs aEthiopicCalendarwith 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 aEthiopicCalendarwith the given date and time set for the default time zone with the default locale.- Parameters:
year- The value used to set the calendar'sYEARtime field.month- The value used to set the calendar'sMONTHtime field. The value is 0-based. e.g., 0 for Meskerem.date- The value used to set the calendar'sDATEtime field.hour- The value used to set the calendar'sHOUR_OF_DAYtime field.minute- The value used to set the calendar'sMINUTEtime field.second- The value used to set the calendar'sSECONDtime field.
-
-
Method Details
-
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.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:
handleGetExtendedYearin classCalendar- Returns:
- the extended year
-
extendedYearToEra
Deprecated.This API is ICU internal only.Convert extended year to era- Specified by:
extendedYearToErain classCECalendar
-
extendedYearToYear
Deprecated.This API is ICU internal only.Convert extended year to year- Specified by:
extendedYearToYearin classCECalendar
-
handleGetLimit
Deprecated.This API is ICU internal only.Calculate the limit for a specified type of limit and field- Overrides:
handleGetLimitin classCECalendar- Parameters:
field- one of the above field numberslimitType- one ofMINIMUM,GREATEST_MINIMUM,LEAST_MAXIMUM, orMAXIMUM
-
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:
getJDEpochOffsetin 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
-
getRelatedYearDifference
Deprecated.This API is ICU internal only.- Overrides:
getRelatedYearDifferencein classCalendar
-
setCalcTypeForLocale
set type based on locale
-