java.lang.Object | |
↳ | com.atlassian.jira.web.util.OutlookDate |
Formats and parses dates in a variety of formats, including relative dates such as "Today" and "Last Wednesday".
getDefault()
when displaying dates. Please review each method's JavaDoc to determine
whether you are affected by this change in behaviour.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
OutlookDate.SmartFormatterModes |
This enum is deprecated.
Use DateTimeFormatter instead. Since v5.0.
|
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
long | DAY | ||||||||||
long | HOUR | ||||||||||
long | MINUTE | ||||||||||
int | OTHER | ||||||||||
long | SECOND | ||||||||||
int | THIS_WEEK | ||||||||||
int | TODAY | ||||||||||
int | YESTERDAY |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This constructor is deprecated.
Use
OutlookDate(java.util.Locale, com.atlassian.jira.config.properties.ApplicationProperties, com.atlassian.jira.util.I18nHelper.BeanFactory, com.atlassian.jira.datetime.DateTimeFormatterFactory) or better still OutlookDateManager . Since v4.3
| |||||||||||
This constructor is deprecated.
Use
OutlookDate(java.util.Locale, com.atlassian.jira.config.properties.ApplicationProperties, com.atlassian.jira.util.I18nHelper.BeanFactory, com.atlassian.jira.datetime.DateTimeFormatterFactory) or better still OutlookDateManager . Since v4.3
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method is deprecated.
Use
daysBetween(org.joda.time.ReadablePartial, org.joda.time.ReadablePartial) instead. Since v4.4.
| |||||||||||
This method is deprecated.
Use
daysBetween(org.joda.time.ReadablePartial, org.joda.time.ReadablePartial) instead. Since v4.4.
| |||||||||||
This method is deprecated.
Use
format(java.util.Date) instead. Since
v4.4.
| |||||||||||
This method is deprecated.
Use
format(java.util.Date) instead. Since v4.4.
| |||||||||||
This method is deprecated.
Use
format(java.util.Date) instead. Since
v4.4.
| |||||||||||
This method is deprecated.
Use
format(java.util.Date) instead. Since
v5.0.
| |||||||||||
This method is deprecated.
Use
format(java.util.Date) instead. Since
v4.4.
| |||||||||||
This method is deprecated.
Use
format(java.util.Date) instead. Since
v4.4.
| |||||||||||
This method is deprecated.
Use
format(java.util.Date) instead. Since
v4.4.
| |||||||||||
Formats the given date into ISO8601 format.
| |||||||||||
Formats the given date into ISO8601 format.
| |||||||||||
This method is deprecated.
Use
format(java.util.Date) instead. Since v5.0.
| |||||||||||
This method is deprecated.
Use
format(java.util.Date) instead. Since v4.4.
| |||||||||||
This method is deprecated.
Use
format(java.util.Date) instead. Since
v5.0.
| |||||||||||
This method is deprecated.
Use
format(java.util.Date) instead. Since
v5.0.
| |||||||||||
This method is deprecated.
Use
getFormatHint() instead. Since v4.4.
| |||||||||||
This method is deprecated.
Use
getFormatHint() instead. Since v4.4.
| |||||||||||
This method is deprecated.
Use
getFormatHint() instead. Since v4.4.
| |||||||||||
This method is deprecated.
Use
format(java.util.Date) instead. Since
v4.4.
| |||||||||||
This method is deprecated.
Use
getFormatHint() instead. Since v4.4.
| |||||||||||
This method is deprecated.
Use
format(java.util.Date) instead. Since
v4.4.
| |||||||||||
This method is deprecated.
Use
Date() instead. Since v4.4.
| |||||||||||
This method is deprecated.
Use
parse(String) instead. Since v5.0.
| |||||||||||
This method is deprecated.
Use
parse(String) instead. Since v4.4.
| |||||||||||
This method is deprecated.
Use
parse(String) instead. Since v4.4.
| |||||||||||
This method is deprecated.
Use
parse(String) instead. Since v4.4.
| |||||||||||
This method is deprecated.
Use
parse(String) instead. Since v5.0.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
This constructor is deprecated.
Use OutlookDate(java.util.Locale, com.atlassian.jira.config.properties.ApplicationProperties, com.atlassian.jira.util.I18nHelper.BeanFactory, com.atlassian.jira.datetime.DateTimeFormatterFactory)
or better still OutlookDateManager
. Since v4.3
An old constructor which is left here only for backward compatibility.
This constructor is deprecated.
Use OutlookDate(java.util.Locale, com.atlassian.jira.config.properties.ApplicationProperties, com.atlassian.jira.util.I18nHelper.BeanFactory, com.atlassian.jira.datetime.DateTimeFormatterFactory)
or better still OutlookDateManager
. Since v4.3
An old constructor which is left here only for backward compatibility.
This method is deprecated.
Use daysBetween(org.joda.time.ReadablePartial, org.joda.time.ReadablePartial)
instead. Since v4.4.
This method is deprecated.
Use daysBetween(org.joda.time.ReadablePartial, org.joda.time.ReadablePartial)
instead. Since v4.4.
The method determines whether the date (theDate) lies between the reference date and the previous midnight
(TODAY
), between the reference date and the midnight before previous (YESTERDAY
), or between
the reference date and 7 midnights ago (THIS_WEEK
). If the passed in date does not fall in any of the
mentioned ranges, the method returns OTHER
.
theDate | the date we are asking about |
---|---|
theReferenceDate | the reference date (usually today's date) |
This method is deprecated.
Use format(java.util.Date)
instead. Since
v4.4.
Returns the given date formatted as a String in the current user's time zone if possible, in the format specified
by RELATIVE
.
date | the date to format |
---|
This method is deprecated.
Use format(java.util.Date)
instead. Since v4.4.
Returns the current date formatted as a String in the current user's time zone if possible, in the format specified
by RELATIVE
.
This method is deprecated.
Use format(java.util.Date)
instead. Since
v4.4.
Returns the given date formatted as a String in the current user's time zone if possible, in the format specified
by DATE
.
date | a Date |
---|
This method is deprecated.
Use format(java.util.Date)
instead. Since
v5.0.
Returns the given date formatted as a String in the current user's time zone if possible, in the format specified
by COMPLETE
.
date | a Date |
---|
This method is deprecated.
Use format(java.util.Date)
instead. Since
v4.4.
Returns the given date formatted as a String in the current user's time zone if possible, in the format specified
by DATE_PICKER
.
This method is deprecated.
Use format(java.util.Date)
instead. Since
v4.4.
Returns the given date formatted as a String in the current user's time zone if possible, in the format specified
by DATE_TIME_PICKER
.
Formats the given date into ISO8601 format. This format contains date and time information and it is used by data
marked with hCalendar microformat. If you need to use date information only use formatIso8601Date(java.util.Date)
method instead.
date | date to format |
---|
Formats the given date into ISO8601 format. This format contains date information only and it is used by data
marked with hCalendar microformat. If you need to use date and time information use formatIso8601(java.util.Date)
method instead.
date | date to format |
---|
This method is deprecated.
Use format(java.util.Date)
instead. Since v5.0.
Format a date for RSS feeds. Uses MailDateFormat to format the given date. Returns an empty string if null is passed in.
date | date to format |
---|
This method is deprecated.
Use format(java.util.Date)
instead. Since v4.4.
Formats a date using the correct RFC822 format as indicated in the RSS v2 specification and not using the MailDateFormat which is technically incorrect. MailDateFormat will however parse this format.
See http://cyber.law.harvard.edu/rss/rss.html
See http://asg.web.cmu.edu/rfc/rfc822.html#sec-5.1
Correct : Wed, 22 Aug 2007 10:00:10 +1000
Incorrect : Wed, 22 Aug 2007 10:00:10 +1000 (GMT+10:00)
date | the date to format into a string |
---|
This method is deprecated.
Use format(java.util.Date)
instead. Since
v5.0.
Format the date "smartly", by using the day of the week if the date falls within a week in either direction of the current date. If the date is in the past, we will use terminology such as "last Wednesday" to differentiate it from "Wednesday" (which is in the future).
date | the date to format |
---|---|
mode | whether or not to include the time in the printed date |
This method is deprecated.
Use format(java.util.Date)
instead. Since
v5.0.
Returns the given date formatted as a String in the current user's time zone if possible, in the format specified
by TIME
.
date | a Date |
---|
This method is deprecated.
Use getFormatHint()
instead. Since v4.4.
This helper is here to assist with formatting emails etc, and should only be used by JIRAVelocityManager.
DateFormat
based on the run-time value of JIRA_LF_DATE_COMPLETE
This method is deprecated.
Use parse(String)
instead. Since v4.4.
Parses the given text in COMPLETE
format, using the current user's time zone and
locale if possible. If there is no currently logged in user, or if the currently logged in user has not
configured a time zone and/or locale the JIRA default time zone and/or locale is used.
ParseException |
---|
This method is deprecated.
Use parse(String)
instead. Since v4.4.
Parses the given text in DATE_PICKER
or DATE_TIME_PICKER
format, using the current user's time zone and locale if possible. If there is no currently
logged in user, or if the currently logged in user has not configured a time zone and/or locale the JIRA default
time zone and/or locale is used.
ParseException |
---|
This method is deprecated.
Use parse(String)
instead. Since v4.4.
Parses the given text in DATE_TIME_PICKER
format, using the current user's
time zone and locale if possible. If there is no currently logged in user, or if the currently logged in user has
not configured a time zone and/or locale the JIRA default time zone and/or locale is used.
ParseException |
---|
This method is deprecated.
Use parse(String)
instead. Since v5.0.
Parse a date from RSS feeds. Uses MailDateFormat to parse the date.
rssDate | RSS date |
---|
ParseException | if string parsing fails |
---|