Top Description Fields Constructors Methods
com.ibm.icu.util

pack-priv abstract Class CECalendar

extends Calendar
Class Inheritance
Known Direct Subclasses
com.ibm.icu.util.CopticCalendar, com.ibm.icu.util.EthiopicCalendar
Imports
java.util.Date, .Locale, com.ibm.icu.util.ULocale.Category

Base class for EthiopicCalendar and CopticCalendar.

Field Summary

Modifier and TypeField and Description
private static final int[][]
private static final long
Inherited from com.ibm.icu.util.Calendar:
AMAM_PMAPRILAUGUSTBASE_FIELD_COUNTDATEDATE_PRECEDENCEDAY_OF_MONTHDAY_OF_WEEKDAY_OF_WEEK_IN_MONTHDAY_OF_YEARDECEMBERDOW_LOCALDOW_PRECEDENCEDST_OFFSETEPOCH_JULIAN_DAYERAEXTENDED_YEARFEBRUARYFRIDAYGREATEST_MINIMUMHOURHOUR_OF_DAYINTERNALLY_SETIS_LEAP_MONTHJAN_1_1_JULIAN_DAYJANUARYJULIAN_DAYJULYJUNELEAST_MAXIMUMMARCHMAX_DATEMAX_FIELD_COUNTMAX_JULIANMAX_MILLISMAXIMUMMAYMILLISECONDMILLISECONDS_IN_DAYMIN_DATEMIN_JULIANMIN_MILLISMINIMUMMINIMUM_USER_STAMPMINUTEMONDAYMONTHMONTH_PRECEDENCENOVEMBEROCTOBERONE_DAYONE_HOURONE_MINUTEONE_SECONDONE_WEEKORDINAL_MONTHPMRESOLVE_REMAPSATURDAYSECONDSEPTEMBERSUNDAYTHURSDAYTUESDAYUNDECIMBERUNSETWALLTIME_FIRSTWALLTIME_LASTWALLTIME_NEXT_VALIDWEDNESDAYWEEK_OF_MONTHWEEK_OF_YEARWEEKDAYWEEKENDWEEKEND_CEASEWEEKEND_ONSETYEARYEAR_WOYZONE_OFFSET

Constructor Summary

AccessConstructor and Description
protected
CECalendar()

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

protected
CECalendar(TimeZone
The time zone for the new calendar.
zone
)

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

protected
CECalendar(Locale
The locale for the new calendar.
aLocale
)

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

protected
CECalendar(ULocale
The locale for the new calendar.
locale
)

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

protected
CECalendar(TimeZone
The time zone for the new calendar.
zone
,
Locale
The locale for the new calendar.
aLocale
)

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

protected
CECalendar(TimeZone
The time zone for the new calendar.
zone
,
ULocale
The locale for the new calendar.
locale
)

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

protected
CECalendar(int
The value used to set the calendar's YEAR time field.
year
,
int
The value used to set the calendar's MONTH time field. The value is 0-based. e.g., 0 for Tishri.
month
,
int
The value used to set the calendar's DATE time field.
date
)

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

protected
CECalendar(Date
The date to which the new calendar is set.
date
)

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

protected
CECalendar(int
The value used to set the calendar's YEAR time field.
year
,
int
The value used to set the calendar's MONTH time field. The value is 0-based. e.g., 0 for Tishri.
month
,
int
The value used to set the calendar's DATE time field.
date
,
int
The value used to set the calendar's HOUR_OF_DAY time field.
hour
,
int
The value used to set the calendar's MINUTE time field.
minute
,
int
The value used to set the calendar's SECOND time field.
second
)

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

Method Summary

Modifier and TypeMethod and Description
public static int

Returns:

Julian day
ceToJD
(long
the extended year
year
,
int
the month
month
,
int
the day
day
,
int jdEpochOffset)

Convert an Coptic/Ethiopic year, month and day to a Julian day

protected abstract int
getJDEpochOffset()

The Coptic and Ethiopic calendars differ only in their epochs.

public String

Returns:

One of 13 possible strings in {"M01".. "M12", "M13"}.
getTemporalMonthCode
()

Overrides com.ibm.icu.util.Calendar.getTemporalMonthCode.

Gets The Temporal monthCode value corresponding to the month for the date.
protected int
handleComputeMonthStart(int
the extended year
eyear
,
int
the zero-based month, or 0 if useMonth is false
emonth
,
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
useMonth
)

Implements abstract com.ibm.icu.util.Calendar.handleComputeMonthStart.

Return JD of start of given month/extended year
protected int
handleGetLimit(int
one of the above field numbers
field
,
int
one of MINIMUM, GREATEST_MINIMUM, LEAST_MAXIMUM, or MAXIMUM
limitType
)

Implements abstract com.ibm.icu.util.Calendar.handleGetLimit.

Calculate the limit for a specified type of limit and field
protected int
handleGetMonthLength(int extendedYear, int month)

Overrides com.ibm.icu.util.Calendar.handleGetMonthLength.

Return the number of days in the given month of the given extended year of this calendar system.
public static void
jdToCE(int julianDay, int jdEpochOffset, int[] fields)

Convert a Julian day to an Coptic/Ethiopic year, month and day

public void
setTemporalMonthCode(String
One of 13 possible strings in {"M01".. "M12", "M13"}.
temporalMonth
)

Overrides com.ibm.icu.util.Calendar.setTemporalMonthCode.

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.
Inherited from com.ibm.icu.util.Calendar:
addafterbeforeclearclearclonecompareTocompletecomputeFieldscomputeGregorianFieldscomputeGregorianMonthStartcomputeJulianDaycomputeMillisInDaycomputeMillisInDayLongcomputeTimecomputeZoneOffsetcomputeZoneOffsetequalsfieldDifferencefieldNamefloorDividefloorDividefloorDividefloorDividegetgetActualMaximumgetActualMinimumgetAvailableLocalesgetAvailableULocalesgetDateAtTimePatterngetDateTimeFormatgetDateTimeFormatgetDateTimePatterngetDayOfWeekTypegetDefaultDayInMonthgetDefaultMonthInYeargetDisplayNamegetDisplayNamegetFieldCountgetFieldResolutionTablegetFirstDayOfWeekgetGreatestMinimumgetGregorianDayOfMonthgetGregorianDayOfYeargetGregorianMonthgetGregorianYeargetInstancegetInstancegetInstancegetInstancegetInstancegetInstancegetKeywordValuesForLocalegetLeastMaximumgetLimitgetLocalegetMaximumgetMinimalDaysInFirstWeekgetMinimumgetRelatedYeargetRepeatedWallTimeOptiongetSkippedWallTimeOptiongetStampgetTimegetTimeInMillisgetTimeZonegetTypegetWeekDatagetWeekDataForRegiongetWeekendTransitiongregorianMonthLengthgregorianPreviousMonthLengthhandleComputeFieldshandleComputeJulianDayhandleCreateFieldshandleGetDateFormathandleGetDateFormathandleGetDateFormathandleGetDateFormathandleGetExtendedYearhandleGetYearLengthhashCodehaveDefaultCenturyinTemporalLeapYearinternalGetinternalGetinternalGetMonthinternalGetMonthinternalGetTimeInMillisinternalSetisEquivalentToisGregorianLeapYearisLenientisSetisWeekendisWeekendjulianDayToDayOfWeekjulianDayToMillismillisToJulianDaynewerFieldnewestStamppinFieldprepareGetActualresolveFieldsrollrollsetsetsetsetsetFirstDayOfWeeksetLenientsetLocalesetMinimalDaysInFirstWeeksetRelatedYearsetRepeatedWallTimeOptionsetSkippedWallTimeOptionsetTimesetTimeInMillissetTimeZonesetWeekDatatoStringvalidateFieldvalidateFieldvalidateFieldsweekNumberweekNumber

Field Detail

LIMITSback to summary
private static final int[][] LIMITS

Hides com.ibm.icu.util.Calendar.LIMITS.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides com.ibm.icu.util.Calendar.serialVersionUID.

Constructor Detail

CECalendarback to summary
protected CECalendar()

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

CECalendarback to summary
protected CECalendar(TimeZone zone)

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

Parameters
zone:TimeZone

The time zone for the new calendar.

CECalendarback to summary
protected CECalendar(Locale aLocale)

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

Parameters
aLocale:Locale

The locale for the new calendar.

CECalendarback to summary
protected CECalendar(ULocale locale)

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

Parameters
locale:ULocale

The locale for the new calendar.

CECalendarback to summary
protected CECalendar(TimeZone zone, Locale aLocale)

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

CECalendarback to summary
protected CECalendar(TimeZone zone, ULocale locale)

Constructs a CECalendar 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 locale for the new calendar.

CECalendarback to summary
protected CECalendar(int year, int month, int date)

Constructs a CECalendar with the given date set in the default time zone with the default FORMAT 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 Tishri.

date:int

The value used to set the calendar's DATE time field.

CECalendarback to summary
protected CECalendar(Date date)

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

Parameters
date:Date

The date to which the new calendar is set.

CECalendarback to summary
protected CECalendar(int year, int month, int date, int hour, int minute, int second)

Constructs a CECalendar with the given date and time set for the default time zone with the default FORMAT 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 Tishri.

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.

Method Detail

ceToJDback to summary
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:long

the extended year

month:int

the month

day:int

the day

Returns:int

Julian day

getJDEpochOffsetback to summary
protected abstract int getJDEpochOffset()

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.

getTemporalMonthCodeback to summary
public String getTemporalMonthCode()

Overrides com.ibm.icu.util.Calendar.getTemporalMonthCode.

Gets The Temporal monthCode value corresponding to the month for the date. The value is a string identifier that starts with the literal grapheme "M" followed by two graphemes representing the zero-padded month number of the current month in a normal (non-leap) year. For the short thirteen month in each year in the CECalendar, the value is "M13".

Returns:String

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

ICU Status
Draft since ICU 74.
handleComputeMonthStartback to summary
protected int handleComputeMonthStart(int eyear, int emonth, boolean useMonth)

Implements abstract com.ibm.icu.util.Calendar.handleComputeMonthStart.

Return JD of start of given month/extended year

Parameters
eyear:int

Doc from com.ibm.icu.util.Calendar.handleComputeMonthStart.

the extended year

emonth:int

Doc from com.ibm.icu.util.Calendar.handleComputeMonthStart.

the zero-based month, or 0 if useMonth is false

useMonth:boolean

Doc from com.ibm.icu.util.Calendar.handleComputeMonthStart.

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:int

Doc from com.ibm.icu.util.Calendar.handleComputeMonthStart.

the Julian day number of the day before the first day of the given month and year

handleGetLimitback to summary
protected int handleGetLimit(int field, int limitType)

Implements abstract com.ibm.icu.util.Calendar.handleGetLimit.

Calculate the limit for a specified type of limit and field

Parameters
field:int

Doc from com.ibm.icu.util.Calendar.handleGetLimit.

one of the above field numbers

limitType:int

Doc from com.ibm.icu.util.Calendar.handleGetLimit.

one of MINIMUM, GREATEST_MINIMUM, LEAST_MAXIMUM, or MAXIMUM

handleGetMonthLengthback to summary
protected int handleGetMonthLength(int extendedYear, int month)

Overrides com.ibm.icu.util.Calendar.handleGetMonthLength.

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.

jdToCEback to summary
public static void jdToCE(int julianDay, int jdEpochOffset, int[] fields)

Convert a Julian day to an Coptic/Ethiopic year, month and day

setTemporalMonthCodeback to summary
public void setTemporalMonthCode(String temporalMonth)

Overrides com.ibm.icu.util.Calendar.setTemporalMonthCode.

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

ICU Status
Draft since ICU 74.