public class

DateFieldFormatImpl

extends Object
implements DateFieldFormat
java.lang.Object
   ↳ com.atlassian.jira.util.DateFieldFormatImpl

Class Overview

Default implementation for formatting and parsing dates in JIRA.

Summary

Public Constructors
DateFieldFormatImpl(DateTimeFormatterFactory dateTimeFormatterFactory)
Public Methods
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.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.util.DateFieldFormat

Public Constructors

public DateFieldFormatImpl (DateTimeFormatterFactory dateTimeFormatterFactory)

Public Methods

public String format (Date date)

Formats a date using the JIRA date format.

Parameters
date a Date
Returns
  • a String containing a formatted date

public String formatDatePicker (Date date)

Formats the given date for usage in a date picker.

Parameters
date a Date
Returns
  • a String containing a formatted date

public String getFormatHint ()

Returns a string containing the format that this class is capable of parsing.

Returns
  • a String containing the format hint

public boolean isParseable (String releaseDate)

Returns a boolean indicating whether the given text contains a valid date.

Parameters
releaseDate a String representation of a date
Returns
  • a boolean indicating whether the given text contains a valid date

public Date parseDatePicker (String text)

Returns a date that is obtained by parsing the given text. The string representation of the date is assumed to be in the system time zone.

Parameters
text a String representation of a date
Returns
  • a Date