protected function getDateTimes(array $parameters, $format) {
        if (!$this->dateTimeParameters) {
            return [];
        }
        $datetimes = [];
        for ($i = 0; $i < $this->amountOfParameters; ++$i) {
            $datetime = \DateTime::createFromFormat($format, $parameters[$i]);
            if ($datetime === false) {
                throw new ValidationException('"'.$this->type.'" expects a date of the format "'.$format.'".');
            }
            $datetimes[] = $datetime;
        }
        return $datetimes;
    }
protected function getDateTimes(array $parameters, $format) {
        if (!$this->dateTimeParameters) {
            return [];
        }
        $datetimes = [];
        for ($i = 0; $i < $this->amountOfParameters; ++$i) {
            $datetime = \DateTime::createFromFormat($format, $parameters[$i]);
            if ($datetime === false) {
                throw new ValidationException('"'.$this->type.'" expects a date of the format "'.$format.'".');
            }
            $datetimes[] = $datetime;
        }
        return $datetimes;
    }
protected function getDateTimes ( array $ parameters , $ format ) { if ( ! $ this -> dateTimeParameters ) { return [ ] ; } $ datetimes = [ ] ; for ( $ i = 0 ; $ i < $ this -> amountOfParameters ; ++ $ i ) { $ datetime = \ DateTime :: createFromFormat ( $ format , $ parameters [ $ i ] ) ; if ( $ datetime === false ) { throw new ValidationException ( '"' . $ this -> type . '" expects a date of the format "' . $ format . '".' ) ; } $ datetimes [ ] = $ datetime ; } return $ datetimes ; }
Interprets the given parameters as date times and returns them.

@param array $parameters
the parameters
@param string $format
the date time format

@return \DateTime[]
the date times

@throws ValidationException
thrown if one of the parameters is not a date in the given format
Interprets the given parameters as date times and returns them .