src/Sulu/Bundle/ResourceBundle/Resource/FilterManager.php
protected function getValueForCondition($value, $type)
    {
        // check if date and not a relative value like -1 week
        if (DataTypes::DATETIME_TYPE === $type && !preg_match('/[A-Za-z]{3,}/', $value)) {
            return (new \DateTime($value))->format(\DateTime::ISO8601);
        }

        return $value;
    }
protected function getValueForCondition($value, $type)
    {
        // check if date and not a relative value like -1 week
        if (DataTypes::DATETIME_TYPE === $type && !preg_match('/[A-Za-z]{3,}/', $value)) {
            return (new \DateTime($value))->format(\DateTime::ISO8601);
        }

        return $value;
    }
protected function getValueForCondition ( $ value , $ type ) { // check if date and not a relative value like -1 week if ( DataTypes :: DATETIME_TYPE === $ type && ! preg_match ( '/[A-Za-z]{3,}/' , $ value ) ) { return ( new \ DateTime ( $ value ) ) -> format ( \ DateTime :: ISO8601 ) ; } return $ value ; }
Parses the value for a condition - is mainly used for parsing values with type datetime
but excludes relative values like "-1 week" or "now".

@return string
Parses the value for a condition - is mainly used for parsing values with type datetime but excludes relative values like - 1 week or now .