Package com.atlassian.jira.datetime
Enum Class DateTimeStyle
- All Implemented Interfaces:
Serializable
,Comparable<DateTimeStyle>
,Constable
The date styles that JIRA is capable of formatting to.
- Since:
- v4.4
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDisplay the date and time.Display the date (day, month, and year).Displays the date in date picker format.Displays the date and time in date picker format.The ISO8601 Date format.The ISO8601 Date Time format.This format returns solely the timezone offset from UTC.Display the date relative to now, using the same rules as RELATIVE_ALWAYS_WITH_TIME.Display the date and time relative to now (e.g.Display the date relative to now (e.g.Display the date relative to now (e.g.The RFC 1123 Date Time format.The RFC822 Date format.This format includes date,time and time zone informationDisplay the time only. -
Method Summary
Modifier and TypeMethodDescriptionstatic DateTimeStyle
Returns the enum constant of this class with the specified name.static DateTimeStyle[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TIME
Display the time only. -
DATE
Display the date (day, month, and year).You should use system time zone when you use this type of formatter.
-
COMPLETE
Display the date and time. -
RELATIVE
Display the date relative to now, using the same rules as RELATIVE_ALWAYS_WITH_TIME.- See Also:
-
DATE_TIME_PICKER
Displays the date and time in date picker format. -
DATE_PICKER
Displays the date in date picker format. -
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
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
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
The ISO8601 Date Time format. This format includes date and time information in UTC. -
ISO_8601_DATE
The ISO8601 Date format. This format includes the date only. -
RSS_RFC822_DATE_TIME
The RFC822 Date format.This format includes date,time and time zone information -
RFC_1123_DATE_TIME
The RFC 1123 Date Time format. This format includes date, time and time zone information. -
OFFSET
This format returns solely the timezone offset from UTC.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-