Enum Class DateTimeStyle

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

public enum DateTimeStyle extends Enum<DateTimeStyle>
The date styles that JIRA is capable of formatting to.
Since:
v4.4
  • Enum Constant Details

    • TIME

      public static final DateTimeStyle TIME
      Display the time only.
    • DATE

      public static final DateTimeStyle DATE
      Display the date (day, month, and year).

      You should use system time zone when you use this type of formatter.

    • COMPLETE

      public static final DateTimeStyle COMPLETE
      Display the date and time.
    • RELATIVE

      public static final DateTimeStyle RELATIVE
      Display the date relative to now, using the same rules as RELATIVE_ALWAYS_WITH_TIME.
      See Also:
    • DATE_TIME_PICKER

      public static final DateTimeStyle DATE_TIME_PICKER
      Displays the date and time in date picker format.
    • DATE_PICKER

      public static final DateTimeStyle DATE_PICKER
      Displays the date in date picker format.
    • RELATIVE_WITH_TIME_ONLY

      public static final DateTimeStyle RELATIVE_WITH_TIME_ONLY
      Display the date relative to now (e.g. using words such as "Just now", "1 minute ago", "Tomorrow", etc), adding the time of the day for relative dates.
      • Dates not older than 7 days and under 7 days in the future are considered relative dates
      • The time of the day is displayed only for relative dates
      • Today's times are relativized, e.g. "Just now", "1 minute ago", "In 1 hour"

      Note that dates will only be displayed in relative format if this feature is enabled in Jira.

      Examples:
      • Just now
      • In 1 minute
      • Yesterday 10:00
      • 2 days ago 10:00
      • 01/12/2017 (if older than 7 days)
      • 31/12/2017 (if more than 7 days in the future)
    • RELATIVE_ALWAYS_WITH_TIME

      public static final DateTimeStyle RELATIVE_ALWAYS_WITH_TIME
      Display the date and time relative to now (e.g. using words such as "Just now", "1 minute ago", "Tomorrow", etc).
      • Dates not older than 7 days and under 7 days in the future are considered relative dates
      • The time of the day is always displayed
      • Today's times are relativized, e.g. "Just now", "1 minute ago", "In 1 hour"

      Note that dates will only be displayed in relative format if this feature is enabled in Jira.

      Examples:
      • Just now
      • In 1 minute
      • Yesterday 10:00
      • 2 days ago 10:00
      • 01/12/2017 10:00(if older than 7 days)
      • 31/12/2017 10:00(if more than 7 days in the future)
    • RELATIVE_WITHOUT_TIME

      public static final DateTimeStyle RELATIVE_WITHOUT_TIME
      Display the date relative to now (e.g. using words such as "Just now", "1 minute ago", "Tomorrow", etc). The time of the day is never displayed.
      • Dates not older than 7 days and under 7 days in the future are considered relative dates
      • The time of the day is never displayed
      • Today's times are relativized, e.g. "Just now", "1 minute ago", "In 1 hour"

      Note that dates will only be displayed in relative format if this feature is enabled in Jira.

      Examples:
      • Just now
      • In 1 minute
      • Yesterday
      • 2 days ago
      • 01/12/2017 (if older than 7 days)
      • 31/12/2017 (if more than 7 days in the future)
    • ISO_8601_DATE_TIME

      public static final DateTimeStyle ISO_8601_DATE_TIME
      The ISO8601 Date Time format. This format includes date and time information in UTC.
    • ISO_8601_DATE

      public static final DateTimeStyle ISO_8601_DATE
      The ISO8601 Date format. This format includes the date only.
    • RSS_RFC822_DATE_TIME

      public static final DateTimeStyle RSS_RFC822_DATE_TIME
      The RFC822 Date format.This format includes date,time and time zone information
    • RFC_1123_DATE_TIME

      public static final DateTimeStyle RFC_1123_DATE_TIME
      The RFC 1123 Date Time format. This format includes date, time and time zone information.
    • OFFSET

      public static final DateTimeStyle OFFSET
      This format returns solely the timezone offset from UTC.
  • Method Details

    • values

      public static DateTimeStyle[] 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 DateTimeStyle 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