Top Description Fields Constructors Methods
org.threeten.extra.chrono

public final Enum DiscordianEra

extends Enum<DiscordianEra>
implements Era
Class Inheritance
All Implemented Interfaces
java.time.chrono.Era, java.time.temporal.TemporalAdjuster, java.time.temporal.TemporalAccessor
Imports
java.time.DateTimeException, java.time.chrono.Era

An era in the Discordian calendar system.

The Discordian calendar system has one era. The current era, for years from 1 onwards, is known as the 'Year of Our Lady of Discord'. No other eras are supported.

The start of the Discordian epoch 0001-01-01 (Discordian) is -1165-01-01 (ISO).

Do not use ordinal() to obtain the numeric representation of DiscordianEra. Use getValue() instead.

Implementation Requirements:

This is an immutable and thread-safe enum.

Field Summary

Modifier and TypeField and Description
public static final DiscordianEra
YOLD

The singleton instance for the current era, 'Year of Our Lady of Discord', which has the numeric value 1.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the era value, 1 for YOLD
getValue
()

Implements java.time.chrono.Era.getValue.

Gets the numeric era int value.

public static DiscordianEra

Returns:

the era singleton, not null
of
(int
the YOLD value to represent, which must be 1 (YOLD)
era
)

Obtains an instance of DiscordianEra from an int value.

public static DiscordianEra
public static DiscordianEra[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

YOLDback to summary
public static final DiscordianEra YOLD

The singleton instance for the current era, 'Year of Our Lady of Discord', which has the numeric value 1.

Constructor Detail

DiscordianEraback to summary
private DiscordianEra()

Method Detail

getValueback to summary
public int getValue()

Implements java.time.chrono.Era.getValue.

Gets the numeric era int value.

The era YOLD has the value 1.

Returns:int

the era value, 1 for YOLD

Annotations
@Override
ofback to summary
public static DiscordianEra of(int era)

Obtains an instance of DiscordianEra from an int value.

DiscordianEra is an enum representing the Discordian era of YOLD. This factory allows the enum to be obtained from the int value. Only the value 1 is ever accepted.

Parameters
era:int

the YOLD value to represent, which must be 1 (YOLD)

Returns:DiscordianEra

the era singleton, not null

Exceptions
DateTimeException:
if the value is invalid
valueOfback to summary
public static DiscordianEra valueOf(String name)
valuesback to summary
public static DiscordianEra[] values()