From a687743762b2838935bd6553b40c91a3252299fe Mon Sep 17 00:00:00 2001 From: Juan Pablo Vial Date: Tue, 24 Jun 2025 11:04:33 -0400 Subject: [PATCH] =?UTF-8?q?FIX:=20No=20buscar=20UF=20para=20fechas=20mayor?= =?UTF-8?q?es=20a=20hoy=20o=20d=C3=ADa=20nueve=20del=20mes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/Service/UF.php | 4 ++++ 1 file changed, 4 insertions(+) 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