public class DateFieldFormatImpl extends Object implements DateFieldFormat
Constructor and Description |
---|
DateFieldFormatImpl(DateTimeFormatterFactory dateTimeFormatterFactory) |
Modifier and Type | Method and Description |
---|---|
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.
|
public DateFieldFormatImpl(DateTimeFormatterFactory dateTimeFormatterFactory)
public String format(Date date)
DateFieldFormat
format
in interface DateFieldFormat
date
- a Datepublic String formatDatePicker(Date date)
DateFieldFormat
formatDatePicker
in interface DateFieldFormat
date
- a Datepublic Date parseDatePicker(String text) throws IllegalArgumentException
DateFieldFormat
parseDatePicker
in interface DateFieldFormat
text
- a String representation of a dateIllegalArgumentException
- if the text cannot be parsedpublic boolean isParseable(String releaseDate)
DateFieldFormat
isParseable
in interface DateFieldFormat
releaseDate
- a String representation of a datepublic String getFormatHint()
DateFieldFormat
getFormatHint
in interface DateFieldFormat
Copyright © 2002-2019 Atlassian. All Rights Reserved.