public function toArray()
    {
        $start    = $this->intervalStart;
        $end      = $this->intervalEnd;
        $period   = new \DatePeriod($start, new \DateInterval('P1D'), $end);
        $days     = array();

        foreach ($period as $current_day) {
            $days[] = $current_day;
        }

        $days[]  = $end;

        return $days;
    }
public function toArray()
    {
        $start    = $this->intervalStart;
        $end      = $this->intervalEnd;
        $period   = new \DatePeriod($start, new \DateInterval('P1D'), $end);
        $days     = array();

        foreach ($period as $current_day) {
            $days[] = $current_day;
        }

        $days[]  = $end;

        return $days;
    }
public function toArray ( ) { $ start = $ this -> intervalStart ; $ end = $ this -> intervalEnd ; $ period = new \ DatePeriod ( $ start , new \ DateInterval ( 'P1D' ) , $ end ) ; $ days = array ( ) ; foreach ( $ period as $ current_day ) { $ days [ ] = $ current_day ; } $ days [ ] = $ end ; return $ days ; }
Array of \DateTime objects
Array of \ DateTime objects