From b2babcf30f1720a58287788eef9aee7fc2b70885 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Sat, 6 May 2023 13:41:17 +0200 Subject: [PATCH] use the DateTime object when comparing dates in ExhcnageRateCalculator --- src/Finance/ExchangeRateCalculator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Finance/ExchangeRateCalculator.php b/src/Finance/ExchangeRateCalculator.php index 1b170b0..68ab912 100644 --- a/src/Finance/ExchangeRateCalculator.php +++ b/src/Finance/ExchangeRateCalculator.php @@ -41,7 +41,7 @@ class ExchangeRateCalculator $currentExchangeRate = null; foreach ($this->exchangeRates[$currency->getId()] as $exchangeRate) { - if ($exchangeRate->getValidFrom() > $time) { + if ($exchangeRate->getValidFromDate() > $time) { break; } $currentExchangeRate = $exchangeRate; -- 2.45.2