mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix date searches.
This commit is contained in:
parent
ab5a146277
commit
14df37712c
@ -487,7 +487,6 @@ class OperatorQuerySearch implements SearchInterface
|
|||||||
case 'date_before':
|
case 'date_before':
|
||||||
$range = $this->parseDateRange($value);
|
$range = $this->parseDateRange($value);
|
||||||
Log::debug(sprintf('Set "%s" using collector with value "%s" (%s - %s)', $operator, $value, $range['start']->format('Y-m-d'), $range['end']->format('Y-m-d')));
|
Log::debug(sprintf('Set "%s" using collector with value "%s" (%s - %s)', $operator, $value, $range['start']->format('Y-m-d'), $range['end']->format('Y-m-d')));
|
||||||
$this->collector->setRange($range['start'], $range['end']);
|
|
||||||
|
|
||||||
// add to operators manually:
|
// add to operators manually:
|
||||||
$this->operators->push(['type' => 'date_before', 'value' => $range['start']->format('Y-m-d'),]);
|
$this->operators->push(['type' => 'date_before', 'value' => $range['start']->format('Y-m-d'),]);
|
||||||
@ -497,10 +496,9 @@ class OperatorQuerySearch implements SearchInterface
|
|||||||
case 'date_after':
|
case 'date_after':
|
||||||
$range = $this->parseDateRange($value);
|
$range = $this->parseDateRange($value);
|
||||||
Log::debug(sprintf('Set "%s" using collector with value "%s" (%s - %s)', $operator, $value, $range['start']->format('Y-m-d'), $range['end']->format('Y-m-d')));
|
Log::debug(sprintf('Set "%s" using collector with value "%s" (%s - %s)', $operator, $value, $range['start']->format('Y-m-d'), $range['end']->format('Y-m-d')));
|
||||||
$this->collector->setRange($range['start'], $range['end']);
|
|
||||||
|
|
||||||
// add to operators manually:
|
// add to operators manually:
|
||||||
$this->operators->push(['type' => 'date_before', 'value' => $range['end']->format('Y-m-d'),]);
|
$this->operators->push(['type' => 'date_after', 'value' => $range['end']->format('Y-m-d'),]);
|
||||||
$this->collector->setAfter($range['end']);
|
$this->collector->setAfter($range['end']);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user