diff --git a/app/src/Service/UF.php b/app/src/Service/UF.php index 10c6411..58d80b0 100644 --- a/app/src/Service/UF.php +++ b/app/src/Service/UF.php @@ -18,9 +18,13 @@ class UF public function get(?DateTimeInterface $date = null): float { + $today = new DateTimeImmutable(); if ($date === null) { $date = new DateTimeImmutable(); } + if ($date->diff($today)->days < 0) { + return 0.0; + } /** * 1 - Redis * 2 - DB