|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@ThreadSafe public interface DateFieldFormat
Helper for handling JIRA date fields. Dates in JIRA are displayed as day/month/year and are intepreted according to the date picker format. Even though we use java.util.Date instances internally, only the year/month/day are relevant in a date field. Dates are used in a few places throughout JIRA:
The Date instances that this class produces are always to be interpreted in the system time zone
.
DateTimeStyle.DATE
,
DateTimeStyle.DATE_PICKER
Method Summary | |
---|---|
String |
format(Date date)
Formats a date using the JIRA date format. |
String |
formatDatePicker(Date date)
Formats the given date for usage in a date picker. |
String |
getFormatHint()
Returns a string containing the format that this class is capable of parsing. |
boolean |
isParseable(String text)
Returns a boolean indicating whether the given text contains a valid date. |
Date |
parseDatePicker(String text)
Returns a date that is obtained by parsing the given text. |
Method Detail |
---|
String format(Date date)
date
- a Date
String formatDatePicker(Date date)
date
- a Date
Date parseDatePicker(String text) throws IllegalArgumentException
text
- a String representation of a date
IllegalArgumentException
- if the text cannot be parsedboolean isParseable(String text)
text
- a String representation of a date
String getFormatHint()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |