Package com.ibm.icu.util
Class CopticCalendar
java.lang.Object
com.ibm.icu.util.Calendar
com.ibm.icu.util.CopticCalendar
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<Calendar>
Implement the Coptic calendar system.
CopticCalendar usually should be instantiated using
Calendar.getInstance(ULocale)
passing in a ULocale
with the tag "@calendar=coptic"
.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.ibm.icu.util.Calendar
Calendar.FormatConfiguration, Calendar.WeekData
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Constant for Μεϣιρ / ﺮﻴﺸﻣأ, the 6th month of the Coptic year.static final int
Constant for Παοπι / ﻪﺑﺎﺑ, the 2nd month of the Coptic year.static final int
Constant for Παρεμϩατ / تﺎﻬﻣﺮﺑ, the 7th month of the Coptic year.static final int
Constant for Φαρμοθι / هدﻮﻣﺮﺑ, the 8th month of the Coptic year.static final int
Constant for Παϣαν / ﺲﻨﺸﺑ;, the 9th month of the Coptic year.static final int
Constant for Επηπ / ﺐﻴﺑأ, the 11th month of the Coptic year.static final int
Constant for Αθορ / رﻮﺗﺎﻫ, the 3rd month of the Coptic year.static final int
Constant for Χοιακ / ﻚﻬﻴﻛ;, the 4th month of the Coptic year.static final int
Constant for Μεϲωρη / ىﺮﺴﻣ, the 12th month of the Coptic year.static final int
Constant for Πικογϫι μαβοτ / ﺮﻴﻐﺼﻟاﺮﻬﺸﻟا, the 13th month of the Coptic year.static final int
Constant for Παωνι / ﻪﻧؤﻮﺑ, the 10th month of the Coptic year.static final int
Constant for Τωβι / طﻮﺒﻫ, the 5th month of the Coptic year.static final int
Constant for ωογτ / تﻮﺗ, the 1st month of the Coptic 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, IS_LEAP_MONTH, JAN_1_1_JULIAN_DAY, JANUARY, JULIAN_DAY, JULY, JUNE, LEAST_MAXIMUM, MARCH, MAX_DATE, MAX_FIELD_COUNT, MAX_JULIAN, MAX_MILLIS, MAXIMUM, MAY, MILLISECOND, MILLISECONDS_IN_DAY, MIN_DATE, MIN_JULIAN, MIN_MILLIS, MINIMUM, MINIMUM_USER_STAMP, MINUTE, MONDAY, MONTH, NOVEMBER, OCTOBER, ONE_DAY, ONE_HOUR, ONE_MINUTE, ONE_SECOND, ONE_WEEK, PM, RESOLVE_REMAP, SATURDAY, SECOND, SEPTEMBER, SUNDAY, THURSDAY, TUESDAY, UNDECIMBER, UNSET, WALLTIME_FIRST, WALLTIME_LAST, WALLTIME_NEXT_VALID, WEDNESDAY, WEEK_OF_MONTH, WEEK_OF_YEAR, WEEKDAY, WEEKEND, WEEKEND_CEASE, WEEKEND_ONSET, YEAR, YEAR_WOY, ZONE_OFFSET
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a defaultCopticCalendar
using the current time in the default time zone with the default locale.CopticCalendar
(int year, int month, int date) Constructs aCopticCalendar
with the given date set in the default time zone with the default locale.CopticCalendar
(int year, int month, int date, int hour, int minute, int second) Constructs aCopticCalendar
with the given date and time set for the default time zone with the default locale.CopticCalendar
(TimeZone zone) Constructs aCopticCalendar
based on the current time in the given time zone with the default locale.CopticCalendar
(TimeZone zone, ULocale locale) Constructs aCopticCalendar
based on the current time in the given time zone with the given locale.CopticCalendar
(TimeZone zone, Locale aLocale) Constructs aCopticCalendar
based on the current time in the given time zone with the given locale.CopticCalendar
(ULocale locale) Constructs aCopticCalendar
based on the current time in the default time zone with the given locale.CopticCalendar
(Date date) Constructs aCopticCalendar
with the given date set in the default time zone with the default locale.CopticCalendar
(Locale aLocale) Constructs aCopticCalendar
based on the current time in the default time zone with the given locale. -
Method Summary
Modifier and TypeMethodDescriptionstatic int
ceToJD
(long year, int month, int day, int jdEpochOffset) Convert an Coptic/Ethiopic year, month and day to a Julian daystatic int
copticToJD
(long year, int month, int date) Convert an Coptic year, month, and day to a Julian day.protected int
Deprecated.This API is ICU internal only.getType()
Returns the calendar type name string for this Calendar object.protected void
handleComputeFields
(int julianDay) Deprecated.This API is ICU internal only.protected int
handleComputeMonthStart
(int eyear, int emonth, boolean useMonth) Return JD of start of given month/extended yearprotected int
Deprecated.This API is ICU internal only.protected int
handleGetLimit
(int field, int limitType) Calculate the limit for a specified type of limit and fieldprotected int
handleGetMonthLength
(int extendedYear, int month) Return the number of days in the given month of the given extended year of this calendar system.static void
jdToCE
(int julianDay, int jdEpochOffset, int[] fields) Convert a Julian day to an Coptic/Ethiopic year, month and dayMethods inherited from class com.ibm.icu.util.Calendar
add, after, before, clear, clear, clone, compareTo, complete, computeFields, computeGregorianFields, computeGregorianMonthStart, computeJulianDay, computeMillisInDay, computeMillisInDayLong, computeTime, computeZoneOffset, computeZoneOffset, equals, fieldDifference, fieldName, floorDivide, floorDivide, floorDivide, floorDivide, get, getActualMaximum, getActualMinimum, getAvailableLocales, getAvailableULocales, getDateAtTimePattern, getDateTimeFormat, getDateTimeFormat, getDateTimePattern, getDayOfWeekType, getDefaultDayInMonth, getDefaultMonthInYear, getDisplayName, getDisplayName, getFieldCount, getFieldResolutionTable, getFirstDayOfWeek, getGreatestMinimum, getGregorianDayOfMonth, getGregorianDayOfYear, getGregorianMonth, getGregorianYear, getInstance, getInstance, getInstance, getInstance, getInstance, getInstance, getKeywordValuesForLocale, getLeastMaximum, getLimit, getLocale, getMaximum, getMinimalDaysInFirstWeek, getMinimum, getRelatedYear, getRepeatedWallTimeOption, getSkippedWallTimeOption, getStamp, getTime, getTimeInMillis, getTimeZone, getWeekData, getWeekDataForRegion, getWeekendTransition, gregorianMonthLength, gregorianPreviousMonthLength, handleComputeJulianDay, handleCreateFields, handleGetDateFormat, handleGetDateFormat, handleGetDateFormat, handleGetDateFormat, handleGetYearLength, hashCode, haveDefaultCentury, 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, setRelatedYear, setRepeatedWallTimeOption, setSkippedWallTimeOption, setTime, setTimeInMillis, setTimeZone, setWeekData, toString, validateField, validateField, validateFields, weekNumber, weekNumber
-
Field Details
-
TOUT
public static final int TOUTConstant for ωογτ / تﻮﺗ, the 1st month of the Coptic year.- See Also:
-
BABA
public static final int BABAConstant for Παοπι / ﻪﺑﺎﺑ, the 2nd month of the Coptic year.- See Also:
-
HATOR
public static final int HATORConstant for Αθορ / رﻮﺗﺎﻫ, the 3rd month of the Coptic year.- See Also:
-
KIAHK
public static final int KIAHKConstant for Χοιακ / ﻚﻬﻴﻛ;, the 4th month of the Coptic year.- See Also:
-
TOBA
public static final int TOBAConstant for Τωβι / طﻮﺒﻫ, the 5th month of the Coptic year.- See Also:
-
AMSHIR
public static final int AMSHIRConstant for Μεϣιρ / ﺮﻴﺸﻣأ, the 6th month of the Coptic year.- See Also:
-
BARAMHAT
public static final int BARAMHATConstant for Παρεμϩατ / تﺎﻬﻣﺮﺑ, the 7th month of the Coptic year.- See Also:
-
BARAMOUDA
public static final int BARAMOUDAConstant for Φαρμοθι / هدﻮﻣﺮﺑ, the 8th month of the Coptic year.- See Also:
-
BASHANS
public static final int BASHANSConstant for Παϣαν / ﺲﻨﺸﺑ;, the 9th month of the Coptic year.- See Also:
-
PAONA
public static final int PAONAConstant for Παωνι / ﻪﻧؤﻮﺑ, the 10th month of the Coptic year.- See Also:
-
EPEP
public static final int EPEPConstant for Επηπ / ﺐﻴﺑأ, the 11th month of the Coptic year.- See Also:
-
MESRA
public static final int MESRAConstant for Μεϲωρη / ىﺮﺴﻣ, the 12th month of the Coptic year.- See Also:
-
NASIE
public static final int NASIEConstant for Πικογϫι μαβοτ / ﺮﻴﻐﺼﻟاﺮﻬﺸﻟا, the 13th month of the Coptic year.- See Also:
-
-
Constructor Details
-
CopticCalendar
public CopticCalendar()Constructs a defaultCopticCalendar
using the current time in the default time zone with the default locale. -
CopticCalendar
Constructs aCopticCalendar
based on the current time in the given time zone with the default locale.- Parameters:
zone
- The time zone for the new calendar.
-
CopticCalendar
Constructs aCopticCalendar
based on the current time in the default time zone with the given locale.- Parameters:
aLocale
- The locale for the new calendar.
-
CopticCalendar
Constructs aCopticCalendar
based on the current time in the default time zone with the given locale.- Parameters:
locale
- The icu locale for the new calendar.
-
CopticCalendar
Constructs aCopticCalendar
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.
-
CopticCalendar
Constructs aCopticCalendar
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.
-
CopticCalendar
public CopticCalendar(int year, int month, int date) Constructs aCopticCalendar
with the given date set in the default time zone with the default locale. -
CopticCalendar
Constructs aCopticCalendar
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.
-
CopticCalendar
public CopticCalendar(int year, int month, int date, int hour, int minute, int second) Constructs aCopticCalendar
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'sYEAR
time field.month
- The value used to set the calendar'sMONTH
time field. The value is 0-based. e.g., 0 for Tout.date
- The value used to set the calendar'sDATE
time field.hour
- The value used to set the calendar'sHOUR_OF_DAY
time field.minute
- The value used to set the calendar'sMINUTE
time field.second
- The value used to set the calendar'sSECOND
time field.
-
-
Method Details
-
getType
Returns the calendar type name string for this Calendar object. The returned string is the legacy ICU calendar attribute value, for example, "gregorian" or "japanese".See type="old type name" for the calendar attribute of locale IDs at http://www.unicode.org/reports/tr35/#Key_Type_Definitions
-
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 classCalendar
- Returns:
- the extended year
-
handleComputeFields
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
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 classCalendar
-
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. -
copticToJD
public static int copticToJD(long year, int month, int date) Convert an Coptic year, month, and day to a Julian day.- Parameters:
year
- the yearmonth
- the monthdate
- the day
-
handleComputeMonthStart
protected int handleComputeMonthStart(int eyear, int emonth, boolean useMonth) Return JD of start of given month/extended year- Specified by:
handleComputeMonthStart
in classCalendar
- Parameters:
eyear
- the extended yearemonth
- the zero-based month, or 0 if useMonth is falseuseMonth
- 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
-
handleGetLimit
protected int handleGetLimit(int field, int limitType) Calculate the limit for a specified type of limit and field- Specified by:
handleGetLimit
in classCalendar
- Parameters:
field
- one of the above field numberslimitType
- one ofMINIMUM
,GREATEST_MINIMUM
,LEAST_MAXIMUM
, orMAXIMUM
-
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 classCalendar
-
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 yearmonth
- the monthday
- 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
-