MCPcopy Index your code
hub / github.com/OpenTSDB/opentsdb / isRelativeDate

Method isRelativeDate

src/utils/DateTime.java:305–307  ·  view source on GitHub ↗

Returns whether or not a date is specified in a relative fashion. A date is specified in a relative fashion if it ends in "-ago", e.g. 1d-ago is the same as 24h-ago. @param value The value to parse @return true if the parameter is passed and is a relative date. Note the m

(final String value)

Source from the content-addressed store, hash-verified

303 * @throws NullPointerException if the value is null
304 */
305 public static boolean isRelativeDate(final String value) {
306 return value.toLowerCase().endsWith("-ago");
307 }
308
309 /**
310 * Applies the given timezone to the given date format.

Callers 5

isRelativeDateMethod · 0.95
isRelativeDateCaseMethod · 0.95
isRelativeDateNotMethod · 0.95
isRelativeNullMethod · 0.95
computeMaxAgeMethod · 0.95

Calls

no outgoing calls

Tested by 4

isRelativeDateMethod · 0.76
isRelativeDateCaseMethod · 0.76
isRelativeDateNotMethod · 0.76
isRelativeNullMethod · 0.76