public class OutlookDate extends Object
DateTimeFormatterFactory
Modifier and Type | Class and Description |
---|---|
static class |
OutlookDate.SmartFormatterModes
Deprecated.
Use
DateTimeFormatter instead. Since v5.0. |
Modifier and Type | Field and Description |
---|---|
static long |
DAY |
static long |
HOUR |
static long |
MINUTE |
static int |
OTHER |
static long |
SECOND |
static int |
THIS_WEEK |
static int |
TODAY |
static int |
YESTERDAY |
Constructor and Description |
---|
OutlookDate(Locale locale)
|
OutlookDate(Locale locale,
ApplicationProperties applicationProperties)
|
OutlookDate(Locale locale,
ApplicationProperties applicationProperties,
I18nHelper.BeanFactory i18nHelperFactory,
DateTimeFormatterFactory dateTimeFormatterFactory) |
Modifier and Type | Method and Description |
---|---|
int |
daysAgo(Date date)
Deprecated.
Use
Days.daysBetween(org.joda.time.ReadablePartial, org.joda.time.ReadablePartial) instead. Since v4.4. |
int |
daysAgo(Date theDate,
Date theReferenceDate)
Deprecated.
Use
Days.daysBetween(org.joda.time.ReadablePartial, org.joda.time.ReadablePartial) instead. Since v4.4. |
String |
format()
Deprecated.
Use
DateTimeFormatter.format(java.util.Date) instead. Since v4.4. |
String |
format(Date date)
Deprecated.
Use
DateTimeFormatter.format(java.util.Date) instead. Since
v4.4. |
String |
formatDatePicker(Date date)
Deprecated.
Use
DateTimeFormatter.format(java.util.Date) instead. Since
v4.4. |
String |
formatDateTimePicker(Date date)
Deprecated.
Use
DateTimeFormatter.format(java.util.Date) instead. Since
v4.4. |
String |
formatDay(Date date)
Deprecated.
Use
DateTimeFormatter.format(java.util.Date) instead. Since
v4.4. |
String |
formatDMY(Date date)
Deprecated.
Use
DateTimeFormatter.format(java.util.Date) instead. Since
v4.4. |
String |
formatDMYHMS(Date date)
Deprecated.
Use
DateTimeFormatter.format(java.util.Date) instead. Since
v5.0. |
String |
formatIso8601(Date date)
Formats the given date into ISO8601 format.
|
String |
formatIso8601Date(Date date)
Formats the given date into ISO8601 format.
|
String |
formatRss(Date date)
Deprecated.
Use
DateTimeFormatter.format(java.util.Date) instead. Since v5.0. |
String |
formatRssRfc822(Date date)
Deprecated.
Use
DateTimeFormatter.format(java.util.Date) instead. Since v4.4. |
String |
formatSmart(Date date,
OutlookDate.SmartFormatterModes mode)
Deprecated.
Use
DateTimeFormatter.format(java.util.Date) instead. Since
v5.0. |
String |
formatTime(Date date)
Deprecated.
Use
DateTimeFormatter.format(java.util.Date) instead. Since
v5.0. |
DateFormat |
getCompleteDateFormat()
Deprecated.
Use
DateTimeFormatter.getFormatHint() instead. Since v4.4. |
String |
getCompleteDateTimeFormat()
Deprecated.
Use
DateTimeFormatter.getFormatHint() instead. Since v4.4. |
String |
getDatePickerFormat()
Deprecated.
Use
DateTimeFormatter.getFormatHint() instead. Since v4.4. |
String |
getDatePickerFormatSample(Date date)
Deprecated.
Use
DateTimeFormatter.format(java.util.Date) instead. Since
v4.4. |
String |
getDateTimePickerFormat()
Deprecated.
Use
DateTimeFormatter.getFormatHint() instead. Since v4.4. |
String |
getDateTimePickerFormatSample(Date date)
Deprecated.
Use
DateTimeFormatter.format(java.util.Date) instead. Since
v4.4. |
Date |
getNow()
Deprecated.
Use
Date.Date() instead. Since v4.4. |
boolean |
isDatePickerDate(String value)
Deprecated.
Use
DateTimeFormatter.parse(String) instead. Since v5.0. |
Date |
parseCompleteDateTime(String value)
Deprecated.
Use
DateTimeFormatter.parse(String) instead. Since v4.4. |
Date |
parseDatePicker(String value)
Deprecated.
Use
DateTimeFormatter.parse(String) instead. Since v4.4. |
Date |
parseDateTimePicker(String value)
Deprecated.
Use
DateTimeFormatter.parse(String) instead. Since v4.4. |
static Date |
parseRss(String rssDate)
Deprecated.
Use
DateTimeFormatter.format(java.util.Date) instead. Since v4.4. |
public static final long SECOND
public static final long MINUTE
public static final long HOUR
public static final long DAY
public static final int TODAY
public static final int YESTERDAY
public static final int THIS_WEEK
public static final int OTHER
public OutlookDate(Locale locale, ApplicationProperties applicationProperties, I18nHelper.BeanFactory i18nHelperFactory, DateTimeFormatterFactory dateTimeFormatterFactory)
public OutlookDate(Locale locale)
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.3locale
- public OutlookDate(Locale locale, ApplicationProperties applicationProperties)
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.3locale
- applicationProperties
- public String formatIso8601(Date date)
formatIso8601Date(java.util.Date)
method instead.date
- date to formatpublic String formatIso8601Date(Date date)
formatIso8601(java.util.Date)
method instead.date
- date to format@Deprecated public String formatDMY(Date date)
DateTimeFormatter.format(java.util.Date)
instead. Since
v4.4.DateTimeStyle.DATE
.date
- a Date@Deprecated public String formatDMYHMS(Date date)
DateTimeFormatter.format(java.util.Date)
instead. Since
v5.0.DateTimeStyle.COMPLETE
.date
- a Date@Deprecated public String formatTime(Date date)
DateTimeFormatter.format(java.util.Date)
instead. Since
v5.0.DateTimeStyle.TIME
.date
- a Date@Deprecated public String formatDay(Date date)
DateTimeFormatter.format(java.util.Date)
instead. Since
v4.4.@Deprecated public String formatDatePicker(Date date)
DateTimeFormatter.format(java.util.Date)
instead. Since
v4.4.DateTimeStyle.DATE_PICKER
.@Deprecated public String formatDateTimePicker(Date date)
DateTimeFormatter.format(java.util.Date)
instead. Since
v4.4.DateTimeStyle.DATE_TIME_PICKER
.@Deprecated public String formatRss(Date date)
DateTimeFormatter.format(java.util.Date)
instead. Since v5.0.MailDateFormat
to format the given date. Returns an empty string if
null is passed in.date
- date to format@Deprecated public String formatRssRfc822(Date date)
DateTimeFormatter.format(java.util.Date)
instead. Since v4.4.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 stringformat(java.util.Date)
@Deprecated public static Date parseRss(String rssDate) throws ParseException
DateTimeFormatter.format(java.util.Date)
instead. Since v4.4.MailDateFormat
to parse the date.rssDate
- RSS dateParseException
- if string parsing failsformat(java.util.Date)
@Deprecated public String format()
DateTimeFormatter.format(java.util.Date)
instead. Since v4.4.DateTimeStyle.RELATIVE
.format(java.util.Date)
@Deprecated public String format(Date date)
DateTimeFormatter.format(java.util.Date)
instead. Since
v4.4.DateTimeStyle.RELATIVE
.date
- the date to format@Deprecated public String formatSmart(Date date, OutlookDate.SmartFormatterModes mode)
DateTimeFormatter.format(java.util.Date)
instead. Since
v5.0.date
- the date to formatmode
- whether or not to include the time in the printed date@Deprecated public Date getNow()
Date.Date()
instead. Since v4.4.@Deprecated public int daysAgo(Date date)
Days.daysBetween(org.joda.time.ReadablePartial, org.joda.time.ReadablePartial)
instead. Since v4.4.@Deprecated public int daysAgo(Date theDate, Date theReferenceDate)
Days.daysBetween(org.joda.time.ReadablePartial, org.joda.time.ReadablePartial)
instead. Since v4.4.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
.@Deprecated public Date parseCompleteDateTime(String value) throws ParseException
DateTimeFormatter.parse(String)
instead. Since v4.4.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
@Deprecated public Date parseDatePicker(String value) throws ParseException
DateTimeFormatter.parse(String)
instead. Since v4.4.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
@Deprecated public Date parseDateTimePicker(String value) throws ParseException
DateTimeFormatter.parse(String)
instead. Since v4.4.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
@Deprecated public String getDatePickerFormat()
DateTimeFormatter.getFormatHint()
instead. Since v4.4.@Deprecated public String getDatePickerFormatSample(Date date)
DateTimeFormatter.format(java.util.Date)
instead. Since
v4.4.@Deprecated public String getDateTimePickerFormatSample(Date date)
DateTimeFormatter.format(java.util.Date)
instead. Since
v4.4.@Deprecated public boolean isDatePickerDate(String value)
DateTimeFormatter.parse(String)
instead. Since v5.0.value
- @Deprecated public String getDateTimePickerFormat()
DateTimeFormatter.getFormatHint()
instead. Since v4.4.@Deprecated public String getCompleteDateTimeFormat()
DateTimeFormatter.getFormatHint()
instead. Since v4.4.@Deprecated public DateFormat getCompleteDateFormat()
DateTimeFormatter.getFormatHint()
instead. Since v4.4.DateFormat
based on the run-time value of APKeys.JIRA_LF_DATE_COMPLETE
Copyright © 2002-2015 Atlassian. All Rights Reserved.