Module jonix.common

Enum Class DateFormats

java.lang.Object
java.lang.Enum<DateFormats>
com.tectonica.jonix.common.codelist.DateFormats
All Implemented Interfaces:
OnixCodelist, Serializable, Comparable<DateFormats>, Constable

public enum DateFormats extends Enum<DateFormats> implements OnixCodelist
Enum that corresponds to ONIX Codelist 55

Description: Date format

See Also:
  • Enum Constant Details

    • YYYYMMDD

      public static final DateFormats YYYYMMDD
      Common Era year, month and day (default for most dates)
    • YYYYMM

      public static final DateFormats YYYYMM
      Year and month
    • YYYYWW

      public static final DateFormats YYYYWW
      Year and week number
    • YYYYQ

      public static final DateFormats YYYYQ
      Year and quarter (Q = 1, 2, 3, 4, with 1 = Jan to Mar)
    • YYYYS

      public static final DateFormats YYYYS
      Year and season (S = 1, 2, 3, 4, with 1 = 'Spring')
    • YYYY

      public static final DateFormats YYYY
      Year (default for some dates)
    • YYYYMMDDYYYYMMDD

      public static final DateFormats YYYYMMDDYYYYMMDD
      Spread of exact dates
    • YYYYMMYYYYMM

      public static final DateFormats YYYYMMYYYYMM
      Spread of months
    • YYYYWWYYYYWW

      public static final DateFormats YYYYWWYYYYWW
      Spread of week numbers
    • YYYYQYYYYQ

      public static final DateFormats YYYYQYYYYQ
      Spread of quarters
    • YYYYSYYYYS

      public static final DateFormats YYYYSYYYYS
      Spread of seasons
    • YYYYYYYY

      public static final DateFormats YYYYYYYY
      Spread of years
    • Text_string

      public static final DateFormats Text_string
      For complex, approximate or uncertain dates, or dates BCE. Suggested maximum length 100 characters
    • YYYYMMDDThhmm

      public static final DateFormats YYYYMMDDThhmm
      Exact time. Use ONLY when exact times with hour/minute precision are relevant. By default, time is local. Alternatively, the time may be suffixed with an optional 'Z' for UTC times, or with '+' or '-' and an hhmm timezone offset from UTC. Times without a timezone are 'rolling' local times, times qualified with a timezone (using Z, + or -) specify a particular instant in time
    • YYYYMMDDThhmmss

      public static final DateFormats YYYYMMDDThhmmss
      Exact time. Use ONLY when exact times with second precision are relevant. By default, time is local. Alternatively, the time may be suffixed with an optional 'Z' for UTC times, or with '+' or '-' and an hhmm timezone offset from UTC. Times without a timezone are 'rolling' local times, times qualified with a timezone (using Z, + or -) specify a particular instant in time
    • YYYYMMDD_H

      public static final DateFormats YYYYMMDD_H
      Year month day (Hijri calendar)
    • YYYYMM_H

      public static final DateFormats YYYYMM_H
      Year and month (Hijri calendar)
    • YYYY_H

      public static final DateFormats YYYY_H
      Year (Hijri calendar)
    • Text_string_H

      public static final DateFormats Text_string_H
      For complex, approximate or uncertain dates (Hijri calendar), text would usually be in Arabic script. Suggested maximum length 100 characters
  • Field Details

    • code

      public final String code
    • description

      public final String description
  • Method Details

    • values

      public static DateFormats[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DateFormats valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getCode

      public String getCode()
      Specified by:
      getCode in interface OnixCodelist
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface OnixCodelist
    • byCode

      public static DateFormats byCode(String code)
    • byCodeOptional

      public static Optional<DateFormats> byCodeOptional(String code)
    • codeToDesciption

      public static String codeToDesciption(String code)