Added in API level 24

CopticCalendar


class CopticCalendar : Calendar

Implement the Coptic calendar system.

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

Summary

Constants
static Int

Constant for Μεϣιρ / ﺮﻴﺸﻣأ, the 6th month of the Coptic year.

static Int

Constant for Παοπι / ﻪﺑﺎﺑ, the 2nd month of the Coptic year.

static Int

Constant for Παρεμϩατ / تﺎﻬﻣﺮﺑ, the 7th month of the Coptic year.

static Int

Constant for Φαρμοθι / هدﻮﻣﺮﺑ, the 8th month of the Coptic year.

static Int

Constant for Παϣαν / ﺲﻨﺸﺑ;, the 9th month of the Coptic year.

static Int

Constant for Επηπ / ﺐﻴﺑأ, the 11th month of the Coptic year.

static Int

Constant for Αθορ / رﻮﺗﺎﻫ, the 3rd month of the Coptic year.

static Int

Constant for Χοιακ / ﻚﻬﻴﻛ;, the 4th month of the Coptic year.

static Int

Constant for Μεϲωρη / ىﺮﺴﻣ, the 12th month of the Coptic year.

static Int

Constant for Πικογϫι μαβοτ / ﺮﻴﻐﺼﻟاﺮﻬﺸﻟا, the 13th month of the Coptic year.

static Int

Constant for Παωνι / ﻪﻧؤﻮﺑ, the 10th month of the Coptic year.

static Int

Constant for Τωβι / طﻮﺒﻫ, the 5th month of the Coptic year.

static Int

Constant for ωογτ / تﻮﺗ, the 1st month of the Coptic year.

Inherited constants
Int AM

Value of the AM_PM field indicating the period of the day from midnight to just before noon.

Int AM_PM

Field number for get and set indicating whether the HOUR is before or after noon. E.g., at 10:04:15.250 PM the AM_PM is PM.

Int APRIL

Value of the MONTH field indicating the fourth month of the year.

Int AUGUST

Value of the MONTH field indicating the eighth month of the year.

Int DATE

Field number for get and set indicating the day of the month. This is a synonym for DAY_OF_MONTH. The first day of the month has value 1.

Int DAY_OF_MONTH

Field number for get and set indicating the day of the month. This is a synonym for DATE. The first day of the month has value 1.

Int DAY_OF_WEEK

Field number for get and set indicating the day of the week. This field takes values SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, and SATURDAY.

Int DAY_OF_WEEK_IN_MONTH

Field number for get and set indicating the ordinal number of the day of the week within the current month. Together with the DAY_OF_WEEK field, this uniquely specifies a day within a month. Unlike WEEK_OF_MONTH and WEEK_OF_YEAR, this field's value does not depend on getFirstDayOfWeek() or getMinimalDaysInFirstWeek(). DAY_OF_MONTH 1 through 7 always correspond to DAY_OF_WEEK_IN_MONTH 1; 8 through 15 correspond to DAY_OF_WEEK_IN_MONTH 2, and so on. DAY_OF_WEEK_IN_MONTH 0 indicates the week before DAY_OF_WEEK_IN_MONTH 1. Negative values count back from the end of the month, so the last Sunday of a month is specified as DAY_OF_WEEK = SUNDAY, DAY_OF_WEEK_IN_MONTH = -1. Because negative values count backward they will usually be aligned differently within the month than positive values. For example, if a month has 31 days, DAY_OF_WEEK_IN_MONTH -1 will overlap DAY_OF_WEEK_IN_MONTH 5 and the end of 4.

Int DAY_OF_YEAR

Field number for get and set indicating the day number within the current year. The first day of the year has value 1.

Int DECEMBER

Value of the MONTH field indicating the twelfth month of the year.

Int DOW_LOCAL

[icu] Field number for get() and set() indicating the localized day of week. This will be a value from 1 to 7 inclusive, with 1 being the localized first day of the week.

Int DST_OFFSET

Field number for get and set indicating the daylight savings offset in milliseconds.

Int EPOCH_JULIAN_DAY

The Julian day of the epoch, that is, January 1, 1970 on the Gregorian calendar.

Int ERA

Field number for get and set indicating the era, e.g., AD or BC in the Julian calendar. This is a calendar-specific value; see subclass documentation.

Int EXTENDED_YEAR

[icu] Field number for get() and set() indicating the extended year. This is a single number designating the year of this calendar system, encompassing all supra-year fields. For example, for the Julian calendar system, year numbers are positive, with an era of BCE or CE. An extended year value for the Julian calendar system assigns positive values to CE years and negative values to BCE years, with 1 BCE being year 0.

Int FEBRUARY

Value of the MONTH field indicating the second month of the year.

Int FRIDAY

Value of the DAY_OF_WEEK field indicating Friday.

Int GREATEST_MINIMUM

Limit type for getLimit() and handleGetLimit() indicating the greatest minimum value that a field can take.

Int HOUR

Field number for get and set indicating the hour of the morning or afternoon. HOUR is used for the 12-hour clock. E.g., at 10:04:15.250 PM the HOUR is 10.

Int HOUR_OF_DAY

Field number for get and set indicating the hour of the day. HOUR_OF_DAY is used for the 24-hour clock. E.g., at 10:04:15.250 PM the HOUR_OF_DAY is 22.

Int INTERNALLY_SET

Value of the time stamp stamp[] indicating that a field has been set via computations from the time or from other fields.

Int IS_LEAP_MONTH

[icu] Field indicating whether or not the current month is a leap month. Should have a value of 0 for non-leap months, and 1 for leap months.

Int JANUARY

Value of the MONTH field indicating the first month of the year.

Int JAN_1_1_JULIAN_DAY

The Julian day of the Gregorian epoch, that is, January 1, 1 on the Gregorian calendar.

Int JULIAN_DAY

[icu] Field number for get() and set() indicating the modified Julian day number. This is different from the conventional Julian day number in two regards. First, it demarcates days at local zone midnight, rather than noon GMT. Second, it is a local number; that is, it depends on the local time zone. It can be thought of as a single number that encompasses all the date-related fields.

Int JULY

Value of the MONTH field indicating the seventh month of the year.

Int JUNE

Value of the MONTH field indicating the sixth month of the year.

Int LEAST_MAXIMUM

Limit type for getLimit() and handleGetLimit() indicating the least maximum value that a field can take.

Int MARCH

Value of the MONTH field indicating the third month of the year.

Int MAXIMUM

Limit type for getLimit() and handleGetLimit() indicating the maximum value that a field can take (greatest maximum).

Int MAX_FIELD_COUNT

The maximum number of fields possible. Subclasses must not define more total fields than this number.

Int MAX_JULIAN

The maximum supported Julian day. This value is equivalent to MAX_MILLIS and MAX_DATE.

Long MAX_MILLIS

The maximum supported epoch milliseconds. This value is equivalent to MAX_JULIAN and MAX_DATE.

Int MAY

Value of the MONTH field indicating the fifth month of the year.

Int MILLISECOND

Field number for get and set indicating the millisecond within the second. E.g., at 10:04:15.250 PM the MILLISECOND is 250.

Int MILLISECONDS_IN_DAY

[icu] Field number for get() and set() indicating the milliseconds in the day. This ranges from 0 to 23:59:59.999 (regardless of DST). This field behaves exactly like a composite of all time-related fields, not including the zone fields. As such, it also reflects discontinuities of those fields on DST transition days. On a day of DST onset, it will jump forward. On a day of DST cessation, it will jump backward. This reflects the fact that is must be combined with the DST_OFFSET field to obtain a unique local time value.

Int MINIMUM

Limit type for getLimit() and handleGetLimit() indicating the minimum value that a field can take (least minimum).

Int MINIMUM_USER_STAMP

If the time stamp stamp[] has a value greater than or equal to MINIMUM_USER_SET then it has been set by the user via a call to set().

Int MINUTE

Field number for get and set indicating the minute within the hour. E.g., at 10:04:15.250 PM the MINUTE is 4.

Int MIN_JULIAN

The minimum supported Julian day. This value is equivalent to MIN_MILLIS and MIN_DATE.

Long MIN_MILLIS

The minimum supported epoch milliseconds. This value is equivalent to MIN_JULIAN and MIN_DATE.

Int MONDAY

Value of the DAY_OF_WEEK field indicating Monday.

Int MONTH

Field number for get and set indicating the month. This is a calendar-specific value. The first month of the year is JANUARY; the last depends on the number of months in a year.

Int NOVEMBER

Value of the MONTH field indicating the eleventh month of the year.

Int OCTOBER

Value of the MONTH field indicating the tenth month of the year.

Long ONE_DAY

The number of milliseconds in one day. Although ONE_DAY and ONE_WEEK can fit into ints, they must be longs in order to prevent arithmetic overflow when performing (bug 4173516).

Int ONE_HOUR

The number of milliseconds in one hour.

Int ONE_MINUTE

The number of milliseconds in one minute.

Int ONE_SECOND

The number of milliseconds in one second.

Long ONE_WEEK

The number of milliseconds in one week. Although ONE_DAY and ONE_WEEK can fit into ints, they must be longs in order to prevent arithmetic overflow when performing (bug 4173516).

Int ORDINAL_MONTH

[icu] Field indicating the month. This is a calendar-specific value. Differ from MONTH, this value is continuous and unique within a year and range from 0 to 11 or 0 to 12 depending on how many months in a year, the calendar system has leap month or not, and in leap year or not. It is the ordinal position of that month in the corresponding year of the calendar. For Chinese, Dangi, and Hebrew calendar, the range is 0 to 11 in non-leap years and 0 to 12 in leap years. For Coptic and Ethiopian calendar, the range is always 0 to 12. For other calendars supported by ICU now, the range is 0 to 11. When the number of months in a year of the identified calendar is variable, a different ORDINAL_MONTH value can be used for dates that are part of the same named month in different years. For example, in the Hebrew calendar, "1 Nisan 5781" is associated with ORDINAL_MONTH value 6 while "1 Nisan 5782" is associated with ORDINAL_MONTH value 7 because 5782 is a leap year and Nisan follows the insertion of Adar I. In Chinese calendar, "Year 4664 Month 6 Day 2" is associated with ORDINAL_MONTH value 5 while "Year 4665 Month 6 Day 2" is associated with ORDINAL_MONTH value 6 because 4665 is a leap year and there is an extra "Leap Month 5" which associated with ORDINAL_MONTH value 5 before "Month 6" of year 4664.

Int PM

Value of the AM_PM field indicating the period of the day from noon to just before midnight.

Int RESOLVE_REMAP

Value to OR against resolve table field values for remapping.

Int SATURDAY

Value of the DAY_OF_WEEK field indicating Saturday.

Int SECOND

Field number for get and set indicating the second within the minute. E.g., at 10:04:15.250 PM the SECOND is 15.

Int SEPTEMBER

Value of the MONTH field indicating the ninth month of the year.

Int SUNDAY

Value of the DAY_OF_WEEK field indicating Sunday.

Int THURSDAY

Value of the DAY_OF_WEEK field indicating Thursday.

Int TUESDAY

Value of the DAY_OF_WEEK field indicating Tuesday.

Int UNDECIMBER

Value of the MONTH field indicating the thirteenth month of the year. Although GregorianCalendar does not use this value, lunar calendars do.

Int UNSET

Value of the time stamp stamp[] indicating that a field has not been set since the last call to clear().

Int WALLTIME_FIRST

[icu]Option used by setRepeatedWallTimeOption(int) and setSkippedWallTimeOption(int) specifying an ambiguous wall time to be interpreted as the earliest.

Int WALLTIME_LAST

[icu]Option used by setRepeatedWallTimeOption(int) and setSkippedWallTimeOption(int) specifying an ambiguous wall time to be interpreted as the latest.

Int WALLTIME_NEXT_VALID

[icu]Option used by setSkippedWallTimeOption(int) specifying an ambiguous wall time to be interpreted as the next valid wall time.

Int WEDNESDAY

Value of the DAY_OF_WEEK field indicating Wednesday.

Int WEEK_OF_MONTH

Field number for get and set indicating the week number within the current month. The first week of the month, as defined by getFirstDayOfWeek() and getMinimalDaysInFirstWeek(), has value 1. Subclasses define the value of WEEK_OF_MONTH for days before the first week of the month.

Int WEEK_OF_YEAR

Field number for get and set indicating the week number within the current year. The first week of the year, as defined by getFirstDayOfWeek() and getMinimalDaysInFirstWeek(), has value 1. Subclasses define the value of WEEK_OF_YEAR for days before the first week of the year.

Int YEAR

Field number for get and set indicating the year. This is a calendar-specific value; see subclass documentation.

Int YEAR_WOY

[icu] Field number for get() and set() indicating the extended year corresponding to the WEEK_OF_YEAR field. This may be one greater or less than the value of EXTENDED_YEAR.

Int ZONE_OFFSET

Field number for get and set indicating the raw offset from GMT in milliseconds.

Public constructors

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

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

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

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

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

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

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

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

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

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

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

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

Constructs a CopticCalendar 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.

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
Int
handleComputeMonthStart(eyear: Int, emonth: Int, useMonth: Boolean)

Return JD of start of given month/extended year

Int
handleGetLimit(field: Int, limitType: Int)

Calculate the limit for a specified type of limit and field

Inherited functions
Unit add(field: Int, amount: Int)

Add a signed amount to a specified field, using this calendar's rules. For example, to add three days to the current date, you can call add(Calendar.DATE, 3).

When adding to certain fields, the values of other fields may conflict and need to be changed. For example, when adding one to the MONTH field for the Gregorian date 1/31/96, the DAY_OF_MONTH field must be adjusted so that the result is 2/29/96 rather than the invalid 2/31/96.

Adding a positive value always means moving forward in time, so for the Gregorian calendar, starting with 100 BC and adding +1 to year results in 99 BC (even though this actually reduces the numeric value of the field itself).

[icu] Note: The ICU implementation of this method is able to add to all fields except for ERA, DST_OFFSET, and ZONE_OFFSET. Subclasses may, of course, add support for additional fields in their overrides of add.

Note: You should always use roll and add rather than attempting to perform arithmetic operations directly on the fields of a Calendar. It is quite possible for Calendar subclasses to have fields with non-linear behavior, for example missing months or days during non-leap years. The subclasses' add and roll methods will take this into account, while simple arithmetic manipulations may give invalid results.

Subclassing:
This implementation of add assumes that the behavior of the field is continuous between its minimum and maximum, which are found by calling getActualMinimum and getActualMaximum. For such fields, simple arithmetic operations are sufficient to perform the add.

Subclasses that have fields for which this assumption of continuity breaks down must override add to handle those fields specially. For example, in the Hebrew calendar the month "Adar I" only occurs in leap years; in other years the calendar jumps from Shevat (month #4) to Adar (month #6). The HebrewCalendar.add method takes this into account, so that adding one month to a date in Shevat gives the proper result (Adar) in a non-leap year.

Boolean after(when: Any!)

Compares the time field records. Equivalent to comparing result of conversion to UTC.

Boolean before(when: Any!)

Compares the time field records. Equivalent to comparing result of conversion to UTC.

Unit clear()

Clears the values of all the time fields.

Unit clear(field: Int)

Clears the value in the given time field.

Any clone()

Overrides Cloneable

Int compareTo(other: Calendar!)

Compares the times (in millis) represented by two Calendar objects.

Unit complete()

Fills in any unset fields in the time field list.

Unit computeFields()

Converts the current millisecond time value time to field values in fields[]. This synchronizes the time field values with a new time that is set for the calendar. The time is not recomputed first; to recompute the time, then the fields, call the complete method.

Unit computeGregorianFields(julianDay: Int)

Compute the Gregorian calendar year, month, and day of month from the Julian day. These values are not stored in fields, but in member variables gregorianXxx. They are used for time zone computations and by subclasses that are Gregorian derivatives. Subclasses may call this method to perform a Gregorian calendar millis->fields computation. To perform a Gregorian calendar fields->millis computation, call computeGregorianMonthStart().

Int computeGregorianMonthStart(year: Int, month: Int)

Compute the Julian day of a month of the Gregorian calendar. Subclasses may call this method to perform a Gregorian calendar fields->millis computation. To perform a Gregorian calendar millis->fields computation, call computeGregorianFields().

Int computeJulianDay()

Compute the Julian day number as specified by this calendar's fields.

Int computeMillisInDay()

Compute the milliseconds in the day from the fields. This is a value from 0 to 23:59:59.999 inclusive, unless fields are out of range, in which case it can be an arbitrary value. This value reflects local zone wall time.

Unit computeTime()

Converts the current field values in fields[] to the millisecond time value time.

Int computeZoneOffset(millis: Long, millisInDay: Int)

This method can assume EXTENDED_YEAR has been set.

Boolean equals(other: Any?)

Compares this calendar to the specified object. The result is true if and only if the argument is not null and is a Calendar object that represents the same calendar as this object.

Int fieldDifference(when: Date!, field: Int)

[icu] Returns the difference between the given time and the time this calendar object is set to. If this calendar is set before the given time, the returned value will be positive. If this calendar is set after the given time, the returned value will be negative. The field parameter specifies the units of the return value. For example, if fieldDifference(when, Calendar.MONTH) returns 3, then this calendar is set to 3 months before , and possibly some additional time less than one month.

As a side effect of this call, this calendar is advanced toward when by the given amount. That is, calling this method has the side effect of calling add(field, n), where n is the return value.

Usage: To use this method, call it first with the largest field of interest, then with progressively smaller fields. For example:

int y = cal.fieldDifference(when, Calendar.YEAR);
  int m = cal.fieldDifference(when, Calendar.MONTH);
  int d = cal.fieldDifference(when, Calendar.DATE);
computes the difference between cal and when in years, months, and days.

Note: fieldDifference() is asymmetrical. That is, in the following code:

cal.setTime(date1);
  int m1 = cal.fieldDifference(date2, Calendar.MONTH);
  int d1 = cal.fieldDifference(date2, Calendar.DATE);
  cal.setTime(date2);
  int m2 = cal.fieldDifference(date1, Calendar.MONTH);
  int d2 = cal.fieldDifference(date1, Calendar.DATE);
one might expect that m1 == -m2 && d1 == -d2. However, this is not generally the case, because of irregularities in the underlying calendar system (e.g., the Gregorian calendar has a varying number of days per month).

String! fieldName(field: Int)

Returns a string name for a field, for debugging and exceptions.

Int floorDivide(numerator: Int, denominator: Int)

Divide two integers, returning the floor of the quotient.

Unlike the built-in division, this is mathematically well-behaved. E.g., -1/4 => 0 but floorDivide(-1,4) => -1.

Int floorDivide(numerator: Int, denominator: Int, remainder: IntArray!)

Divide two integers, returning the floor of the quotient, and the modulus remainder.

Unlike the built-in division, this is mathematically well-behaved. E.g., -1/4 => 0 and -1%4 => -1, but floorDivide(-1,4) => -1 with remainder[0] => 3.

Int floorDivide(numerator: Long, denominator: Int, remainder: IntArray!)

Divide two integers, returning the floor of the quotient, and the modulus remainder.

Unlike the built-in division, this is mathematically well-behaved. E.g., -1/4 => 0 and -1%4 => -1, but floorDivide(-1,4) => -1 with remainder[0] => 3.

Long floorDivide(numerator: Long, denominator: Long)

Divide two long integers, returning the floor of the quotient.

Unlike the built-in division, this is mathematically well-behaved. E.g., -1/4 => 0 but floorDivide(-1,4) => -1.

Int get(field: Int)

Returns the value for a given time field.

Int getActualMaximum(field: Int)

Returns the maximum value that this field could have, given the current date. For example, with the Gregorian date February 3, 1997 and the DAY_OF_MONTH field, the actual maximum is 28; for February 3, 1996 it is 29.

The actual maximum computation ignores smaller fields and the current value of like-sized fields. For example, the actual maximum of the DAY_OF_YEAR or MONTH depends only on the year and supra-year fields. The actual maximum of the DAY_OF_MONTH depends, in addition, on the MONTH field and any other fields at that granularity (such as IS_LEAP_MONTH). The DAY_OF_WEEK_IN_MONTH field does not depend on the current DAY_OF_WEEK; it returns the maximum for any day of week in the current month. Likewise for the WEEK_OF_MONTH and WEEK_OF_YEAR fields.

Int getActualMinimum(field: Int)

Returns the minimum value that this field could have, given the current date. For most fields, this is the same as getMinimum and getGreatestMinimum. However, some fields, especially those related to week number, are more complicated.

For example, assume getMinimalDaysInFirstWeek returns 4 and getFirstDayOfWeek returns SUNDAY. If the first day of the month is Sunday, Monday, Tuesday, or Wednesday there will be four or more days in the first week, so it will be week number 1, and getActualMinimum(WEEK_OF_MONTH) will return 1. However, if the first of the month is a Thursday, Friday, or Saturday, there are not four days in that week, so it is week number 0, and getActualMinimum(WEEK_OF_MONTH) will return 0.

Array<Locale!>! getAvailableLocales()

Returns the list of locales for which Calendars are installed.

DateFormat! getDateTimeFormat(dateStyle: Int, timeStyle: Int, loc: ULocale!)

[icu] Returns a DateFormat appropriate to this calendar. Subclasses wishing to specialize this behavior should override #handleGetDateFormat.

DateFormat! getDateTimeFormat(dateStyle: Int, timeStyle: Int, loc: Locale!)

[icu] Returns a DateFormat appropriate to this calendar. Subclasses wishing to specialize this behavior should override #handleGetDateFormat.

String! getDisplayName(loc: ULocale!)

Returns the name of this calendar in the language of the given locale.

String! getDisplayName(loc: Locale!)

Returns the name of this calendar in the language of the given locale.

Int getFieldCount()

[icu] Returns the number of fields defined by this calendar. Valid field arguments to set() and get() are 0..getFieldCount()-1.

Array<Array<IntArray!>!>! getFieldResolutionTable()

Returns the field resolution array for this calendar. Calendars that define additional fields or change the semantics of existing fields should override this method to adjust the field resolution semantics accordingly. Other subclasses should not override this method.

Int getFirstDayOfWeek()

Returns what the first day of the week is, where 1 = SUNDAY and 7 = SATURDAY. e.g., Sunday in US, Monday in France

Int getGreatestMinimum(field: Int)

Returns the highest minimum value for the given field if varies. Otherwise same as getMinimum(). For Gregorian, no difference.

Int getGregorianDayOfMonth()

Returns the day of month (1-based) on the Gregorian calendar as computed by computeGregorianFields().

Int getGregorianDayOfYear()

Returns the day of year (1-based) on the Gregorian calendar as computed by computeGregorianFields().

Int getGregorianMonth()

Returns the month (0-based) on the Gregorian calendar as computed by computeGregorianFields().

Int getGregorianYear()

Returns the extended year on the Gregorian calendar as computed by computeGregorianFields().

Calendar! getInstance()

Returns a calendar using the default time zone and locale.

Calendar! getInstance(zone: TimeZone!)

Returns a calendar using the specified time zone and default locale.

Calendar! getInstance(zone: TimeZone!, locale: ULocale!)

Returns a calendar with the specified time zone and locale.

Calendar! getInstance(zone: TimeZone!, aLocale: Locale!)

Returns a calendar with the specified time zone and locale.

Calendar! getInstance(locale: ULocale!)

Returns a calendar using the default time zone and specified locale.

Calendar! getInstance(aLocale: Locale!)

Returns a calendar using the default time zone and specified locale.

Array<String!>! getKeywordValuesForLocale(key: String!, locale: ULocale!, commonlyUsed: Boolean)

[icu] Given a key and a locale, returns an array of string values in a preferred order that would make a difference. These are all and only those values where the open (creation) of the service with the locale formed from the input locale plus input keyword and that value has different behavior than creation with the input locale alone.

Int getLeastMaximum(field: Int)

Returns the lowest maximum value for the given field if varies. Otherwise same as getMaximum(). e.g., for Gregorian DAY_OF_MONTH, 28.

Int getLimit(field: Int, limitType: Int)

Returns a limit for a field.

Int getMaximum(field: Int)

Returns the maximum value for the given time field. e.g. for Gregorian DAY_OF_MONTH, 31.

Int getMinimalDaysInFirstWeek()

Returns what the minimal days required in the first week of the year are. That is, if the first week is defined as one that contains the first day of the first month of a year, getMinimalDaysInFirstWeek returns 1. If the minimal days required must be a full week, getMinimalDaysInFirstWeek returns 7.

Int getMinimum(field: Int)

Returns the minimum value for the given time field. e.g., for Gregorian DAY_OF_MONTH, 1.

Int getRepeatedWallTimeOption()

[icu]Gets the behavior for handling wall time repeating multiple times at negative time zone offset transitions.

Int getSkippedWallTimeOption()

[icu]Gets the behavior for handling skipped wall time at positive time zone offset transitions.

Int getStamp(field: Int)

Returns the timestamp of a field.

Date! getTime()

Returns this Calendar's current time.

Long getTimeInMillis()

Returns this Calendar's current time as a long.

TimeZone! getTimeZone()

Returns the time zone.

Calendar.WeekData! getWeekData()

[icu] Return simple, immutable struct-like class for access to the week data in this calendar.

Calendar.WeekData! getWeekDataForRegion(region: String!)

[icu] Return simple, immutable struct-like class for access to the CLDR week data.

Int gregorianMonthLength(y: Int, m: Int)

Returns the length of a month of the Gregorian calendar.

Int gregorianPreviousMonthLength(y: Int, m: Int)

Returns the length of a previous month of the Gregorian calendar.

Int handleComputeJulianDay(bestField: Int)

Subclasses may override this. This method calls handleGetMonthLength() to obtain the calendar-specific month length.

IntArray! handleCreateFields()

Subclasses that use additional fields beyond those defined in Calendar should override this method to return an int[] array of the appropriate length. The length must be at least BASE_FIELD_COUNT and no more than MAX_FIELD_COUNT.

DateFormat! handleGetDateFormat(pattern: String!, locale: ULocale!)

Creates a DateFormat appropriate to this calendar. This is a framework method for subclasses to override. This method is responsible for creating the calendar-specific DateFormat and DateFormatSymbols objects as needed.

DateFormat! handleGetDateFormat(pattern: String!, override: String!, locale: Locale!)

Creates a DateFormat appropriate to this calendar. This is a framework method for subclasses to override. This method is responsible for creating the calendar-specific DateFormat and DateFormatSymbols objects as needed.

DateFormat! handleGetDateFormat(pattern: String!, locale: Locale!)

Creates a DateFormat appropriate to this calendar. This is a framework method for subclasses to override. This method is responsible for creating the calendar-specific DateFormat and DateFormatSymbols objects as needed.

Int handleGetMonthLength(extendedYear: Int, month: Int)

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

Int handleGetYearLength(eyear: Int)

Returns the number of days in 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.

Int hashCode()

Returns a hash code for this calendar.

Boolean inTemporalLeapYear()

[icu] Returns true if the date is in a leap year. Recalculate the current time field values if the time value has been changed by a call to * setTime(). This method is semantically const, but may alter the object in memory. A "leap year" is a year that contains more days than other years (for solar or lunar calendars) or more months than other years (for lunisolar calendars like Hebrew or Chinese), as defined in the ECMAScript Temporal proposal.

Int internalGet(field: Int)

Returns the value for a given time field. This is an internal method for subclasses that does not trigger any calculations.

Int internalGet(field: Int, defaultValue: Int)

Returns the value for a given time field, or return the given default value if the field is not set. This is an internal method for subclasses that does not trigger any calculations.

Long internalGetTimeInMillis()

Returns the current milliseconds without recomputing.

Unit internalSet(field: Int, value: Int)

Set a field to a value. Subclasses should use this method when computing fields. It sets the time stamp in the stamp[] array to INTERNALLY_SET. If a field that may not be set by subclasses is passed in, an IllegalArgumentException is thrown. This prevents subclasses from modifying fields that are intended to be calendar-system invariant.

Boolean isEquivalentTo(other: Calendar!)

[icu] Returns true if the given Calendar object is equivalent to this one. An equivalent Calendar will behave exactly as this one does, but it may be set to a different time. By contrast, for the equals() method to return true, the other Calendar must be set to the same time.

Boolean isGregorianLeapYear(year: Int)

Determines if the given year is a leap year. Returns true if the given year is a leap year.

Boolean isLenient()

Tell whether date/time interpretation is to be lenient.

Boolean isSet(field: Int)

Determines if the given time field has a value set.

Boolean isWeekend()

[icu] Returns true if this Calendar's current date and time is in the weekend in this calendar system.

Boolean isWeekend(date: Date!)

[icu] Returns true if the given date and time is in the weekend in this calendar system. Equivalent to calling setTime() followed by isWeekend(). Note: This method changes the time this calendar is set to.

Int julianDayToDayOfWeek(julian: Int)

Returns the day of week, from SUNDAY to SATURDAY, given a Julian day.

Long julianDayToMillis(julian: Int)

Converts Julian day to time as milliseconds.

Int millisToJulianDay(millis: Long)

Converts time as milliseconds to Julian day.

Int newerField(defaultField: Int, alternateField: Int)

Returns the field that is newer, either defaultField, or alternateField. If neither is newer or neither is set, return defaultField.

Int newestStamp(first: Int, last: Int, bestStampSoFar: Int)

Returns the newest stamp of a given range of fields.

Unit pinField(field: Int)

Adjust the specified field so that it is within the allowable range for the date to which this calendar is set. For example, in a Gregorian calendar pinning the DAY_OF_MONTH field for a calendar set to April 31 would cause it to be set to April 30.

Subclassing:
This utility method is intended for use by subclasses that need to implement their own overrides of #roll and add.

Note: pinField is implemented in terms of getActualMinimum and getActualMaximum. If either of those methods uses a slow, iterative algorithm for a particular field, it would be unwise to attempt to call pinField for that field. If you really do need to do so, you should override this method to do something more efficient for that field.

Unit prepareGetActual(field: Int, isMinimum: Boolean)

Prepare this calendar for computing the actual minimum or maximum. This method modifies this calendar's fields; it is called on a temporary calendar.

Rationale: The semantics of getActualXxx() is to return the maximum or minimum value that the given field can take, taking into account other relevant fields. In general these other fields are larger fields. For example, when computing the actual maximum DAY_OF_MONTH, the current value of DAY_OF_MONTH itself is ignored, as is the value of any field smaller.

The time fields all have fixed minima and maxima, so we don't need to worry about them. This also lets us set the MILLISECONDS_IN_DAY to zero to erase any effects the time fields might have when computing date fields.

DAY_OF_WEEK is adjusted specially for the WEEK_OF_MONTH and WEEK_OF_YEAR fields to ensure that they are computed correctly.

Int resolveFields(precedenceTable: Array<Array<IntArray!>!>!)

Given a precedence table, return the newest field combination in the table, or -1 if none is found.

The precedence table is a 3-dimensional array of integers. It may be thought of as an array of groups. Each group is an array of lines. Each line is an array of field numbers. Within a line, if all fields are set, then the time stamp of the line is taken to be the stamp of the most recently set field. If any field of a line is unset, then the line fails to match. Within a group, the line with the newest time stamp is selected. The first field of the line is returned to indicate which line matched.

In some cases, it may be desirable to map a line to field that whose stamp is NOT examined. For example, if the best field is DAY_OF_WEEK then the DAY_OF_WEEK_IN_MONTH algorithm may be used. In order to do this, insert the value REMAP_RESOLVE | F at the start of the line, where F is the desired return field value. This field will NOT be examined; it only determines the return value if the other fields in the line are the newest.

If all lines of a group contain at least one unset field, then no line will match, and the group as a whole will fail to match. In that case, the next group will be processed. If all groups fail to match, then -1 is returned.

Unit roll(field: Int, up: Boolean)

Rolls (up/down) a single unit of time on the given field. If the field is rolled past its maximum allowable value, it will "wrap" back to its minimum and continue rolling. For example, to roll the current date up by one day, you can call:

roll(DATE, true)

When rolling on the YEAR field, it will roll the year value in the range between 1 and the value returned by calling getMaximum(YEAR).

When rolling on certain fields, the values of other fields may conflict and need to be changed. For example, when rolling the MONTH field for the Gregorian date 1/31/96 upward, the DAY_OF_MONTH field must be adjusted so that the result is 2/29/96 rather than the invalid 2/31/96.

Rolling up always means rolling forward in time (unless the limit of the field is reached, in which case it may pin or wrap), so for the Gregorian calendar, starting with 100 BC and rolling the year up results in 99 BC. When eras have a definite beginning and end (as in the Chinese calendar, or as in most eras in the Japanese calendar) then rolling the year past either limit of the era will cause the year to wrap around. When eras only have a limit at one end, then attempting to roll the year past that limit will result in pinning the year at that limit. Note that for most calendars in which era 0 years move forward in time (such as Buddhist, Hebrew, or Islamic), it is possible for add or roll to result in negative years for era 0 (that is the only way to represent years before the calendar epoch in such calendars).

Note: Calling roll(field, true) N times is not necessarily equivalent to calling roll(field, N). For example, imagine that you start with the date Gregorian date January 31, 1995. If you call roll(Calendar.MONTH, 2), the result will be March 31, 1995. But if you call roll(Calendar.MONTH, true), the result will be February 28, 1995. Calling it one more time will give March 28, 1995, which is usually not the desired result.

Note: You should always use roll and add rather than attempting to perform arithmetic operations directly on the fields of a Calendar. It is quite possible for Calendar subclasses to have fields with non-linear behavior, for example missing months or days during non-leap years. The subclasses' add and roll methods will take this into account, while simple arithmetic manipulations may give invalid results.

Unit roll(field: Int, amount: Int)

Rolls (up/down) a specified amount time on the given field. For example, to roll the current date up by three days, you can call roll(Calendar.DATE, 3). If the field is rolled past its maximum allowable value, it will "wrap" back to its minimum and continue rolling. For example, calling roll(Calendar.DATE, 10) on a Gregorian calendar set to 4/25/96 will result in the date 4/5/96.

When rolling on certain fields, the values of other fields may conflict and need to be changed. For example, when rolling the MONTH field for the Gregorian date 1/31/96 by +1, the DAY_OF_MONTH field must be adjusted so that the result is 2/29/96 rather than the invalid 2/31/96.

Rolling by a positive value always means rolling forward in time (unless the limit of the field is reached, in which case it may pin or wrap), so for the Gregorian calendar, starting with 100 BC and rolling the year by + 1 results in 99 BC. When eras have a definite beginning and end (as in the Chinese calendar, or as in most eras in the Japanese calendar) then rolling the year past either limit of the era will cause the year to wrap around. When eras only have a limit at one end, then attempting to roll the year past that limit will result in pinning the year at that limit. Note that for most calendars in which era 0 years move forward in time (such as Buddhist, Hebrew, or Islamic), it is possible for add or roll to result in negative years for era 0 (that is the only way to represent years before the calendar epoch in such calendars).

[icu] Note: the ICU implementation of this method is able to roll all fields except for ERA, DST_OFFSET, and ZONE_OFFSET. Subclasses may, of course, add support for additional fields in their overrides of roll.

Note: You should always use roll and add rather than attempting to perform arithmetic operations directly on the fields of a Calendar. It is quite possible for Calendar subclasses to have fields with non-linear behavior, for example missing months or days during non-leap years. The subclasses' add and roll methods will take this into account, while simple arithmetic manipulations may give invalid results.

Subclassing:
This implementation of roll assumes that the behavior of the field is continuous between its minimum and maximum, which are found by calling getActualMinimum and getActualMaximum. For most such fields, simple addition, subtraction, and modulus operations are sufficient to perform the roll. For week-related fields, the results of getFirstDayOfWeek and getMinimalDaysInFirstWeek are also necessary. Subclasses can override these two methods if their values differ from the defaults.

Subclasses that have fields for which the assumption of continuity breaks down must override roll to handle those fields specially. For example, in the Hebrew calendar the month "Adar I" only occurs in leap years; in other years the calendar jumps from Shevat (month #4) to Adar (month #6). The android.icu.util.HebrewCalendar#roll method takes this into account, so that rolling the month of Shevat by one gives the proper result (Adar) in a non-leap year.

Unit set(field: Int, value: Int)

Sets the time field with the given value.

Unit set(year: Int, month: Int, date: Int)

Sets the values for the fields year, month, and date. Previous values of other fields are retained. If this is not desired, call clear() first.

Unit set(year: Int, month: Int, date: Int, hour: Int, minute: Int)

Sets the values for the fields year, month, date, hour, and minute. Previous values of other fields are retained. If this is not desired, call clear() first.

Unit set(year: Int, month: Int, date: Int, hour: Int, minute: Int, second: Int)

Sets the values for the fields year, month, date, hour, minute, and second. Previous values of other fields are retained. If this is not desired, call #clear first.

Unit setFirstDayOfWeek(value: Int)

Sets what the first day of the week is, where 1 = SUNDAY and 7 = SATURDAY.

Unit setLenient(lenient: Boolean)

Specify whether or not date/time interpretation is to be lenient. With lenient interpretation, a date such as "February 942, 1996" will be treated as being equivalent to the 941st day after February 1, 1996. With strict interpretation, such dates will cause an exception to be thrown.

Unit setMinimalDaysInFirstWeek(value: Int)

Sets what the minimal days required in the first week of the year are. For example, if the first week is defined as one that contains the first day of the first month of a year, call the method with value 1. If it must be a full week, use value 7.

Unit setRepeatedWallTimeOption(option: Int)

[icu]Sets the behavior for handling wall time repeating multiple times at negative time zone offset transitions. For example, 1:30 AM on November 6, 2011 in US Eastern time (America/New_York) occurs twice; 1:30 AM EDT, then 1:30 AM EST one hour later. When WALLTIME_FIRST is used, the wall time 1:30AM in this example will be interpreted as 1:30 AM EDT (first occurrence). When WALLTIME_LAST is used, it will be interpreted as 1:30 AM EST (last occurrence). The default value is WALLTIME_LAST.

Unit setSkippedWallTimeOption(option: Int)

[icu]Sets the behavior for handling skipped wall time at positive time zone offset transitions. For example, 2:30 AM on March 13, 2011 in US Eastern time (America/New_York) does not exist because the wall time jump from 1:59 AM EST to 3:00 AM EDT. When WALLTIME_FIRST is used, 2:30 AM is interpreted as 30 minutes before 3:00 AM EDT, therefore, it will be resolved as 1:30 AM EST. When WALLTIME_LAST is used, 2:30 AM is interpreted as 31 minutes after 1:59 AM EST, therefore, it will be resolved as 3:30 AM EDT. When WALLTIME_NEXT_VALID is used, 2:30 AM will be resolved as next valid wall time, that is 3:00 AM EDT. The default value is WALLTIME_LAST.

Note:This option is effective only when this calendar is lenient. When the calendar is strict, such non-existing wall time will cause an exception.

Unit setTime(date: Date!)

Sets this Calendar's current time with the given Date.

Note: Calling setTime with Date(Long.MAX_VALUE) or Date(Long.MIN_VALUE) may yield incorrect field values from get(int).

Unit setTimeInMillis(millis: Long)

Sets this Calendar's current time from the given long value. An IllegalIcuArgumentException is thrown when millis is outside the range permitted by a Calendar object when in strict mode. When in lenient mode the out of range values are pinned to their respective min/max.

Unit setTimeZone(value: TimeZone!)

Sets the time zone with the given time zone value.

Calendar! setWeekData(wdata: Calendar.WeekData!)

[icu] Set data in this calendar based on the WeekData input.

String toString()

Returns a string representation of this calendar. This method is intended to be used only for debugging purposes, and the format of the returned string may vary between implementations. The returned string may be empty but may not be null.

Unit validateField(field: Int)

Validate a single field of this calendar. Subclasses should override this method to validate any calendar-specific fields. Generic fields can be handled by Calendar.validateField().

Unit validateField(field: Int, min: Int, max: Int)

Validate a single field of this calendar given its minimum and maximum allowed value. If the field is out of range, throw a descriptive IllegalArgumentException. Subclasses may use this method in their implementation of validateField(int).

Unit validateFields()

Ensure that each field is within its valid range by calling validateField(int) on each field that has been set. This method should only be called if this calendar is not lenient.

Int weekNumber(dayOfPeriod: Int, dayOfWeek: Int)

Returns the week number of a day, within a period. This may be the week number in a year, or the week number in a month. Usually this will be a value >= 1, but if some initial days of the period are excluded from week 1, because getMinimalDaysInFirstWeek is > 1, then the week number will be zero for those initial days. This method requires the day of week for the given date in order to determine the result.

Subclassing:
This method is intended for use by subclasses in implementing their computeTime and/or computeFields methods. It is often useful in getActualMinimum and getActualMaximum as well.

Int weekNumber(desiredDay: Int, dayOfPeriod: Int, dayOfWeek: Int)

Returns the week number of a day, within a period. This may be the week number in a year or the week number in a month. Usually this will be a value >= 1, but if some initial days of the period are excluded from week 1, because getMinimalDaysInFirstWeek is > 1, then the week number will be zero for those initial days. This method requires the day number and day of week for some known date in the period in order to determine the day of week on the desired day.

Subclassing:
This method is intended for use by subclasses in implementing their computeTime and/or computeFields methods. It is often useful in getActualMinimum and getActualMaximum as well.

This variant is handy for computing the week number of some other day of a period (often the first or last day of the period) when its day of the week is not known but the day number and day of week for some other day in the period (e.g. the current date) is known.

Inherited properties
Date! MAX_DATE

The maximum supported Date. This value is equivalent to MAX_JULIAN and MAX_MILLIS.

Date! MIN_DATE

The minimum supported Date. This value is equivalent to MIN_JULIAN and MIN_MILLIS.

Constants

AMSHIR

Added in API level 24
static val AMSHIR: Int

Constant for Μεϣιρ / ﺮﻴﺸﻣأ, the 6th month of the Coptic year.

Value: 5

BABA

Added in API level 24
static val BABA: Int

Constant for Παοπι / ﻪﺑﺎﺑ, the 2nd month of the Coptic year.

Value: 1

BARAMHAT

Added in API level 24
static val BARAMHAT: Int

Constant for Παρεμϩατ / تﺎﻬﻣﺮﺑ, the 7th month of the Coptic year.

Value: 6

BARAMOUDA

Added in API level 24
static val BARAMOUDA: Int

Constant for Φαρμοθι / هدﻮﻣﺮﺑ, the 8th month of the Coptic year.

Value: 7

BASHANS

Added in API level 24
static val BASHANS: Int

Constant for Παϣαν / ﺲﻨﺸﺑ;, the 9th month of the Coptic year.

Value: 8

EPEP

Added in API level 24
static val EPEP: Int

Constant for Επηπ / ﺐﻴﺑأ, the 11th month of the Coptic year.

Value: 10

HATOR

Added in API level 24
static val HATOR: Int

Constant for Αθορ / رﻮﺗﺎﻫ, the 3rd month of the Coptic year.

Value: 2

KIAHK

Added in API level 24
static val KIAHK: Int

Constant for Χοιακ / ﻚﻬﻴﻛ;, the 4th month of the Coptic year.

Value: 3

MESRA

Added in API level 24
static val MESRA: Int

Constant for Μεϲωρη / ىﺮﺴﻣ, the 12th month of the Coptic year.

Value: 11

NASIE

Added in API level 24
static val NASIE: Int

Constant for Πικογϫι μαβοτ / ﺮﻴﻐﺼﻟاﺮﻬﺸﻟا, the 13th month of the Coptic year.

Value: 12

PAONA

Added in API level 24
static val PAONA: Int

Constant for Παωνι / ﻪﻧؤﻮﺑ, the 10th month of the Coptic year.

Value: 9

TOBA

Added in API level 24
static val TOBA: Int

Constant for Τωβι / طﻮﺒﻫ, the 5th month of the Coptic year.

Value: 4

TOUT

Added in API level 24
static val TOUT: Int

Constant for ωογτ / تﻮﺗ, the 1st month of the Coptic year.

Value: 0

Public constructors

CopticCalendar

Added in API level 24
CopticCalendar()

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

CopticCalendar

Added in API level 24
CopticCalendar(zone: TimeZone!)

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

Parameters
zone TimeZone!: The time zone for the new calendar.

CopticCalendar

Added in API level 24
CopticCalendar(
    zone: TimeZone!,
    locale: ULocale!)

Constructs a CopticCalendar 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.

CopticCalendar

Added in API level 24
CopticCalendar(
    zone: TimeZone!,
    aLocale: Locale!)

Constructs a CopticCalendar 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.

CopticCalendar

Added in API level 24
CopticCalendar(locale: ULocale!)

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

Parameters
locale ULocale!: The icu locale for the new calendar.

CopticCalendar

Added in API level 24
CopticCalendar(
    year: Int,
    month: Int,
    date: Int)

Constructs a CopticCalendar 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 Tout.
date Int: The value used to set the calendar's DATE time field.

CopticCalendar

Added in API level 24
CopticCalendar(
    year: Int,
    month: Int,
    date: Int,
    hour: Int,
    minute: Int,
    second: Int)

Constructs a CopticCalendar 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 Tout.
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.

CopticCalendar

Added in API level 24
CopticCalendar(date: Date!)

Constructs a CopticCalendar 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.

CopticCalendar

Added in API level 24
CopticCalendar(aLocale: Locale!)

Constructs a CopticCalendar 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

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 24
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

setTemporalMonthCode

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

handleComputeMonthStart

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

handleGetLimit

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

Calculate the limit for a specified type of limit and field

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