getWeatherHistory('Berlin', new \DateTime('2014-01-01'), new \DateTime('now'), 'hour', $units, $lang); foreach ($history as $weather) { echo "Average temperature at " . $weather->time->format('d.m.Y H:i') . ": " . $weather->temperature . "\n\r
"; }