com.ibm.icu.util
Class EthiopicCalendar

java.lang.Object
  extended bycom.ibm.icu.util.Calendar
      extended bycom.ibm.icu.util.CECalendar
          extended bycom.ibm.icu.util.EthiopicCalendar
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable, java.io.Serializable

public final class EthiopicCalendar
extends com.ibm.icu.util.CECalendar

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:
Calendar, Serialized Form
Status:
Draft ICU 3.4.

Field Summary
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.
protected  int jdEpochOffset
           
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.
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, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_WEEK_IN_MONTH, DAY_OF_YEAR, DECEMBER, DOW_LOCAL, DST_OFFSET, EPOCH_JULIAN_DAY, ERA, EXTENDED_YEAR, FEBRUARY, FRIDAY, GREATEST_MINIMUM, HOUR, HOUR_OF_DAY, INTERNALLY_SET, 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, NOVEMBER, OCTOBER, ONE_DAY, ONE_HOUR, ONE_MINUTE, ONE_SECOND, ONE_WEEK, PM, RESOLVE_REMAP, SATURDAY, SECOND, SEPTEMBER, SUNDAY, THURSDAY, TUESDAY, UNDECIMBER, UNSET, WEDNESDAY, WEEK_OF_MONTH, WEEK_OF_YEAR, WEEKDAY, WEEKEND, WEEKEND_CEASE, WEEKEND_ONSET, YEAR, YEAR_WOY, ZONE_OFFSET
 
Constructor Summary
EthiopicCalendar()
          Constructs a default EthiopicCalendar using the current time in the default time zone with the default locale.
EthiopicCalendar(java.util.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)
          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.
EthiopicCalendar(java.util.Locale aLocale)
          Constructs a EthiopicCalendar based on the current time in the default time zone with the given locale.
EthiopicCalendar(TimeZone zone)
          Constructs a EthiopicCalendar based on the current time in the given time zone with the default locale.
EthiopicCalendar(TimeZone zone, java.util.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(ULocale locale)
          Constructs a EthiopicCalendar based on the current time in the default time zone with the given locale.
 
Method Summary
static int ceToJD(long year, int month, int date, int jdEpochOffset)
           
static int EthiopicToJD(long year, int month, int date)
          Convert an Ethiopic year, month, and day to a Julian day.
static java.lang.Integer[] getDateFromJD(int julianDay)
           
static java.lang.Integer[] getDateFromJD(int julianDay, int jdEpochOffset)
           
 java.lang.String getType()
          Return the current Calendar type.
protected  void handleComputeFields(int julianDay)
          Subclasses may override this method to compute several fields specific to each calendar system.
protected  int handleComputeMonthStart(int eyear, int emonth, boolean useMonth)
          Return the Julian day number of day before the first day of the given month in the given extended year.
protected  int handleGetExtendedYear()
          Return the extended year defined by the current fields.
protected  int handleGetLimit(int field, int limitType)
          Subclass API for defining limits of different types.
 boolean isAmeteAlemEra()
          Return true if this calendar is set to the Amete Alem era.
 void setAmeteAlemEra(boolean onOff)
          Set Alem or Mihret era.
 
Methods inherited from class com.ibm.icu.util.Calendar
add, after, before, clear, clear, clone, compareTo, compareTo, complete, computeFields, computeGregorianFields, computeGregorianMonthStart, computeJulianDay, computeMillisInDay, computeTime, computeZoneOffset, equals, fieldDifference, fieldName, floorDivide, floorDivide, floorDivide, floorDivide, get, getActualMaximum, getActualMinimum, getAvailableLocales, getAvailableULocales, getDateTimeFormat, getDateTimeFormat, getDayOfWeekType, getDisplayName, getDisplayName, getFieldCount, getFieldResolutionTable, getFirstDayOfWeek, getGreatestMinimum, getGregorianDayOfMonth, getGregorianDayOfYear, getGregorianMonth, getGregorianYear, getInstance, getInstance, getInstance, getInstance, getInstance, getInstance, getLeastMaximum, getLimit, getLocale, getMaximum, getMinimalDaysInFirstWeek, getMinimum, getStamp, getTime, getTimeInMillis, getTimeZone, getWeekendTransition, gregorianMonthLength, gregorianPreviousMonthLength, handleComputeJulianDay, handleCreateFields, handleGetDateFormat, handleGetDateFormat, handleGetMonthLength, handleGetYearLength, hashCode, internalGet, internalGet, internalGetTimeInMillis, internalSet, isEquivalentTo, isGregorianLeapYear, isLenient, isSet, isWeekend, isWeekend, julianDayToDayOfWeek, julianDayToMillis, millisToJulianDay, newerField, newestStamp, pinField, prepareGetActual, resolveFields, roll, roll, set, set, set, set, setFirstDayOfWeek, setLenient, setMinimalDaysInFirstWeek, setTime, setTimeInMillis, setTimeZone, toString, validateField, validateField, validateFields, weekNumber, weekNumber
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MESKEREM

public static final int MESKEREM
Constant for ?????, the 1st month of the Ethiopic year.

See Also:
Constant Field Values
Status:
Draft ICU 3.4.

TEKEMT

public static final int TEKEMT
Constant for ????, the 2nd month of the Ethiopic year.

See Also:
Constant Field Values
Status:
Draft ICU 3.4.

HEDAR

public static final int HEDAR
Constant for ???, the 3rd month of the Ethiopic year.

See Also:
Constant Field Values
Status:
Draft ICU 3.4.

TAHSAS

public static final int TAHSAS
Constant for ????, the 4th month of the Ethiopic year.

See Also:
Constant Field Values
Status:
Draft ICU 3.4.

TER

public static final int TER
Constant for ??, the 5th month of the Ethiopic year.

See Also:
Constant Field Values
Status:
Draft ICU 3.4.

YEKATIT

public static final int YEKATIT
Constant for ????, the 6th month of the Ethiopic year.

See Also:
Constant Field Values
Status:
Draft ICU 3.4.

MEGABIT

public static final int MEGABIT
Constant for ????, the 7th month of the Ethiopic year.

See Also:
Constant Field Values
Status:
Draft ICU 3.4.

MIAZIA

public static final int MIAZIA
Constant for ????, the 8th month of the Ethiopic year.

See Also:
Constant Field Values
Status:
Draft ICU 3.4.

GENBOT

public static final int GENBOT
Constant for ????, the 9th month of the Ethiopic year.

See Also:
Constant Field Values
Status:
Draft ICU 3.4.

SENE

public static final int SENE
Constant for ??, the 10th month of the Ethiopic year.

See Also:
Constant Field Values
Status:
Draft ICU 3.4.

HAMLE

public static final int HAMLE
Constant for ???, the 11th month of the Ethiopic year.

See Also:
Constant Field Values
Status:
Draft ICU 3.4.

NEHASSE

public static final int NEHASSE
Constant for ???, the 12th month of the Ethiopic year.

See Also:
Constant Field Values
Status:
Draft ICU 3.4.

PAGUMEN

public static final int PAGUMEN
Constant for ????, the 13th month of the Ethiopic year.

See Also:
Constant Field Values
Status:
Draft ICU 3.4.

jdEpochOffset

protected int jdEpochOffset
Constructor Detail

EthiopicCalendar

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

Status:
Draft ICU 3.4.

EthiopicCalendar

public EthiopicCalendar(TimeZone zone)
Constructs a EthiopicCalendar based on the current time in the given time zone with the default locale.

Parameters:
zone - The time zone for the new calendar.
Status:
Draft ICU 3.4.

EthiopicCalendar

public EthiopicCalendar(java.util.Locale aLocale)
Constructs a EthiopicCalendar based on the current time in the default time zone with the given locale.

Parameters:
aLocale - The locale for the new calendar.
Status:
Draft ICU 3.4.

EthiopicCalendar

public EthiopicCalendar(ULocale locale)
Constructs a EthiopicCalendar based on the current time in the default time zone with the given locale.

Parameters:
locale - The icu locale for the new calendar.
Status:
Draft ICU 3.4.

EthiopicCalendar

public EthiopicCalendar(TimeZone zone,
                        java.util.Locale aLocale)
Constructs a EthiopicCalendar 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.
Status:
Draft ICU 3.4.

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 - The time zone for the new calendar.
locale - The icu locale for the new calendar.
Status:
Draft ICU 3.4.

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 - The value used to set the calendar's YEAR time field.
month - The value used to set the calendar's MONTH time field. The value is 0-based. e.g., 0 for Meskerem.
date - The value used to set the calendar's DATE time field.
Status:
Draft ICU 3.4.

EthiopicCalendar

public EthiopicCalendar(java.util.Date date)
Constructs a EthiopicCalendar 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.
Status:
Draft ICU 3.4.

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 - The value used to set the calendar's YEAR time field.
month - The value used to set the calendar's MONTH time field. The value is 0-based. e.g., 0 for Meskerem.
date - The value used to set the calendar's DATE time field.
hour - The value used to set the calendar's HOUR_OF_DAY time field.
minute - The value used to set the calendar's MINUTE time field.
second - The value used to set the calendar's SECOND time field.
Status:
Draft ICU 3.4.
Method Detail

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 year
month - the month
date - the day
Status:
Draft ICU 3.4.

getDateFromJD

public static java.lang.Integer[] getDateFromJD(int julianDay)
Status:
Internal. This API is ICU internal only.

setAmeteAlemEra

public void setAmeteAlemEra(boolean onOff)
Set Alem or Mihret era.

Parameters:
onOff - Set Amete Alem era if true, otherwise set Amete Mihret era.
Status:
Draft ICU 3.4.

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.
Status:
Draft ICU 3.4.

getType

public java.lang.String getType()
Return the current Calendar type.

Overrides:
getType in class Calendar
Returns:
type of calendar (gregorian, etc.)
Status:
Internal. This API is ICU internal only.

handleGetLimit

protected int handleGetLimit(int field,
                             int limitType)
Description copied from class: Calendar
Subclass API for defining limits of different types. Subclasses must implement this method to return limits for the following fields:
ERA
 YEAR
 MONTH
 WEEK_OF_YEAR
 WEEK_OF_MONTH
 DAY_OF_MONTH
 DAY_OF_YEAR
 DAY_OF_WEEK_IN_MONTH
 YEAR_WOY
 EXTENDED_YEAR

Specified by:
handleGetLimit in class Calendar
Parameters:
field - one of the above field numbers
limitType - one of MINIMUM, GREATEST_MINIMUM, LEAST_MAXIMUM, or MAXIMUM

handleComputeMonthStart

protected int handleComputeMonthStart(int eyear,
                                      int emonth,
                                      boolean useMonth)
Description copied from class: Calendar
Return the Julian day number of day before the first day of the given month in the given extended year. Subclasses should override this method to implement their calendar system.

Specified by:
handleComputeMonthStart in class Calendar
Parameters:
eyear - the extended year
emonth - the zero-based month, or 0 if useMonth is false
useMonth - 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:
the Julian day number of the day before the first day of the given month and year
Status:
Internal. This API is ICU internal only.

handleGetExtendedYear

protected int handleGetExtendedYear()
Description copied from class: Calendar
Return 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 class Calendar
Returns:
the extended year
Status:
Internal. This API is ICU internal only.

handleComputeFields

protected void handleComputeFields(int julianDay)
Description copied from class: Calendar
Subclasses may override this method to compute several fields specific to each calendar system. These are: 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.

Overrides:
handleComputeFields in class Calendar
Status:
Internal. This API is ICU internal only.

ceToJD

public static int ceToJD(long year,
                         int month,
                         int date,
                         int jdEpochOffset)
Status:
Internal. This API is ICU internal only.

getDateFromJD

public static java.lang.Integer[] getDateFromJD(int julianDay,
                                                int jdEpochOffset)
Status:
Internal. This API is ICU internal only.


Copyright (c) 2006 IBM Corporation and others.