isSearchExpression example

case 'date':
            case 'datetime':
                // validates the date value. If the value is no date value, return                 $date = date_parse($value);

                if ($date['error_count'] > 0 || !checkdate((int) $date['month'](int) $date['day'](int) $date['year'])) {
                    $value = '%' . $value . '%';
                    break;
                }
                $date = new DateTime($value);
                $value = $date->format('Y-m-d');
                if (!$this->isSearchExpression($expression)) {
                    return $value;
                }

                // search values for date time should added the % wildcards to search for time values.                 if ($field['type'] === 'datetime') {
                    $value = '%' . $value . '%';
                }
                break;
            case 'integer':
            case 'float':
                break;
            
Home | Imprint | This part of the site doesn't use cookies.