Object/Trait

java.time.chrono

Chronology

Related Docs: trait Chronology | package chrono

Permalink

object Chronology

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Chronology
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. def from(temporal: TemporalAccessor): Chronology

    Permalink

    Obtains an instance of Chronology from a temporal object.

    Obtains an instance of Chronology from a temporal object.

    A TemporalAccessor represents some form of date and time information. This factory converts the arbitrary temporal object to an instance of Chronology. If the specified temporal object does not have a chronology, IsoChronology is returned.

    The conversion will obtain the chronology using TemporalQueries#chronology().

    This method matches the signature of the functional interface TemporalQuery allowing it to be used in queries via method reference, Chrono::from.

    temporal

    the temporal to convert, not null

    returns

    the chronology, not null

    Exceptions thrown

    DateTimeException if unable to convert to an { @code Chronology}

  10. def getAvailableChronologies: Set[Chronology]

    Permalink

    Returns the available chronologies.

    Returns the available chronologies.

    Each returned Chronology is available for use in the system.

    returns

    the independent, modifiable set of the available chronology IDs, not null

  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. def of(id: String): Chronology

    Permalink

    Obtains an instance of Chronology from a chronology ID or calendar system type.

    Obtains an instance of Chronology from a chronology ID or calendar system type.

    This returns a chronology based on either the ID or the type. The chronology ID uniquely identifies the chronology. The calendar system type is defined by the LDML specification.

    The chronology may be a system chronology or a chronology provided by the application via ServiceLoader configuration.

    Since some calendars can be customized, the ID or type typically refers to the default customization. For example, the Gregorian calendar can have multiple cutover dates from the Julian, but the lookup only provides the default cutover date.

    id

    the chronology ID or calendar system type, not null

    returns

    the chronology with the identifier requested, not null

    Exceptions thrown

    DateTimeException if the chronology cannot be found

  18. def ofLocale(locale: Locale): Chronology

    Permalink

    Obtains an instance of Chronology from a locale.

    Obtains an instance of Chronology from a locale.

    This returns a Chronology based on the specified locale, typically returning IsoChronology. Other calendar systems are only returned if they are explicitly selected within the locale.

    The Locale class provide access to a range of information useful for localizing an application. This includes the language and region, such as "en-GB" for English as used in Great Britain.

    The Locale class also supports an extension mechanism that can be used to identify a calendar system. The mechanism is a form of key-value pairs, where the calendar system has the key "ca". For example, the locale "en-JP-u-ca-japanese" represents the English language as used in Japan with the Japanese calendar system.

    This method finds the desired calendar system by in a manner equivalent to passing "ca" to Locale#getUnicodeLocaleType(String). If the "ca" key is not present, then IsoChronology is returned.

    Note that the behavior of this method differs from the older java.util.Calendar#getInstance(Locale) method. If that method receives a locale of "th_TH" it will return BuddhistCalendar. By contrast, this method will return IsoChronology. Passing the locale "th-TH-u-ca-buddhist" into either method will result in the Thai Buddhist calendar system and is therefore the recommended approach going forward for Thai calendar system localization.

    A similar, but simpler, situation occurs for the Japanese calendar system. The locale "jp_JP_JP" has previously been used to access the calendar. However, unlike the Thai locale, "ja_JP_JP" is automatically converted by Locale to the modern and recommended form of "ja-JP-u-ca-japanese". Thus, there is no difference in behavior between this method and Calendar#getInstance(Locale).

    locale

    the locale to use to obtain the calendar system, not null

    returns

    the calendar system associated with the locale, not null

    Exceptions thrown

    DateTimeException if the locale-specified calendar cannot be found

  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  20. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped