public final class CopticChronology extends BasicFixedMonthChronology
Year 1 in the Coptic calendar began on August 29, 284 CE (Julian), thus Coptic 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 Coptic 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.
CopticChronology is thread-safe and immutable.
JulianChronology,
Serialized FormAssembledChronology.Fields| Modifier and Type | Field and Description |
|---|---|
static int |
AM
Constant value for 'Anno Martyrum' or 'Era of the Martyrs', equivalent
to the value returned for AD/CE.
|
private static java.util.concurrent.ConcurrentHashMap<DateTimeZone,CopticChronology[]> |
cCache
Cache of zone to chronology arrays
|
private static DateTimeField |
ERA_FIELD
A singleton era field.
|
private static CopticChronology |
INSTANCE_UTC
Singleton instance of a UTC CopticChronology
|
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 |
|---|
CopticChronology(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 CopticChronology |
getInstance()
Gets an instance of the CopticChronology in the default time zone.
|
static CopticChronology |
getInstance(DateTimeZone zone)
Gets an instance of the CopticChronology in the given time zone.
|
static CopticChronology |
getInstance(DateTimeZone zone,
int minDaysInFirstWeek)
Gets an instance of the CopticChronology in the given time zone.
|
static CopticChronology |
getInstanceUTC()
Gets an instance of the CopticChronology.
|
(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, setYearequals, 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, toStringcenturies, 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, yearsprivate static final long serialVersionUID
public static final int AM
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,CopticChronology[]> cCache
private static final CopticChronology INSTANCE_UTC
CopticChronology(Chronology base, java.lang.Object param, int minDaysInFirstWeek)
public static CopticChronology getInstanceUTC()
public static CopticChronology getInstance()
public static CopticChronology getInstance(DateTimeZone zone)
zone - the time zone to get the chronology in, null is defaultpublic static CopticChronology 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 BaseChronologypublic Chronology withZone(DateTimeZone zone)
withZone in class BaseChronologyzone - the zone to get the chronology in, null is defaultZonedChronologyboolean isLeapDay(long instant)
BasicChronologyisLeapDay in class BasicChronologyinstant - the instant to testlong calculateFirstDayOfYearMillis(int year)
BasicChronologycalculateFirstDayOfYearMillis in class BasicChronologyint getMinYear()
BasicChronologygetMinYear in class BasicChronologyint getMaxYear()
BasicChronologygetMaxYear in class BasicChronologylong getApproxMillisAtEpochDividedByTwo()
BasicChronology
(yearAtEpoch * averageMillisPerYear + millisOfYearAtEpoch) / 2
where epoch is 1970-01-01 (Gregorian).getApproxMillisAtEpochDividedByTwo in class BasicChronologyprotected void assemble(AssembledChronology.Fields fields)
AssembledChronologyassemble in class BasicChronologyfields - container of fields