|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.jql.util.JqlDateSupportImpl
@ThreadSafe public final class JqlDateSupportImpl
Default implementation for JqlDateSupport
Constructor Summary | |
---|---|
JqlDateSupportImpl(com.atlassian.core.util.Clock clock,
TimeZoneManager timeZoneManager)
|
|
JqlDateSupportImpl(TimeZoneManager timeZoneManager)
|
Method Summary | |
---|---|
Date |
convertToDate(Long dateLong)
Converts the long to a date. |
Date |
convertToDate(String dateString)
Try to parse the passed date string using the formats that JQL understands. |
Date |
convertToDate(String dateString,
TimeZone timeZone)
Try to parse the passed date string using the formats that JQL understands. |
DateRange |
convertToDateRange(Long dateLong)
Converts the long to a date range where both values equal each other. |
DateRange |
convertToDateRangeWithImpliedPrecision(String dateString)
Try to parse the passed in date string using the formats that JQL understands. |
String |
getDateString(Date date)
Return a string representation of the passed date. |
String |
getDateString(Date date,
TimeZone timeZone)
Return a string representation of the passed date. |
static String |
getDurationString(long duration)
|
String |
getIndexedValue(Date date)
Converts a date into the index-friendly format. |
boolean |
isDuration(String dateString)
Returns a boolean value indicating whether the passed date string representation has duration format, e.g., 4d 1h, -1w. |
boolean |
validate(String dateString)
Check to see if the passed string is a valid date according to JQL. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JqlDateSupportImpl(com.atlassian.core.util.Clock clock, TimeZoneManager timeZoneManager)
public JqlDateSupportImpl(TimeZoneManager timeZoneManager)
Method Detail |
---|
public Date convertToDate(String dateString)
JqlDateSupport
convertToDate
in interface JqlDateSupport
dateString
- the string to parse. Cannot be null.
JqlDateSupport.validate(String)
right?public Date convertToDate(String dateString, TimeZone timeZone)
JqlDateSupport
convertToDate
in interface JqlDateSupport
dateString
- the string to parse. Cannot be null.timeZone
- time zone to use when parsing.
JqlDateSupport.validate(String)
right?public DateRange convertToDateRangeWithImpliedPrecision(String dateString)
JqlDateSupport
convertToDateRangeWithImpliedPrecision
in interface JqlDateSupport
dateString
- the string to parse. Cannot be null.
JqlDateSupport.validate(String)
right?public Date convertToDate(Long dateLong)
JqlDateSupport
convertToDate
in interface JqlDateSupport
dateLong
- the long to give back a date for . Cannot be null.
public DateRange convertToDateRange(Long dateLong)
JqlDateSupport
convertToDateRange
in interface JqlDateSupport
dateLong
- the long to give back a date for . Cannot be null.
public String getIndexedValue(Date date)
JqlDateSupport
getIndexedValue
in interface JqlDateSupport
date
- the date
public boolean validate(String dateString)
JqlDateSupport
validate
in interface JqlDateSupport
dateString
- the string to check cannot be null.
public String getDateString(Date date)
JqlDateSupport
getDateString
in interface JqlDateSupport
date
- the date to convert. Cannot be null.
public String getDateString(Date date, TimeZone timeZone)
JqlDateSupport
getDateString
in interface JqlDateSupport
date
- the date to convert. Cannot be null.timeZone
- time zone to use. Cannot be null.
public boolean isDuration(String dateString)
JqlDateSupport
isDuration
in interface JqlDateSupport
dateString
- the string to parse.
public static String getDurationString(long duration)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |