Added in API level 26

EthiopicCalendar


class EthiopicCalendar : Calendar
kotlin.Any
   ↳ android.icu.util.Calendar
   ↳ android.icu.util.EthiopicCalendar

Implement the Ethiopic calendar system.

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

Summary

Constants
static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

Inherited constants
Public constructors

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

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

EthiopicCalendar(zone: TimeZone!, locale: ULocale!)

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

EthiopicCalendar(zone: TimeZone!, aLocale: Locale!)

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

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

EthiopicCalendar(year: Int, month: Int, date: Int)

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

EthiopicCalendar(year: Int, month: Int, date: Int, hour: Int, minute: Int, second: Int)

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

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

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

Public methods
String!

Gets The Temporal monthCode value corresponding to the month for the date.

String!

[icu] Returns the calendar type name string for this Calendar object.

Boolean

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

Unit

Set Alem or Mihret era.

Unit
setTemporalMonthCode(temporalMonth: String!)

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.

Protected methods
Unit

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

Int
handleComputeMonthStart(eyear: Int, emonth: Int, useMonth: Boolean)

Return JD of start of given month/extended year

Int

Returns the extended year defined by the current fields.

Int
handleGetLimit(field: Int, limitType: Int)

Subclass API for defining limits of different types.

Inherited functions
Inherited properties

Constants

GENBOT

Added in API level 26
static val GENBOT: Int

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

Value: 8

HAMLE

Added in API level 26
static val HAMLE: Int

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

Value: 10

HEDAR

Added in API level 26
static val HEDAR: Int

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

Value: 2

MEGABIT

Added in API level 26
static val MEGABIT: Int

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

Value: 6

MESKEREM

Added in API level 26
static val MESKEREM: Int

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

Value: 0

MIAZIA

Added in API level 26
static val MIAZIA: Int

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

Value: 7

NEHASSE

Added in API level 26
static val NEHASSE: Int

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

Value: 11

PAGUMEN

Added in API level 26
static val PAGUMEN: Int

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

Value: 12

SENE

Added in API level 26
static val SENE: Int

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

Value: 9

TAHSAS

Added in API level 26
static val TAHSAS: Int

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

Value: 3

TEKEMT

Added in API level 26
static val TEKEMT: Int

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

Value: 1

TER

Added in API level 26
static val TER: Int

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

Value: 4

YEKATIT

Added in API level 26
static val YEKATIT: Int

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

Value: 5

Public constructors

EthiopicCalendar

Added in API level 26
EthiopicCalendar()

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

EthiopicCalendar

Added in API level 26
EthiopicCalendar(zone: TimeZone!)

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.

EthiopicCalendar

Added in API level 26
EthiopicCalendar(
    zone: TimeZone!,
    locale: ULocale!)

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.

EthiopicCalendar

Added in API level 26
EthiopicCalendar(
    zone: TimeZone!,
    aLocale: 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.
aLocale Locale!: The locale for the new calendar.

EthiopicCalendar

Added in API level 26
EthiopicCalendar(locale: ULocale!)

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.

EthiopicCalendar

Added in API level 26
EthiopicCalendar(
    year: Int,
    month: Int,
    date: Int)

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.

EthiopicCalendar

Added in API level 26
EthiopicCalendar(
    year: Int,
    month: Int,
    date: Int,
    hour: Int,
    minute: Int,
    second: Int)

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.

EthiopicCalendar

Added in API level 26
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.

EthiopicCalendar

Added in API level 26
EthiopicCalendar(aLocale: Locale!)

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.

Public methods

getTemporalMonthCode

Added in API level 36
fun getTemporalMonthCode(): String!

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".

Return
String! One of 13 possible strings in {"M01".. "M12", "M13"}.

getType

Added in API level 26
fun getType(): String!

[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

Return
String! legacy calendar type name string

isAmeteAlemEra

Added in API level 26
fun isAmeteAlemEra(): Boolean

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

Return
Boolean true if set to the Amete Alem era.

setAmeteAlemEra

Added in API level 26
fun setAmeteAlemEra(onOff: Boolean): Unit

Set Alem or Mihret era.

Parameters
onOff Boolean: Set Amete Alem era if true, otherwise set Amete Mihret era.

setTemporalMonthCode

Added in API level 36
fun setTemporalMonthCode(temporalMonth: String!): Unit

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.

Parameters
temporalMonth String!: One of 13 possible strings in {"M01".. "M12", "M13"}.

Protected methods

handleComputeFields

Added in API level 26
protected fun handleComputeFields(julianDay: Int): Unit

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.

handleComputeMonthStart

Added in API level 26
protected fun handleComputeMonthStart(
    eyear: Int,
    emonth: Int,
    useMonth: Boolean
): Int

Return JD of start of given month/extended year

Parameters
eyear Int: the extended year
month the zero-based month, or 0 if useMonth is false
useMonth Boolean: 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
Return
Int the Julian day number of the day before the first day of the given month and year

handleGetExtendedYear

Added in API level 26
protected fun handleGetExtendedYear(): Int

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.

Return
Int the extended year

handleGetLimit

Added in API level 26
protected fun handleGetLimit(
    field: Int,
    limitType: Int
): Int

Deprecated: This API is ICU internal only.

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

Parameters
field Int: one of the above field numbers
limitType Int: one of MINIMUM, GREATEST_MINIMUM, LEAST_MAXIMUM, or MAXIMUM