Respect\Validation\Rules\AbstractInterval::filterInterval PHP Метод

filterInterval() защищенный Метод

protected filterInterval ( $value )
    protected function filterInterval($value)
    {
        if (!is_string($value) || is_numeric($value) || empty($value)) {
            return $value;
        }
        if (mb_strlen($value) == 1) {
            return $value;
        }
        try {
            return new DateTime($value);
        } catch (Exception $e) {
            // Pokémon Exception Handling
        }
        return $value;
    }