Class EthiopicCalendar

    • Field Detail

      • MESKEREM

        public static final int MESKEREM
        Constant for መስከረም, the 1st month of the Ethiopic year.
        See Also:
        Constant Field Values
        Status:
        Stable ICU 3.4.
      • TEKEMT

        public static final int TEKEMT
        Constant for ጥቅምት, the 2nd month of the Ethiopic year.
        See Also:
        Constant Field Values
        Status:
        Stable ICU 3.4.
      • HEDAR

        public static final int HEDAR
        Constant for ኅዳር, the 3rd month of the Ethiopic year.
        See Also:
        Constant Field Values
        Status:
        Stable ICU 3.4.
      • TAHSAS

        public static final int TAHSAS
        Constant for ታኅሣሥ, the 4th month of the Ethiopic year.
        See Also:
        Constant Field Values
        Status:
        Stable ICU 3.4.
      • TER

        public static final int TER
        Constant for ጥር, the 5th month of the Ethiopic year.
        See Also:
        Constant Field Values
        Status:
        Stable ICU 3.4.
      • YEKATIT

        public static final int YEKATIT
        Constant for የካቲት, the 6th month of the Ethiopic year.
        See Also:
        Constant Field Values
        Status:
        Stable ICU 3.4.
      • MEGABIT

        public static final int MEGABIT
        Constant for መጋቢት, the 7th month of the Ethiopic year.
        See Also:
        Constant Field Values
        Status:
        Stable ICU 3.4.
      • MIAZIA

        public static final int MIAZIA
        Constant for ሚያዝያ, the 8th month of the Ethiopic year.
        See Also:
        Constant Field Values
        Status:
        Stable ICU 3.4.
      • GENBOT

        public static final int GENBOT
        Constant for ግንቦት, the 9th month of the Ethiopic year.
        See Also:
        Constant Field Values
        Status:
        Stable ICU 3.4.
      • SENE

        public static final int SENE
        Constant for ሰኔ, the 10th month of the Ethiopic year.
        See Also:
        Constant Field Values
        Status:
        Stable ICU 3.4.
      • HAMLE

        public static final int HAMLE
        Constant for ሐምሌ, the 11th month of the Ethiopic year.
        See Also:
        Constant Field Values
        Status:
        Stable ICU 3.4.
      • NEHASSE

        public static final int NEHASSE
        Constant for ነሐሴ, the 12th month of the Ethiopic year.
        See Also:
        Constant Field Values
        Status:
        Stable ICU 3.4.
      • PAGUMEN

        public static final int PAGUMEN
        Constant for ጳጉሜን, the 13th month of the Ethiopic year.
        See Also:
        Constant Field Values
        Status:
        Stable ICU 3.4.
    • Constructor Detail

      • EthiopicCalendar

        public EthiopicCalendar()
        Constructs a default EthiopicCalendar using the current time in the default time zone with the default locale.
        Status:
        Stable 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:
        Stable ICU 3.4.
      • EthiopicCalendar

        public EthiopicCalendar​(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:
        Stable 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:
        Stable ICU 3.4.
      • EthiopicCalendar

        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 - The time zone for the new calendar.
        aLocale - The locale for the new calendar.
        Status:
        Stable 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:
        Stable 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:
        Stable ICU 3.4.
      • EthiopicCalendar

        public EthiopicCalendar​(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:
        Stable 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:
        Stable ICU 3.4.
    • Method Detail

      • getType

        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

        Overrides:
        getType in class Calendar
        Returns:
        legacy calendar type name string
        Status:
        Stable ICU 3.8.
      • 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:
        Stable 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:
        Stable ICU 3.4.
      • 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 class Calendar
        Returns:
        the extended year
        Status:
        Internal. This API is ICU internal only.
      • extendedYearToEra

        @Deprecated
        protected int extendedYearToEra​(int eyear)
        Deprecated.
        This API is ICU internal only.
        Convert extended year to era
        Status:
        Internal. This API is ICU internal only.
      • extendedYearToYear

        @Deprecated
        protected int extendedYearToYear​(int eyear)
        Deprecated.
        This API is ICU internal only.
        Convert extended year to year
        Status:
        Internal. This API is ICU internal only.
      • 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
        Parameters:
        field - one of the above field numbers
        limitType - one of MINIMUM, GREATEST_MINIMUM, LEAST_MAXIMUM, or MAXIMUM
        Status:
        Internal. This API is ICU internal only.
      • 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.
        Status:
        Internal. This API is ICU internal only.
      • 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 (retain).
      • getRelatedYearDifference

        @Deprecated
        protected final int getRelatedYearDifference()
        Deprecated.
        This API is ICU internal only.
        Overrides:
        getRelatedYearDifference in class Calendar
        Status:
        Internal. This API is ICU internal only.
      • 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
        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.
      • handleComputeMonthStart

        protected int handleComputeMonthStart​(int eyear,
                                              int emonth,
                                              boolean useMonth)
        Return JD of start of given month/extended year
        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
      • handleGetMonthLength

        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.
        Overrides:
        handleGetMonthLength in class Calendar
      • ceToJD

        public static int ceToJD​(long year,
                                 int month,
                                 int day,
                                 int jdEpochOffset)
        Convert an Coptic/Ethiopic year, month and day to a Julian day
        Parameters:
        year - the extended year
        month - the month
        day - the day
        Returns:
        Julian day
      • jdToCE

        public static void jdToCE​(int julianDay,
                                  int jdEpochOffset,
                                  int[] fields)
        Convert a Julian day to an Coptic/Ethiopic year, month and day
      • getTemporalMonthCode

        public String getTemporalMonthCode()
        Gets The Temporal monthCode value corresponding to the month for the date. The value is a string identifier that starts with the literal grapheme "M" followed by two graphemes representing the zero-padded month number of the current month in a normal (non-leap) year. For the short thirteen month in each year in the CECalendar, the value is "M13".
        Overrides:
        getTemporalMonthCode in class Calendar
        Returns:
        One of 13 possible strings in {"M01".. "M12", "M13"}.
        Status:
        Stable ICU 74.
      • setTemporalMonthCode

        public void setTemporalMonthCode​(String temporalMonth)
        Sets The Temporal monthCode which is a string identifier that starts with the literal grapheme "M" followed by two graphemes representing the zero-padded month number of the current month in a normal (non-leap) year. For CECalendar calendar, the values are "M01" .. "M13" while the "M13" is represent the short thirteen month in each year.
        Overrides:
        setTemporalMonthCode in class Calendar
        Parameters:
        temporalMonth - One of 13 possible strings in {"M01".. "M12", "M13"}.
        Status:
        Stable ICU 74.