public final class CopticChronology extends java.time.chrono.AbstractChronology implements Serializable
This chronology defines the rules of the Coptic calendar system.
This calendar system is primarily used in Christian Egypt.
Dates are aligned such that 0001-01-01 (Coptic) is 0284-08-29 (ISO).
The fields are defined as follows:
| Modifier and Type | Field and Description |
|---|---|
static CopticChronology |
INSTANCE
Singleton instance for the Coptic chronology.
|
| Constructor and Description |
|---|
CopticChronology()
Private constructor, that is public to satisfy the
ServiceLoader. |
| Modifier and Type | Method and Description |
|---|---|
CopticDate |
date(java.time.chrono.Era era,
int yearOfEra,
int month,
int dayOfMonth)
Obtains a local date in Coptic calendar system from the
era, year-of-era, month-of-year and day-of-month fields.
|
CopticDate |
date(int prolepticYear,
int month,
int dayOfMonth)
Obtains a local date in Coptic calendar system from the
proleptic-year, month-of-year and day-of-month fields.
|
CopticDate |
date(java.time.temporal.TemporalAccessor temporal) |
CopticDate |
dateEpochDay(long epochDay)
Obtains a local date in the Coptic calendar system from the epoch-day.
|
CopticDate |
dateNow() |
CopticDate |
dateNow(java.time.Clock clock) |
CopticDate |
dateNow(java.time.ZoneId zone) |
CopticDate |
dateYearDay(java.time.chrono.Era era,
int yearOfEra,
int dayOfYear)
Obtains a local date in Coptic calendar system from the
era, year-of-era and day-of-year fields.
|
CopticDate |
dateYearDay(int prolepticYear,
int dayOfYear)
Obtains a local date in Coptic calendar system from the
proleptic-year and day-of-year fields.
|
CopticEra |
eraOf(int eraValue) |
List<java.time.chrono.Era> |
eras() |
String |
getCalendarType()
Gets the calendar type of the underlying calendar system - 'coptic'.
|
String |
getId()
Gets the ID of the chronology - 'Coptic'.
|
boolean |
isLeapYear(long prolepticYear)
Checks if the specified year is a leap year.
|
java.time.chrono.ChronoLocalDateTime<CopticDate> |
localDateTime(java.time.temporal.TemporalAccessor temporal) |
int |
prolepticYear(java.time.chrono.Era era,
int yearOfEra) |
java.time.temporal.ValueRange |
range(java.time.temporal.ChronoField field) |
CopticDate |
resolveDate(Map<java.time.temporal.TemporalField,Long> fieldValues,
java.time.format.ResolverStyle resolverStyle) |
java.time.chrono.ChronoZonedDateTime<CopticDate> |
zonedDateTime(java.time.Instant instant,
java.time.ZoneId zone) |
java.time.chrono.ChronoZonedDateTime<CopticDate> |
zonedDateTime(java.time.temporal.TemporalAccessor temporal) |
compareTo, equals, hashCode, toStringpublic static final CopticChronology INSTANCE
public CopticChronology()
ServiceLoader.
Use the singleton INSTANCE instead.public String getId()
The ID uniquely identifies the Chronology.
It can be used to lookup the Chronology using AbstractChronology.of(String).
getId in interface java.time.chrono.ChronologygetCalendarType()public String getCalendarType()
The calendar type is an identifier defined by the
Unicode Locale Data Markup Language (LDML) specification.
It can be used to lookup the Chronology using AbstractChronology.of(String).
It can also be used as part of a locale, accessible via
Locale.getUnicodeLocaleType(String) with the key 'ca'.
getCalendarType in interface java.time.chrono.ChronologygetId()public CopticDate date(java.time.chrono.Era era, int yearOfEra, int month, int dayOfMonth)
date in interface java.time.chrono.Chronologyera - the Coptic era, not nullyearOfEra - the year-of-eramonth - the month-of-yeardayOfMonth - the day-of-monthjava.time.DateTimeException - if unable to create the dateClassCastException - if the era is not a CopticErapublic CopticDate date(int prolepticYear, int month, int dayOfMonth)
date in interface java.time.chrono.ChronologyprolepticYear - the proleptic-yearmonth - the month-of-yeardayOfMonth - the day-of-monthjava.time.DateTimeException - if unable to create the datepublic CopticDate dateYearDay(java.time.chrono.Era era, int yearOfEra, int dayOfYear)
dateYearDay in interface java.time.chrono.Chronologyera - the Coptic era, not nullyearOfEra - the year-of-eradayOfYear - the day-of-yearjava.time.DateTimeException - if unable to create the dateClassCastException - if the era is not a CopticErapublic CopticDate dateYearDay(int prolepticYear, int dayOfYear)
dateYearDay in interface java.time.chrono.ChronologyprolepticYear - the proleptic-yeardayOfYear - the day-of-yearjava.time.DateTimeException - if unable to create the datepublic CopticDate dateEpochDay(long epochDay)
dateEpochDay in interface java.time.chrono.ChronologyepochDay - the epoch dayjava.time.DateTimeException - if unable to create the datepublic CopticDate dateNow()
dateNow in interface java.time.chrono.Chronologypublic CopticDate dateNow(java.time.ZoneId zone)
dateNow in interface java.time.chrono.Chronologypublic CopticDate dateNow(java.time.Clock clock)
dateNow in interface java.time.chrono.Chronologypublic CopticDate date(java.time.temporal.TemporalAccessor temporal)
date in interface java.time.chrono.Chronologypublic java.time.chrono.ChronoLocalDateTime<CopticDate> localDateTime(java.time.temporal.TemporalAccessor temporal)
localDateTime in interface java.time.chrono.Chronologypublic java.time.chrono.ChronoZonedDateTime<CopticDate> zonedDateTime(java.time.temporal.TemporalAccessor temporal)
zonedDateTime in interface java.time.chrono.Chronologypublic java.time.chrono.ChronoZonedDateTime<CopticDate> zonedDateTime(java.time.Instant instant, java.time.ZoneId zone)
zonedDateTime in interface java.time.chrono.Chronologypublic boolean isLeapYear(long prolepticYear)
A Coptic proleptic-year is leap if the remainder after division by four equals three. This method does not validate the year passed in, and only has a well-defined result for years in the supported range.
isLeapYear in interface java.time.chrono.ChronologyprolepticYear - the proleptic-year to check, not validated for rangepublic int prolepticYear(java.time.chrono.Era era,
int yearOfEra)
prolepticYear in interface java.time.chrono.Chronologypublic CopticEra eraOf(int eraValue)
eraOf in interface java.time.chrono.Chronologypublic List<java.time.chrono.Era> eras()
eras in interface java.time.chrono.Chronologypublic java.time.temporal.ValueRange range(java.time.temporal.ChronoField field)
range in interface java.time.chrono.Chronologypublic CopticDate resolveDate(Map<java.time.temporal.TemporalField,Long> fieldValues, java.time.format.ResolverStyle resolverStyle)
resolveDate in interface java.time.chrono.ChronologyresolveDate in class java.time.chrono.AbstractChronologyCopyright © 2010–2014 ThreeTen.org. All rights reserved.