public function decode($dateRange, array $configuration = [])
    {
        list($dateRangeStart, $dateRangeEnd) = explode(self::DELIMITER, $dateRange);

        $formatService = GeneralUtility::makeInstance(FormatService::class);
        $fromPart = '*';
        if($dateRangeStart !== ''){
            $fromPart = $formatService->timestampToIso(strtotime($dateRangeStart));
        }

        $toPart = '*';
        if($dateRangeEnd !== ''){
            $dateRangeEnd .= '59'; // adding 59 seconds
            $toPart = $formatService->timestampToIso(strtotime($dateRangeEnd));
        }

        $dateRangeFilter = '[' . $fromPart . ' TO ' . $toPart . ']';
        return $dateRangeFilter;
    }
public function decode($dateRange, array $configuration = [])
    {
        list($dateRangeStart, $dateRangeEnd) = explode(self::DELIMITER, $dateRange);

        $formatService = GeneralUtility::makeInstance(FormatService::class);
        $fromPart = '*';
        if($dateRangeStart !== ''){
            $fromPart = $formatService->timestampToIso(strtotime($dateRangeStart));
        }

        $toPart = '*';
        if($dateRangeEnd !== ''){
            $dateRangeEnd .= '59'; // adding 59 seconds
            $toPart = $formatService->timestampToIso(strtotime($dateRangeEnd));
        }

        $dateRangeFilter = '[' . $fromPart . ' TO ' . $toPart . ']';
        return $dateRangeFilter;
    }
public function decode ( $ dateRange , array $ configuration = [ ] ) { list ( $ dateRangeStart , $ dateRangeEnd ) = explode ( self :: DELIMITER , $ dateRange ) ; $ formatService = GeneralUtility :: makeInstance ( FormatService :: class ) ; $ fromPart = '*' ; if ( $ dateRangeStart !== '' ) { $ fromPart = $ formatService -> timestampToIso ( strtotime ( $ dateRangeStart ) ) ; } $ toPart = '*' ; if ( $ dateRangeEnd !== '' ) { $ dateRangeEnd .= '59' ; // adding 59 seconds $ toPart = $ formatService -> timestampToIso ( strtotime ( $ dateRangeEnd ) ) ; } $ dateRangeFilter = '[' . $ fromPart . ' TO ' . $ toPart . ']' ; return $ dateRangeFilter ; }
Parses the given date range from a GET parameter and returns a Solr
date range filter.

@param string $dateRange The range filter query string from the query URL
@param array $configuration Facet configuration
@return string Lucene query language filter to be used for querying Solr
Parses the given date range from a GET parameter and returns a Solr date range filter .