|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.util.DateFieldFormatImpl
public class DateFieldFormatImpl
Default implementation for formatting and parsing dates in JIRA.
Constructor Summary | |
---|---|
DateFieldFormatImpl(DateTimeFormatterFactory dateTimeFormatterFactory)
|
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 releaseDate)
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DateFieldFormatImpl(DateTimeFormatterFactory dateTimeFormatterFactory)
Method Detail |
---|
public String format(Date date)
DateFieldFormat
format
in interface DateFieldFormat
date
- a Date
public String formatDatePicker(Date date)
DateFieldFormat
formatDatePicker
in interface DateFieldFormat
date
- a Date
public Date parseDatePicker(String text) throws IllegalArgumentException
DateFieldFormat
parseDatePicker
in interface DateFieldFormat
text
- a String representation of a date
IllegalArgumentException
- if the text cannot be parsedpublic boolean isParseable(String releaseDate)
DateFieldFormat
isParseable
in interface DateFieldFormat
releaseDate
- a String representation of a date
public String getFormatHint()
DateFieldFormat
getFormatHint
in interface DateFieldFormat
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |