com.ibm.icu.util
Class CopticCalendar

java.lang.Object
  extended by com.ibm.icu.util.Calendar
      extended by com.ibm.icu.util.CopticCalendar
All Implemented Interfaces:
Serializable, Cloneable, Comparable

public final class CopticCalendar
extends 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:
Calendar, Serialized Form
Status:
Stable ICU 3.4.

Nested Class Summary
 
Nested classes/interfaces inherited from class com.ibm.icu.util.Calendar
Calendar.FormatConfiguration
 
Field Summary
static int AMSHIR
          Constant for Μεϣιρ/ﺮﻴﺸﻣأ, the 6th month of the Coptic year.
static int BABA
          Constant for Παοπι/ﻪﺑﺎﺑ, the 2nd month of the Coptic year.
static int BARAMHAT
          Constant for Παρεμϩατ/تﺎﻬﻣﺮﺑ, the 7th month of the Coptic year.
static int BARAMOUDA
          Constant for Φαρμοθι/هدﻮﻣﺮﺑ, the 8th month of the Coptic year.
static int BASHANS
          Constant for Παϣαν/ﺲﻨﺸﺑ, the 9th month of the Coptic year.
static int EPEP
          Constant for Επηπ/ﺐﻴﺑأ, the 11th month of the Coptic year.
static int HATOR
          Constant for Αθορ/رﻮﺗﺎﻫ, the 3rd month of the Coptic year.
static int KIAHK
          Constant for Χοιακ/ﻚﻬﻴﻛ, the 4th month of the Coptic year.
static int MESRA
          Constant for Μεϲωρη/ىﺮﺴﻣ, the 12th month of the Coptic year.
static int NASIE
          Constant for Πικογϫι μαβοτ/ﺮﻴﻐﺼﻟا ﺮﻬﺸﻟا, the 13th month of the Coptic year.
static int PAONA
          Constant for Παωνι/ﻪﻧؤﻮﺑ, the 10th month of the Coptic year.
static int TOBA
          Constant for Τωβι/طﻮﺒﻫ, the 5th month of the Coptic year.
static int TOUT
          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, JAN_1_1_JULIAN_DAY, JANUARY, JULIAN_DAY, JULY, JUNE, LEAST_MAXIMUM, MARCH, MAX_DATE, MAX_FIELD_COUNT, MAX_JULIAN, MAX_MILLIS, MAXIMUM, MAY, MILLISECOND, MILLISECONDS_IN_DAY, MIN_DATE, MIN_JULIAN, MIN_MILLIS, MINIMUM, MINIMUM_USER_STAMP, MINUTE, MONDAY, MONTH, NOVEMBER, OCTOBER, ONE_DAY, ONE_HOUR, ONE_MINUTE, ONE_SECOND, ONE_WEEK, PM, RESOLVE_REMAP, SATURDAY, SECOND, SEPTEMBER, SUNDAY, THURSDAY, TUESDAY, UNDECIMBER, UNSET, WEDNESDAY, WEEK_OF_MONTH, WEEK_OF_YEAR, WEEKDAY, WEEKEND, WEEKEND_CEASE, WEEKEND_ONSET, YEAR, YEAR_WOY, ZONE_OFFSET
 
Constructor Summary
CopticCalendar()
          Constructs a default CopticCalendar using the current time in the default time zone with the default locale.
CopticCalendar(Date date)
          Constructs a CopticCalendar with the given date set in the default time zone with the default locale.
CopticCalendar(int year, int month, int date)
          Constructs a CopticCalendar 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 a CopticCalendar with the given date and time set for the default time zone with the default locale.
CopticCalendar(Locale aLocale)
          Constructs a CopticCalendar based on the current time in the default time zone with the given locale.
CopticCalendar(TimeZone zone)
          Constructs a CopticCalendar based on the current time in the given time zone with the default locale.
CopticCalendar(TimeZone zone, Locale aLocale)
          Constructs a CopticCalendar based on the current time in the given time zone with the given locale.
CopticCalendar(TimeZone zone, ULocale locale)
          Constructs a CopticCalendar based on the current time in the given time zone with the given locale.
CopticCalendar(ULocale locale)
          Constructs a CopticCalendar based on the current time in the default time zone with the given locale.
 
Method Summary
static int ceToJD(long year, int month, int day, int jdEpochOffset)
          Deprecated. Convert an Coptic/Ethiopic year, month and day to a Julian day
static int copticToJD(long year, int month, int date)
          Convert an Coptic year, month, and day to a Julian day.
protected  int getJDEpochOffset()
          Deprecated. This API is ICU internal only.
 String getType()
          Return the current Calendar type.
protected  void handleComputeFields(int julianDay)
          Deprecated. This API is ICU internal only.
protected  int handleComputeMonthStart(int eyear, int emonth, boolean useMonth)
          Deprecated. Return JD of start of given month/extended year
protected  int handleGetExtendedYear()
          Deprecated. This API is ICU internal only.
protected  int handleGetLimit(int field, int limitType)
          Deprecated. Calculate the limit for a specified type of limit and field
static void jdToCE(int julianDay, int jdEpochOffset, int[] fields)
          Deprecated. Convert a Julian day to an Coptic/Ethiopic year, month and day
 
Methods inherited from class com.ibm.icu.util.Calendar
add, after, before, clear, clear, clone, compareTo, compareTo, complete, computeFields, computeGregorianFields, computeGregorianMonthStart, computeJulianDay, computeMillisInDay, computeTime, computeZoneOffset, equals, fieldDifference, fieldName, floorDivide, floorDivide, floorDivide, floorDivide, get, getActualMaximum, getActualMinimum, getAvailableLocales, getAvailableULocales, getDateTimeFormat, getDateTimeFormat, getDayOfWeekType, getDefaultDayInMonth, getDefaultMonthInYear, getDisplayName, getDisplayName, getFieldCount, getFieldResolutionTable, getFirstDayOfWeek, getGreatestMinimum, getGregorianDayOfMonth, getGregorianDayOfYear, getGregorianMonth, getGregorianYear, getInstance, getInstance, getInstance, getInstance, getInstance, getInstance, getLeastMaximum, getLimit, getLocale, getMaximum, getMinimalDaysInFirstWeek, getMinimum, getStamp, getTime, getTimeInMillis, getTimeZone, getWeekendTransition, gregorianMonthLength, gregorianPreviousMonthLength, handleComputeJulianDay, handleCreateFields, handleGetDateFormat, handleGetDateFormat, handleGetMonthLength, handleGetYearLength, hashCode, internalGet, internalGet, internalGetTimeInMillis, internalSet, isEquivalentTo, isGregorianLeapYear, isLenient, isSet, isWeekend, isWeekend, julianDayToDayOfWeek, julianDayToMillis, millisToJulianDay, newerField, newestStamp, pinField, prepareGetActual, resolveFields, roll, roll, set, set, set, set, setFirstDayOfWeek, setLenient, setMinimalDaysInFirstWeek, setTime, setTimeInMillis, setTimeZone, toString, validateField, validateField, validateFields, weekNumber, weekNumber
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TOUT

public static final int TOUT
Constant for ωογτ/تﻮﺗ, the 1st month of the Coptic year.

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

BABA

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

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

HATOR

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

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

KIAHK

public static final int KIAHK
Constant for Χοιακ/ﻚﻬﻴﻛ, the 4th month of the Coptic year.

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

TOBA

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

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

AMSHIR

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

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

BARAMHAT

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

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

BARAMOUDA

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

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

BASHANS

public static final int BASHANS
Constant for Παϣαν/ﺲﻨﺸﺑ, the 9th month of the Coptic year.

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

PAONA

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

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

EPEP

public static final int EPEP
Constant for Επηπ/ﺐﻴﺑأ, the 11th month of the Coptic year.

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

MESRA

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

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

NASIE

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

See Also:
Constant Field Values
Status:
Stable ICU 3.4.
Constructor Detail

CopticCalendar

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

Status:
Stable ICU 3.4.

CopticCalendar

public CopticCalendar(TimeZone zone)
Constructs a CopticCalendar 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.

CopticCalendar

public CopticCalendar(Locale aLocale)
Constructs a CopticCalendar 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.

CopticCalendar

public CopticCalendar(ULocale locale)
Constructs a CopticCalendar 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.

CopticCalendar

public CopticCalendar(TimeZone zone,
                      Locale aLocale)
Constructs a CopticCalendar 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.

CopticCalendar

public CopticCalendar(TimeZone zone,
                      ULocale locale)
Constructs a CopticCalendar 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.

CopticCalendar

public CopticCalendar(int year,
                      int month,
                      int date)
Constructs a CopticCalendar 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 Tout.
date - The value used to set the calendar's DATE time field.
Status:
Stable ICU 3.4.

CopticCalendar

public CopticCalendar(Date date)
Constructs a CopticCalendar 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.

CopticCalendar

public CopticCalendar(int year,
                      int month,
                      int date,
                      int hour,
                      int minute,
                      int second)
Constructs a CopticCalendar 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 Tout.
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()
Return the current Calendar type. Note, in 3.0 this function will return 'gregorian' in Calendar to emulate legacy behavior

Overrides:
getType in class Calendar
Returns:
type of calendar (gregorian, etc)
Status:
Stable ICU 3.8.

handleGetExtendedYear

protected int handleGetExtendedYear()
Deprecated. This API is ICU internal only.

Return the extended year defined by the current fields. This will use the EXTENDED_YEAR field or the YEAR and supra-year fields (such as ERA) specific to the calendar system, depending on which set of fields is newer.

Specified by:
handleGetExtendedYear in class Calendar
Returns:
the extended year
Status:
Internal. This API is ICU internal only.

handleComputeFields

protected void handleComputeFields(int julianDay)
Deprecated. This API is ICU internal only.

Subclasses may override this method to compute several fields specific to each calendar system. These are: Subclasses can refer to the DAY_OF_WEEK and DOW_LOCAL fields, which will be set when this method is called. Subclasses can also call the getGregorianXxx() methods to obtain Gregorian calendar equivalents for the given Julian day.

In addition, subclasses should compute any subclass-specific fields, that is, fields from BASE_FIELD_COUNT to getFieldCount() - 1.

The default implementation in Calendar implements a pure proleptic Gregorian calendar.

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

getJDEpochOffset

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.

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

handleComputeMonthStart

protected int handleComputeMonthStart(int eyear,
                                      int emonth,
                                      boolean useMonth)
Deprecated. 
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

handleGetLimit

protected int handleGetLimit(int field,
                             int limitType)
Deprecated. 
Calculate the limit for a specified type of limit and field

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

ceToJD

public static int ceToJD(long year,
                         int month,
                         int day,
                         int jdEpochOffset)
Deprecated. 
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)
Deprecated. 
Convert a Julian day to an Coptic/Ethiopic year, month and day



Copyright (c) 2009 IBM Corporation and others.