This chronology defines the rules of the Symmetry010 calendar system.
Dates are aligned such that 0001/01/01 (Sym010) is 0001-01-01 (ISO).
The calendar implemented by this class is proleptic, with January 1st as the start of the year. Each month either has 30 days or 31 days, in an alternating pattern; January has 30 days, February has 31 days and March again has 30 days. Due to this, each quarter consists of 13 weeks.
Normal years thus have 364 days, whereas leap years have an extra week, aptly called leap week, added to the end, extending the year to 371 days. Thus, December in a leap year has 37 days.
The fields are defined as follows:
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final ValueRange | DAY_OF_MONTH_RANGE
Range of day of month. |
| pack-priv static final ValueRange | DAY_OF_YEAR_RANGE
Range of day of year. |
| public static final long | DAYS_0001_TO_1970
The number of days from year zero to CE 1970, still the era only allows CE 1 and higher. |
| pack-priv static final int | DAYS_IN_MONTH
Normal month is 30 days. |
| pack-priv static final int | DAYS_IN_MONTH_LONG
Long month is 31 days. |
| pack-priv static final int | DAYS_IN_QUARTER
Days in quarter, (30 + 31 + 30) = 91 |
| pack-priv static final int | DAYS_IN_WEEK
Standard 7 day weeks. |
| pack-priv static final int | DAYS_IN_YEAR
There are 4 quarters of 91 (30 + 31 + 30) days each, or 364 days in a (non-leap) year. |
| pack-priv static final int | DAYS_IN_YEAR_LONG
Leap years are 364 + 7 days. |
| pack-priv static final int | DAYS_PER_CYCLE
Number of days in a cycle. |
| pack-priv static final ValueRange | EMPTY_RANGE
Empty range: [0, 0]. |
| pack-priv static final ValueRange | EPOCH_DAY_RANGE
Epoch day range. |
| pack-priv static final ValueRange | ERA_RANGE
Range of eras. |
| public static final Symmetry010Chronology | INSTANCE
Singleton instance for the Symmetry010 chronology. |
| private static final long | MAX_YEAR
Highest year in the range. |
| pack-priv static final ValueRange | MONTH_OF_YEAR_RANGE
Range of month of year. |
| pack-priv static final int | MONTHS_IN_YEAR
Standard 12 month years. |
| private static final ValueRange | PROLEPTIC_MONTH_RANGE
Range of proleptic month. |
| private static final long | serialVersionUID
Serialization version UID. |
| pack-priv static final int | WEEKS_IN_MONTH
Normal month is 4 weeks. |
| pack-priv static final int | WEEKS_IN_MONTH_LONG
Long month is 5 weeks. |
| pack-priv static final int | WEEKS_IN_YEAR
52 weeks in a normal year. |
| pack-priv static final int | WEEKS_IN_YEAR_LONG
53 weeks in a leap year. |
| pack-priv static final ValueRange | YEAR_RANGE
Range of year. |
| private static final int | YEARS_IN_CYCLE
Number of years in a cycle. |
| Access | Constructor and Description |
|---|---|
| public | Symmetry010Chronology()
Deprecated
Use the singleton
INSTANCE instead.
Private constructor, that is public to satisfy the |
| Modifier and Type | Method and Description |
|---|---|
| public Symmetry010Date | Returns: the Symmetry010 local date, not nullthe Symmetry010 era, not null era, int the year-of-era yearOfEra, int the month-of-year month, int the day-of-month dayOfMonth)Overrides default java. Obtains a local date in Symmetry010 calendar system from the era, year-of-era, month-of-year and day-of-month fields. |
| public Symmetry010Date | Returns: the Symmetry010 local date, not nullthe proleptic-year prolepticYear, int the month-of-year month, int the day-of-month dayOfMonth)Implements java. Obtains a local date in Symmetry010 calendar system from the proleptic-year, month-of-year and day-of-month fields. |
| public Symmetry010Date | Returns: the Symmetry010 local date, not nullthe date-time object to convert, not null temporal)Implements java. Obtains a Symmetry010 local date from another date-time object. |
| public Symmetry010Date | Returns: the Symmetry010 local date, not nullthe epoch day epochDay)Implements java. Obtains a local date in the Symmetry010 calendar system from the epoch-day. |
| public Symmetry010Date | Returns: the current Symmetry010 local date using the system clock and default time-zone, not nullOverrides default java. Obtains the current Symmetry010 local date from the system clock in the default time-zone. |
| public Symmetry010Date | Returns: the current Symmetry010 local date using the system clock, not nullthe zone ID to use, not null zone)Overrides default java. Obtains the current Symmetry010 local date from the system clock in the specified time-zone. |
| public Symmetry010Date | Returns: the current Symmetry010 local date, not nullthe clock to use, not null clock)Overrides default java. Obtains the current Symmetry010 local date from the specified clock. |
| public Symmetry010Date | Returns: the Symmetry010 local date, not nullthe Symmetry010 era, not null era, int the year-of-era yearOfEra, int the day-of-year dayOfYear)Overrides default java. Obtains a local date in Symmetry010 calendar system from the era, year-of-era and day-of-year fields. |
| public Symmetry010Date | Returns: the Symmetry010 local date, not nullthe proleptic-year prolepticYear, int the day-of-year dayOfYear)Implements java. Obtains a local date in Symmetry010 calendar system from the proleptic-year and day-of-year fields. |
| public IsoEra | Returns: the calendar system era, not nullthe era value eraValue)Implements java. Creates the chronology era object from the numeric value. |
| public List | Returns: the list of eras for the chronology, may be immutable, not nullImplements java. Gets the list of eras for the chronology. |
| public String | Returns: the calendar system type, nullImplements java. Gets the calendar type of the underlying calendar system, which returns null. |
| public String | Returns: the chronology ID - 'Sym010'Implements java. Gets the ID of the chronology - 'Sym010'. |
| public static long | Returns: the number of leap years since CE 1the year prolepticYear)Get the count of leap years since CE 1. |
| public boolean | Returns: true if the year is a leap yearthe proleptic-year to check, not validated for range year)Implements java. Checks if the specified year is a leap year. |
| public ChronoLocalDateTime | Returns: the Symmetry010 local date-time, not nullthe date-time object to convert, not null temporal)Overrides default java. Obtains a Symmetry010 local date-time from another date-time object. |
| public int | prolepticYear(Era
the era of the correct type for the chronology, not null era, int the chronology year-of-era yearOfEra)Implements java. Calculates the proleptic-year given the era and year-of-era. |
| public ValueRange | range(ChronoField
the field to get the range for, not null field)Implements java. Gets the range of valid values for the specified field. |
| private Object | |
| public ChronoZonedDateTime | Returns: the Symmetry010 zoned date-time, not nullthe date-time object to convert, not null temporal)Overrides default java. Obtains a Symmetry010 zoned date-time from another date-time object. |
| public ChronoZonedDateTime | Returns: the Symmetry010 zoned date-time, not nullthe instant to create the date-time from, not null instant, ZoneId the time-zone, not null zone)Overrides default java. Obtains a Symmetry010 zoned date-time in this chronology from an |
| DAY_OF_MONTH_RANGE | back to summary |
|---|---|
| pack-priv static final ValueRange DAY_OF_MONTH_RANGE Range of day of month. | |
| DAY_OF_YEAR_RANGE | back to summary |
|---|---|
| pack-priv static final ValueRange DAY_OF_YEAR_RANGE Range of day of year. | |
| DAYS_0001_TO_1970 | back to summary |
|---|---|
| public static final long DAYS_0001_TO_1970 The number of days from year zero to CE 1970, still the era only allows CE 1 and higher. There are 6 full 293-year cycles from CE 1 to 1758, with 6 * 52 leap years, i.e. 312. There are 37 leap years from CE 1758 to 1970. | |
| DAYS_IN_MONTH | back to summary |
|---|---|
| pack-priv static final int DAYS_IN_MONTH Normal month is 30 days. | |
| DAYS_IN_MONTH_LONG | back to summary |
|---|---|
| pack-priv static final int DAYS_IN_MONTH_LONG Long month is 31 days. | |
| DAYS_IN_QUARTER | back to summary |
|---|---|
| pack-priv static final int DAYS_IN_QUARTER Days in quarter, (30 + 31 + 30) = 91 | |
| DAYS_IN_WEEK | back to summary |
|---|---|
| pack-priv static final int DAYS_IN_WEEK Standard 7 day weeks. | |
| DAYS_IN_YEAR | back to summary |
|---|---|
| pack-priv static final int DAYS_IN_YEAR There are 4 quarters of 91 (30 + 31 + 30) days each, or 364 days in a (non-leap) year. | |
| DAYS_IN_YEAR_LONG | back to summary |
|---|---|
| pack-priv static final int DAYS_IN_YEAR_LONG Leap years are 364 + 7 days. | |
| DAYS_PER_CYCLE | back to summary |
|---|---|
| pack-priv static final int DAYS_PER_CYCLE Number of days in a cycle. | |
| EMPTY_RANGE | back to summary |
|---|---|
| pack-priv static final ValueRange EMPTY_RANGE Empty range: [0, 0]. | |
| EPOCH_DAY_RANGE | back to summary |
|---|---|
| pack-priv static final ValueRange EPOCH_DAY_RANGE Epoch day range. | |
| ERA_RANGE | back to summary |
|---|---|
| pack-priv static final ValueRange ERA_RANGE Range of eras. | |
| INSTANCE | back to summary |
|---|---|
| public static final Symmetry010Chronology INSTANCE Singleton instance for the Symmetry010 chronology. | |
| MAX_YEAR | back to summary |
|---|---|
| private static final long MAX_YEAR Highest year in the range. | |
| MONTH_OF_YEAR_RANGE | back to summary |
|---|---|
| pack-priv static final ValueRange MONTH_OF_YEAR_RANGE Range of month of year. | |
| MONTHS_IN_YEAR | back to summary |
|---|---|
| pack-priv static final int MONTHS_IN_YEAR Standard 12 month years. | |
| PROLEPTIC_MONTH_RANGE | back to summary |
|---|---|
| private static final ValueRange PROLEPTIC_MONTH_RANGE Range of proleptic month. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Serialization version UID. | |
| WEEKS_IN_MONTH | back to summary |
|---|---|
| pack-priv static final int WEEKS_IN_MONTH Normal month is 4 weeks. | |
| WEEKS_IN_MONTH_LONG | back to summary |
|---|---|
| pack-priv static final int WEEKS_IN_MONTH_LONG Long month is 5 weeks. | |
| WEEKS_IN_YEAR | back to summary |
|---|---|
| pack-priv static final int WEEKS_IN_YEAR 52 weeks in a normal year. | |
| WEEKS_IN_YEAR_LONG | back to summary |
|---|---|
| pack-priv static final int WEEKS_IN_YEAR_LONG 53 weeks in a leap year. | |
| YEAR_RANGE | back to summary |
|---|---|
| pack-priv static final ValueRange YEAR_RANGE Range of year. | |
| YEARS_IN_CYCLE | back to summary |
|---|---|
| private static final int YEARS_IN_CYCLE Number of years in a cycle. | |
| Symmetry010Chronology | back to summary |
|---|---|
| public Symmetry010Chronology()
Deprecated Use the singleton Private constructor, that is public to satisfy the
| |
| date | back to summary |
|---|---|
| public Symmetry010Date date(Era era, int yearOfEra, int month, int dayOfMonth) Overrides default java. Obtains a local date in Symmetry010 calendar system from the era, year-of-era, month-of-year and day-of-month fields.
| |
| date | back to summary |
|---|---|
| public Symmetry010Date date(int prolepticYear, int month, int dayOfMonth) Implements java. Obtains a local date in Symmetry010 calendar system from the proleptic-year, month-of-year and day-of-month fields.
| |
| date | back to summary |
|---|---|
| public Symmetry010Date date(TemporalAccessor temporal) Implements java. Obtains a Symmetry010 local date from another date-time object.
| |
| dateEpochDay | back to summary |
|---|---|
| public Symmetry010Date dateEpochDay(long epochDay) Implements java. Obtains a local date in the Symmetry010 calendar system from the epoch-day.
| |
| dateNow | back to summary |
|---|---|
| public Symmetry010Date dateNow() Overrides default java. Obtains the current Symmetry010 local date from the system clock in the default time-zone.
This will query the Using this method will prevent the ability to use an alternate clock for testing because the clock is hard-coded.
| |
| dateNow | back to summary |
|---|---|
| public Symmetry010Date dateNow(ZoneId zone) Overrides default java. Obtains the current Symmetry010 local date from the system clock in the specified time-zone.
This will query the Using this method will prevent the ability to use an alternate clock for testing because the clock is hard-coded.
| |
| dateNow | back to summary |
|---|---|
| public Symmetry010Date dateNow(Clock clock) Overrides default java. Obtains the current Symmetry010 local date from the specified clock.
This will query the specified clock to obtain the current date - today.
Using this method allows the use of an alternate clock for testing.
The alternate clock may be introduced using
| |
| dateYearDay | back to summary |
|---|---|
| public Symmetry010Date dateYearDay(Era era, int yearOfEra, int dayOfYear) Overrides default java. Obtains a local date in Symmetry010 calendar system from the era, year-of-era and day-of-year fields.
| |
| dateYearDay | back to summary |
|---|---|
| public Symmetry010Date dateYearDay(int prolepticYear, int dayOfYear) Implements java. Obtains a local date in Symmetry010 calendar system from the proleptic-year and day-of-year fields.
| |
| eraOf | back to summary |
|---|---|
| public IsoEra eraOf(int eraValue) Implements java. Creates the chronology era object from the numeric value.
The list of eras is shared with
| |
| eras | back to summary |
|---|---|
| public List Implements java. Gets the list of eras for the chronology.
The list of eras is shared with | |
| getCalendarType | back to summary |
|---|---|
| public String getCalendarType() Implements java. Gets the calendar type of the underlying calendar system, which returns null. The Unicode Locale Data Markup Language (LDML) specification does not define an identifier for this calendar system, thus null is returned. | |
| getId | back to summary |
|---|---|
| public String getId() Implements java. Gets the ID of the chronology - 'Sym010'.
The ID uniquely identifies the
| |
| getLeapYearsBefore | back to summary |
|---|---|
| public static long getLeapYearsBefore(long prolepticYear) Get the count of leap years since CE 1.
| |
| isLeapYear | back to summary |
|---|---|
| public boolean isLeapYear(long year) Implements java. Checks if the specified year is a leap year. A leap-year is a year of a longer length than normal. Leap years in the calendar system match those of the ISO calendar system.
| |
| localDateTime | back to summary |
|---|---|
| public ChronoLocalDateTime Overrides default java. Obtains a Symmetry010 local date-time from another date-time object.
| |
| prolepticYear | back to summary |
|---|---|
| public int prolepticYear(Era era, int yearOfEra) Implements java. Doc from java. Calculates the proleptic-year given the era and year-of-era. This combines the era and year-of-era into the single proleptic-year field.
If the chronology makes active use of eras, such as | |
| range | back to summary |
|---|---|
| public ValueRange range(ChronoField field) Implements java. Doc from java. Gets the range of valid values for the specified field.
All fields can be expressed as a Note that the result only describes the minimum and maximum valid values and it is important not to read too much into them. For example, there could be values within the range that are invalid for the field. This method will return a result whether or not the chronology supports the field.
| |
| readResolve | back to summary |
|---|---|
| private Object readResolve() Resolve singleton.
| |
| zonedDateTime | back to summary |
|---|---|
| public ChronoZonedDateTime Overrides default java. Obtains a Symmetry010 zoned date-time from another date-time object.
| |
| zonedDateTime | back to summary |
|---|---|
| public ChronoZonedDateTime Overrides default java. Obtains a Symmetry010 zoned date-time in this chronology from an
| |