src/Chippyash/Validation/Common/ISO8601/MatchDate.php
protected function matchPart($value, array $patterns)
    {
        foreach ($patterns as $key => $pattern) {
            if (preg_match($pattern, $value) === 1) {
                $this->messenger->add(new StringType($key));
                return true;
            }
        }

        return false;
    }
protected function matchPart($value, array $patterns)
    {
        foreach ($patterns as $key => $pattern) {
            if (preg_match($pattern, $value) === 1) {
                $this->messenger->add(new StringType($key));
                return true;
            }
        }

        return false;
    }
protected function matchPart ( $ value , array $ patterns ) { foreach ( $ patterns as $ key => $ pattern ) { if ( preg_match ( $ pattern , $ value ) === 1 ) { $ this -> messenger -> add ( new StringType ( $ key ) ) ; return true ; } } return false ; }
Match a datestring part

@param  string $value
@param  array  $patterns
@return boolean
Match a datestring part