src/util/Date.php
public static function getDateRange($startDate, $days) {
        if (!is_string($startDate))                      throw new IllegalTypeException('Illegal type of parameter $startDate: '.gettype($startDate));
        if (Validator::isDateTime($startDate) === false) throw new InvalidArgumentException('Invalid argument $startDate: "'.$startDate.'"');
        if (!is_int($days))                              throw new IllegalTypeException('Illegal type of parameter $days: '.gettype($days));
        if ($days < 0)                                   throw new InvalidArgumentException('Invalid argument $days: '.$days);

        $range = array();
        $date  = new DateTime($startDate);

        for ($i=0; $i < $days; ++$i) {
            $range[] = $date->format('Y-m-d');
            $date->modify('+1 day');
        }
        return $range;
    }
public static function getDateRange($startDate, $days) {
        if (!is_string($startDate))                      throw new IllegalTypeException('Illegal type of parameter $startDate: '.gettype($startDate));
        if (Validator::isDateTime($startDate) === false) throw new InvalidArgumentException('Invalid argument $startDate: "'.$startDate.'"');
        if (!is_int($days))                              throw new IllegalTypeException('Illegal type of parameter $days: '.gettype($days));
        if ($days < 0)                                   throw new InvalidArgumentException('Invalid argument $days: '.$days);

        $range = array();
        $date  = new DateTime($startDate);

        for ($i=0; $i < $days; ++$i) {
            $range[] = $date->format('Y-m-d');
            $date->modify('+1 day');
        }
        return $range;
    }
public static function getDateRange ( $ startDate , $ days ) { if ( ! is_string ( $ startDate ) ) throw new IllegalTypeException ( 'Illegal type of parameter $startDate: ' . gettype ( $ startDate ) ) ; if ( Validator :: isDateTime ( $ startDate ) === false ) throw new InvalidArgumentException ( 'Invalid argument $startDate: "' . $ startDate . '"' ) ; if ( ! is_int ( $ days ) ) throw new IllegalTypeException ( 'Illegal type of parameter $days: ' . gettype ( $ days ) ) ; if ( $ days < 0 ) throw new InvalidArgumentException ( 'Invalid argument $days: ' . $ days ) ; $ range = array ( ) ; $ date = new DateTime ( $ startDate ) ; for ( $ i = 0 ; $ i < $ days ; ++ $ i ) { $ range [ ] = $ date -> format ( 'Y-m-d' ) ; $ date -> modify ( '+1 day' ) ; } return $ range ; }
Gibt eine Anzahl von Datumswerten zurueck.

@param  string $startDate - Startzeitpunkt (Format: yyyy-mm-dd)
@param  int    $days      - Anzahl der zurueckzugebenden Werte

@return array
Gibt eine Anzahl von Datumswerten zurueck .