Class EthiopicChronology
- All Implemented Interfaces:
Serializable
Year 1 in the Ethiopic calendar began on August 29, 8 CE (Julian), thus Ethiopic years do not begin at the same time as Julian years. This chronology is not proleptic, as it does not allow dates before the first Ethiopic year.
This implementation defines a day as midnight to midnight exactly as per the ISO chronology. Some references indicate that a coptic day starts at sunset on the previous ISO day, but this has not been confirmed and is not implemented.
EthiopicChronology is thread-safe and immutable.
- Since:
- 1.2
- Author:
- Brian S O'Neill, Stephen Colebourne
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.joda.time.chrono.AssembledChronology
AssembledChronology.Fields -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intConstant value for 'Ethiopean Era', equivalent to the value returned for AD/CE. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidassemble(AssembledChronology.Fields fields) Invoked by the constructor and after deserialization to allow subclasses to define all of its supported fields.booleanChecks if this chronology instance equals another.longgetDateTimeMillis(int year, int monthOfYear, int dayOfMonth, int millisOfDay) Returns a datetime millisecond instant, formed from the given year, month, day, and millisecond values.longgetDateTimeMillis(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond) Returns a datetime millisecond instant, formed from the given year, month, day, hour, minute, second, and millisecond values.static EthiopicChronologyGets an instance of the EthiopicChronology in the default time zone.static EthiopicChronologygetInstance(DateTimeZone zone) Gets an instance of the EthiopicChronology in the given time zone.static EthiopicChronologygetInstance(DateTimeZone zone, int minDaysInFirstWeek) Gets an instance of the EthiopicChronology in the given time zone.static EthiopicChronologyGets an instance of the EthiopicChronology.intgetZone()Returns the DateTimeZone that this Chronology operates in, or null if unspecified.inthashCode()A suitable hash code for the chronology.toString()Gets a debugging toString.withUTC()Gets the Chronology in the UTC time zone.withZone(DateTimeZone zone) Gets the Chronology in a specific time zone.Methods inherited from class org.joda.time.chrono.AssembledChronology
centuries, centuryOfEra, clockhourOfDay, clockhourOfHalfday, dayOfMonth, dayOfWeek, dayOfYear, days, era, eras, getBase, getDateTimeMillis, getParam, halfdayOfDay, halfdays, hourOfDay, hourOfHalfday, hours, millis, millisOfDay, millisOfSecond, minuteOfDay, minuteOfHour, minutes, monthOfYear, months, secondOfDay, secondOfMinute, seconds, weekOfWeekyear, weeks, weekyear, weekyearOfCentury, weekyears, year, yearOfCentury, yearOfEra, years
-
Field Details
-
EE
public static final int EEConstant value for 'Ethiopean Era', equivalent to the value returned for AD/CE.- See Also:
-
-
Method Details
-
getInstanceUTC
Gets an instance of the EthiopicChronology. The time zone of the returned instance is UTC.- Returns:
- a singleton UTC instance of the chronology
-
getInstance
Gets an instance of the EthiopicChronology in the default time zone.- Returns:
- a chronology in the default time zone
-
getInstance
Gets an instance of the EthiopicChronology in the given time zone.- Parameters:
zone- the time zone to get the chronology in, null is default- Returns:
- a chronology in the specified time zone
-
getInstance
Gets an instance of the EthiopicChronology in the given time zone.- Parameters:
zone- the time zone to get the chronology in, null is defaultminDaysInFirstWeek- minimum number of days in first week of the year; default is 4- Returns:
- a chronology in the specified time zone
-
withUTC
Gets the Chronology in the UTC time zone.- Specified by:
withUTCin classBaseChronology- Returns:
- the chronology in UTC
-
withZone
Gets the Chronology in a specific time zone.- Specified by:
withZonein classBaseChronology- Parameters:
zone- the zone to get the chronology in, null is default- Returns:
- the chronology
- See Also:
-
assemble
Description copied from class:AssembledChronologyInvoked by the constructor and after deserialization to allow subclasses to define all of its supported fields. All unset fields default to unsupported instances.- Parameters:
fields- container of fields
-
getZone
Description copied from class:BaseChronologyReturns the DateTimeZone that this Chronology operates in, or null if unspecified.- Overrides:
getZonein classAssembledChronology- Returns:
- DateTimeZone null if unspecified
-
getDateTimeMillis
public long getDateTimeMillis(int year, int monthOfYear, int dayOfMonth, int millisOfDay) throws IllegalArgumentException Description copied from class:BaseChronologyReturns a datetime millisecond instant, formed from the given year, month, day, and millisecond values. The set of given values must refer to a valid datetime, or else an IllegalArgumentException is thrown.The default implementation calls upon separate DateTimeFields to determine the result. Subclasses are encouraged to provide a more efficient implementation.
- Overrides:
getDateTimeMillisin classAssembledChronology- Parameters:
year- year to usemonthOfYear- month to usedayOfMonth- day of month to usemillisOfDay- millisecond to use- Returns:
- millisecond instant from 1970-01-01T00:00:00Z
- Throws:
IllegalArgumentException- if the values are invalid
-
getDateTimeMillis
public long getDateTimeMillis(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond) throws IllegalArgumentException Description copied from class:BaseChronologyReturns a datetime millisecond instant, formed from the given year, month, day, hour, minute, second, and millisecond values. The set of given values must refer to a valid datetime, or else an IllegalArgumentException is thrown.The default implementation calls upon separate DateTimeFields to determine the result. Subclasses are encouraged to provide a more efficient implementation.
- Overrides:
getDateTimeMillisin classAssembledChronology- Parameters:
year- year to usemonthOfYear- month to usedayOfMonth- day of month to usehourOfDay- hour to useminuteOfHour- minute to usesecondOfMinute- second to usemillisOfSecond- millisecond to use- Returns:
- millisecond instant from 1970-01-01T00:00:00Z
- Throws:
IllegalArgumentException- if the values are invalid
-
getMinimumDaysInFirstWeek
public int getMinimumDaysInFirstWeek() -
equals
Checks if this chronology instance equals another. -
hashCode
public int hashCode()A suitable hash code for the chronology. -
toString
Gets a debugging toString.- Specified by:
toStringin classBaseChronology- Returns:
- a debugging string
-