javax.time.i18n
Class CopticStandardChronology

java.lang.Object
  extended by javax.time.calendar.Chronology
      extended by javax.time.i18n.StandardChronology
          extended by javax.time.i18n.CopticStandardChronology
All Implemented Interfaces:
java.io.Serializable, Calendrical

public final class CopticStandardChronology
extends StandardChronology
implements java.io.Serializable

The Coptic calendar system.

This standard chronology defines the rules of the Coptic calendar system. The Coptic calendar has twelve months of 30 days followed by an additional period of 5 or 6 days, modeled as the thirteenth month in this implementation.

Years are measured in the 'Era of the Martyrs' - AM. 0001-01-01 (Coptic) equals 0284-08-29 (ISO). The supported range is from 1 to 99999999 (inclusive) in both eras.

This class is immutable and thread-safe.

Author:
Stephen Colebourne
See Also:
Serialized Form

Field Summary
static CopticStandardChronology INSTANCE
          The singleton instance of JulianChronology.
 
Method Summary
 ChronologyDate createDate(int prolepticYear, int monthOfYear, int dayOfMonth)
          Creates a date from the proleptic-year, month-of-year and day-of-month fields.
 ChronologyDate createDate(LocalDate date)
          Creates a date from the ISO equivalent local date.
 Era createEra(int eraValue)
          Creates the calendar system era object from the numeric value.
 int getDayOfYear(ChronologyDate date)
          Calculates the day-of-year from a date in this calendar system.
 java.lang.String getName()
          Gets the name of the chronology, 'Coptic'.
 boolean isLeapYear(ChronologyDate date)
          Checks if the specified date in this calendar system is in a leap year.
 
Methods inherited from class javax.time.i18n.StandardChronology
buildDate, createDate, dateRule, getDayOfMonthValueRange, getEra, getProlepticYear, getYearOfEra
 
Methods inherited from class javax.time.calendar.Chronology
get, rule, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INSTANCE

public static final CopticStandardChronology INSTANCE
The singleton instance of JulianChronology.

Method Detail

getName

public java.lang.String getName()
Gets the name of the chronology, 'Coptic'.

Specified by:
getName in class Chronology
Returns:
the name of the chronology, not null

createDate

public ChronologyDate createDate(LocalDate date)
Description copied from class: StandardChronology
Creates a date from the ISO equivalent local date.

Specified by:
createDate in class StandardChronology
Parameters:
date - ISO equivalent local date, not null
Returns:
the date in this calendar system, not null

createDate

public ChronologyDate createDate(int prolepticYear,
                                 int monthOfYear,
                                 int dayOfMonth)
Description copied from class: StandardChronology
Creates a date from the proleptic-year, month-of-year and day-of-month fields.

Specified by:
createDate in class StandardChronology
Parameters:
prolepticYear - the calendar system proleptic-year
monthOfYear - the calendar system month-of-year
dayOfMonth - the calendar system day-of-month
Returns:
the date in this calendar system, not null

getDayOfYear

public int getDayOfYear(ChronologyDate date)
Description copied from class: StandardChronology
Calculates the day-of-year from a date in this calendar system.

The day-of-year is a value representing the count of days within the year. The exact meaning is determined by the chronology according to the following constraints.

The day-of-year value must be positive. The number of days in a year may vary.

Specified by:
getDayOfYear in class StandardChronology
Parameters:
date - the date to check in this calendar system, not null
Returns:
the calendar system day-of-year

isLeapYear

public boolean isLeapYear(ChronologyDate date)
Description copied from class: StandardChronology
Checks if the specified date in this calendar system is in a leap year.

A leap-year is a year of a longer length than normal. The exact meaning is determined by the chronology according to the following constraints.

A leap-year must imply a year-length longer than a non leap-year.

Specified by:
isLeapYear in class StandardChronology
Parameters:
date - the date to check in this calendar system, not null
Returns:
true if the date is in a leap year

createEra

public Era createEra(int eraValue)
Description copied from class: StandardChronology
Creates the calendar system era object from the numeric value.

The era is, conceptually, the largest division of the time-line. Most calendar systems have a single epoch dividing the time-line into two eras. However, some have multiple eras, such as one for the reign of each leader. The exact meaning is determined by the chronology according to the following constraints.

The era in use at 1970-01-01 must have the value 1. Later eras must have sequentially higher values. Earlier eras must have sequentially lower values. Each chronology must refer to an enum or similar singleton to provide the era values.

This method returns the singleton era of the correct type for the specified era value.

Specified by:
createEra in class StandardChronology
Returns:
the calendar system era, not null