Fix date requests

This commit is contained in:
James Cole
2024-11-06 11:11:38 +01:00
parent 6d4004d1ed
commit d118c0d886
3 changed files with 7 additions and 3 deletions

View File

@@ -46,6 +46,8 @@ class DateRequest extends FormRequest
{
$start = $this->getCarbonDate('start');
$end = $this->getCarbonDate('end');
$start->startOfDay();
$end->endOfDay();
if ($start->diffInYears($end, true) > 5) {
throw new FireflyException('Date range out of range.');
}