@ThreadSafe public final class JqlLocalDateSupportImpl extends Object implements JqlLocalDateSupport
JqlLocalDateSupport
Modifier and Type | Field and Description |
---|---|
static String |
PATTERN_WITH_HYPHEN |
static String |
PATTERN_WITH_SLASH |
Constructor and Description |
---|
JqlLocalDateSupportImpl(com.atlassian.core.util.Clock clock,
TimeZoneManager timeZoneManager) |
JqlLocalDateSupportImpl(TimeZoneManager timeZoneManager) |
Modifier and Type | Method and Description |
---|---|
Date |
convertToDate(LocalDate date)
Converts a LocalDate to a Date using the systems time zone.
|
LocalDate |
convertToLocalDate(Long dateLong)
Try to parse the passed date long.
|
LocalDate |
convertToLocalDate(String dateString)
Try to parse the passed date string using the formats that JQL understands.
|
String |
getIndexedValue(LocalDate date)
Converts a date into the index-friendly format.
|
LocalDate |
getLocalDateFromQueryLiteral(QueryLiteral rawValue)
Try to parse the passed date in query literal.
|
List<LocalDate> |
getLocalDatesFromQueryLiterals(List<QueryLiteral> rawValues)
Try to parse the passed dates in query literals.
|
String |
getLocalDateString(LocalDate localDate)
Return a string representation of the passed date.
|
boolean |
validate(String dateString)
Check to see if the passed string is a valid date according to JQL.
|
public static final String PATTERN_WITH_SLASH
public static final String PATTERN_WITH_HYPHEN
public JqlLocalDateSupportImpl(com.atlassian.core.util.Clock clock, TimeZoneManager timeZoneManager)
public JqlLocalDateSupportImpl(TimeZoneManager timeZoneManager)
public LocalDate convertToLocalDate(String dateString)
JqlLocalDateSupport
convertToLocalDate
in interface JqlLocalDateSupport
dateString
- the string to parse. Cannot be empty or null.public LocalDate convertToLocalDate(Long dateLong)
JqlLocalDateSupport
convertToLocalDate
in interface JqlLocalDateSupport
dateLong
- the string to parse. Cannot be empty or null.public String getIndexedValue(LocalDate date)
JqlLocalDateSupport
getIndexedValue
in interface JqlLocalDateSupport
date
- the datepublic boolean validate(String dateString)
JqlLocalDateSupport
validate
in interface JqlLocalDateSupport
dateString
- the string to check cannot be null.public String getLocalDateString(LocalDate localDate)
JqlLocalDateSupport
getLocalDateString
in interface JqlLocalDateSupport
localDate
- the date to convert. Cannot be null.public Date convertToDate(LocalDate date)
JqlLocalDateSupport
convertToDate
in interface JqlLocalDateSupport
date
- the date to convert. Cannot be null.public LocalDate getLocalDateFromQueryLiteral(QueryLiteral rawValue)
JqlLocalDateSupport
getLocalDateFromQueryLiteral
in interface JqlLocalDateSupport
rawValue
- the query literal representing the datepublic List<LocalDate> getLocalDatesFromQueryLiterals(List<QueryLiteral> rawValues)
JqlLocalDateSupport
getLocalDatesFromQueryLiterals
in interface JqlLocalDateSupport
rawValues
- the query literals representing the datesCopyright © 2002-2017 Atlassian. All Rights Reserved.