FIX: No buscar UF para fechas mayores a hoy o día nueve del mes
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user