diff --git a/src/Endpoint/OneCallEndpoint.php b/src/Endpoint/OneCallEndpoint.php index 16e1356..9026b09 100644 --- a/src/Endpoint/OneCallEndpoint.php +++ b/src/Endpoint/OneCallEndpoint.php @@ -95,10 +95,10 @@ public function getHistoryMoment(float $latitude, float $longitude, \DateTimeInt * @throws UnexpectedErrorException * @throws ValidationException */ - public function getHistoryAggregate(float $latitude, float $longitude, \DateTimeInterface $dateTime): WeatherAggregate + public function getHistoryAggregate(float $latitude, float $longitude, \DateTimeInterface $date): WeatherAggregate { $this->validateCoordinate($latitude, $longitude); - $this->validateLessThan('dateTime', $dateTime, new \DateTimeImmutable('now')); + $this->validateLessThan('dateTime', $date, new \DateTimeImmutable('now')); $data = $this->sendRequest( method: 'GET', @@ -106,7 +106,7 @@ public function getHistoryAggregate(float $latitude, float $longitude, \DateTime query: [ 'lat' => $latitude, 'lon' => $longitude, - 'date' => $dateTime->format('Y-m-d'), + 'date' => $date->format('Y-m-d'), 'units' => $this->getUnitSystem(), 'lang' => $this->getLanguage() ]