Enum Class DateInputAdapter

java.lang.Object
java.lang.Enum<DateInputAdapter>
com.atlassian.jira.datetime.DateInputAdapter
All Implemented Interfaces:
Serializable, Comparable<DateInputAdapter>, Constable

public enum DateInputAdapter extends Enum<DateInputAdapter>
  • Enum Constant Details

  • Method Details

    • values

      public static DateInputAdapter[] 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 DateInputAdapter 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
    • adapt

      public String adapt(String date, Locale locale)
      Transforms date input to cover formats not supported in Java.

      Some rules for formatting dates have changed across Java versions. Certain input values which were working in JIRA before, don't work anymore. We could tell customers to HDFU but let's be friendly and nice instead.

      For example, this will change "1/Mrz/2017" to "1/Mär/2017". Only the latter is supported since Java 8, but some people got used to using the former.