source/Application/Controller/Admin/AdminListController.php
protected function _convertDate($date)
    {
        // regexps to validate input
        $datePatterns = [
            "/^([0-9]{2})\.([0-9]{4})/" => "EUR2", // MM.YYYY
            "/^([0-9]{2})\.([0-9]{2})/" => "EUR1", // DD.MM
            "/^([0-9]{2})\/([0-9]{4})/" => "USA2", // MM.YYYY
            "/^([0-9]{2})\/([0-9]{2})/" => "USA1" // DD.MM
        ];

        // date/time formatting rules
        $dateFormats = [
            "EUR1" => [2, 1],
            "EUR2" => [2, 1],
            "USA1" => [1, 2],
            "USA2" => [2, 1]
        ];

        // looking for date field
        $dateMatches = [];
        $stringModifier = getStr();
        foreach ($datePatterns as $pattern => $type) {
            if ($stringModifier->preg_match($pattern, $date, $dateMatches)) {
                $date = $dateMatches[$dateFormats[$type][0]] . "-" . $dateMatches[$dateFormats[$type][1]];
                break;
            }
        }

        return $date;
    }
protected function _convertDate($date)
    {
        // regexps to validate input
        $datePatterns = [
            "/^([0-9]{2})\.([0-9]{4})/" => "EUR2", // MM.YYYY
            "/^([0-9]{2})\.([0-9]{2})/" => "EUR1", // DD.MM
            "/^([0-9]{2})\/([0-9]{4})/" => "USA2", // MM.YYYY
            "/^([0-9]{2})\/([0-9]{2})/" => "USA1" // DD.MM
        ];

        // date/time formatting rules
        $dateFormats = [
            "EUR1" => [2, 1],
            "EUR2" => [2, 1],
            "USA1" => [1, 2],
            "USA2" => [2, 1]
        ];

        // looking for date field
        $dateMatches = [];
        $stringModifier = getStr();
        foreach ($datePatterns as $pattern => $type) {
            if ($stringModifier->preg_match($pattern, $date, $dateMatches)) {
                $date = $dateMatches[$dateFormats[$type][0]] . "-" . $dateMatches[$dateFormats[$type][1]];
                break;
            }
        }

        return $date;
    }
protected function _convertDate ( $ date ) { // regexps to validate input $ datePatterns = [ "/^([0-9]{2})\.([0-9]{4})/" => "EUR2" , // MM.YYYY "/^([0-9]{2})\.([0-9]{2})/" => "EUR1" , // DD.MM "/^([0-9]{2})\/([0-9]{4})/" => "USA2" , // MM.YYYY "/^([0-9]{2})\/([0-9]{2})/" => "USA1" // DD.MM ] ; // date/time formatting rules $ dateFormats = [ "EUR1" => [ 2 , 1 ] , "EUR2" => [ 2 , 1 ] , "USA1" => [ 1 , 2 ] , "USA2" => [ 2 , 1 ] ] ; // looking for date field $ dateMatches = [ ] ; $ stringModifier = getStr ( ) ; foreach ( $ datePatterns as $ pattern => $ type ) { if ( $ stringModifier -> preg_match ( $ pattern , $ date , $ dateMatches ) ) { $ date = $ dateMatches [ $ dateFormats [ $ type ] [ 0 ] ] . "-" . $ dateMatches [ $ dateFormats [ $ type ] [ 1 ] ] ; break ; } } return $ date ; }
Converter for date field search. If not full date will be searched.

@param string $date searched date

@return string
Converter for date field search . If not full date will be searched .