THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||
---|---|---|---|---|
| ||||
Map<String, String> props = new HashMap<String, String>(); props.put("search.date-format", "yyyy-MM-dd'T'HH:mm:ss"); props.put("search.timezone.support", "false"); Date d = df.parse("2011-03-01 12:34:00"); FiqlSearchConditionBuilder bCustom = new FiqlSearchConditionBuilder(props); String ret = bCustom.is("foo").equalTo(d).query(); assertEquals("foo==2011-03-01T12:34:00", ret); |
Relative dates
Date value can be specified as a duration from the current date/time, as its string representation, "PnYnMnDTnHnMnS".
Resulted date will be calculated as a current date + specified duration. For example:
Code Block | ||||
---|---|---|---|---|
| ||||
?_search=date=ge=-P90D
|
This query will search for a date which is 90 days in the past or newer.
Alternative query languages
...