public final class EthiopicChronology extends BasicFixedMonthChronology
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.
AssembledChronology.Fields
Modifier and Type | Field and Description |
---|---|
private static java.util.concurrent.ConcurrentHashMap<DateTimeZone,EthiopicChronology[]> |
cCache
Cache of zone to chronology arrays
|
static int |
EE
Constant value for 'Ethiopean Era', equivalent
to the value returned for AD/CE.
|
private static DateTimeField |
ERA_FIELD
A singleton era field.
|
private static EthiopicChronology |
INSTANCE_UTC
Singleton instance of a UTC EthiopicChronology
|
private static int |
MAX_YEAR
The highest year that can be fully supported.
|
private static int |
MIN_YEAR
The lowest year that can be fully supported.
|
private static long |
serialVersionUID
Serialization lock
|
MILLIS_PER_MONTH, MILLIS_PER_YEAR, MONTH_LENGTH
Constructor and Description |
---|
EthiopicChronology(Chronology base,
java.lang.Object param,
int minDaysInFirstWeek)
Restricted constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
assemble(AssembledChronology.Fields fields)
Invoked by the constructor and after deserialization to allow subclasses
to define all of its supported fields.
|
(package private) long |
calculateFirstDayOfYearMillis(int year)
Gets the millisecond value of the first day of the year.
|
(package private) long |
getApproxMillisAtEpochDividedByTwo()
Returns a constant representing the approximate number of milliseconds
elapsed from year 0 of this chronology, divided by two.
|
static EthiopicChronology |
getInstance()
Gets an instance of the EthiopicChronology in the default time zone.
|
static EthiopicChronology |
getInstance(DateTimeZone zone)
Gets an instance of the EthiopicChronology in the given time zone.
|
static EthiopicChronology |
getInstance(DateTimeZone zone,
int minDaysInFirstWeek)
Gets an instance of the EthiopicChronology in the given time zone.
|
static EthiopicChronology |
getInstanceUTC()
Gets an instance of the EthiopicChronology.
|
(package private) int |
getMaxYear()
Gets the maximum supported year.
|
(package private) int |
getMinYear()
Gets the minimum supported year.
|
(package private) boolean |
isLeapDay(long instant)
Is the specified instant a leap day?
|
private java.lang.Object |
readResolve()
Serialization singleton.
|
Chronology |
withUTC()
Gets the Chronology in the UTC time zone.
|
Chronology |
withZone(DateTimeZone zone)
Gets the Chronology in a specific time zone.
|
getAverageMillisPerMonth, getAverageMillisPerYear, getAverageMillisPerYearDividedByTwo, getDayOfMonth, getDaysInMonthMax, getDaysInMonthMax, getDaysInYearMonth, getMaxMonth, getMonthOfYear, getMonthOfYear, getTotalMillisByYearMonth, getYearDifference, isLeapYear, setYear
equals, getDateMidnightMillis, getDateTimeMillis, getDateTimeMillis, getDayOfMonth, getDayOfMonth, getDayOfWeek, getDayOfYear, getDayOfYear, getDaysInMonthMax, getDaysInMonthMaxForSet, getDaysInYear, getDaysInYearMax, getFirstWeekOfYearMillis, getMaxMonth, getMillisOfDay, getMinimumDaysInFirstWeek, getWeekOfWeekyear, getWeekOfWeekyear, getWeeksInYear, getWeekyear, getYear, getYearMillis, getYearMonthDayMillis, getYearMonthMillis, getZone, hashCode, toString
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
private static final long serialVersionUID
public static final int EE
private static final DateTimeField ERA_FIELD
private static final int MIN_YEAR
private static final int MAX_YEAR
private static final java.util.concurrent.ConcurrentHashMap<DateTimeZone,EthiopicChronology[]> cCache
private static final EthiopicChronology INSTANCE_UTC
EthiopicChronology(Chronology base, java.lang.Object param, int minDaysInFirstWeek)
public static EthiopicChronology getInstanceUTC()
public static EthiopicChronology getInstance()
public static EthiopicChronology getInstance(DateTimeZone zone)
zone
- the time zone to get the chronology in, null is defaultpublic static EthiopicChronology getInstance(DateTimeZone zone, int minDaysInFirstWeek)
zone
- the time zone to get the chronology in, null is defaultminDaysInFirstWeek
- minimum number of days in first week of the year; default is 4private java.lang.Object readResolve()
public Chronology withUTC()
withUTC
in class BaseChronology
public Chronology withZone(DateTimeZone zone)
withZone
in class BaseChronology
zone
- the zone to get the chronology in, null is defaultZonedChronology
boolean isLeapDay(long instant)
BasicChronology
isLeapDay
in class BasicChronology
instant
- the instant to testlong calculateFirstDayOfYearMillis(int year)
BasicChronology
calculateFirstDayOfYearMillis
in class BasicChronology
int getMinYear()
BasicChronology
getMinYear
in class BasicChronology
int getMaxYear()
BasicChronology
getMaxYear
in class BasicChronology
long getApproxMillisAtEpochDividedByTwo()
BasicChronology
(yearAtEpoch * averageMillisPerYear + millisOfYearAtEpoch) / 2where epoch is 1970-01-01 (Gregorian).
getApproxMillisAtEpochDividedByTwo
in class BasicChronology
protected void assemble(AssembledChronology.Fields fields)
AssembledChronology
assemble
in class BasicChronology
fields
- container of fields