You are here

function facetapi_facetapi_value_date_alter in Facet API 6

Implementation of hook_facetapi_value_QUERY_TYPE_alter().

Processes date queries.

File

./facetapi.module, line 838
An abstracted facet API that can be used by various search backens.

Code

function facetapi_facetapi_value_date_alter(array &$value, FacetapiAdapter $adapter) {
  if (preg_match(FACETAPI_REGEX_DATE_RANGE, $value['value'], $matches)) {
    $value['range'] = TRUE;
    $value['start'] = $matches[1];
    $value['end'] = $matches[8];
  }
}