mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-02-03 19:12:46 +00:00
🤖 Auto commit for release 'develop' on 2026-01-23
This commit is contained in:
@@ -91,23 +91,23 @@ trait DateCalculation
|
||||
protected function getNextPeriods(Carbon $date, string $range): array
|
||||
{
|
||||
// select thing for next 12 periods:
|
||||
$loop = [];
|
||||
$loop = [];
|
||||
|
||||
/** @var Carbon $current */
|
||||
$current = Navigation::startOfPeriod($date, $range);
|
||||
$current = Navigation::endOfPeriod($current, $range);
|
||||
$current->addDay();
|
||||
$count = 0;
|
||||
$count = 0;
|
||||
|
||||
while ($count < 12) {
|
||||
$current = Navigation::endOfPeriod($current, $range);
|
||||
$currentStart = Navigation::startOfPeriod($current, $range);
|
||||
|
||||
$loop[] = [
|
||||
$loop[] = [
|
||||
'label' => $current->format('Y-m-d'),
|
||||
'title' => Navigation::periodShow($current, $range),
|
||||
'start' => clone $currentStart,
|
||||
'end' => clone $current
|
||||
'end' => clone $current,
|
||||
];
|
||||
++$count;
|
||||
$current->addDay();
|
||||
@@ -123,7 +123,7 @@ trait DateCalculation
|
||||
protected function getPreviousPeriods(Carbon $date, string $range): array
|
||||
{
|
||||
// select thing for last 12 periods:
|
||||
$loop = [];
|
||||
$loop = [];
|
||||
|
||||
/** @var Carbon $current */
|
||||
$current = Navigation::startOfPeriod($date, $range);
|
||||
@@ -132,11 +132,11 @@ trait DateCalculation
|
||||
$current->subDay();
|
||||
$current = Navigation::startOfPeriod($current, $range);
|
||||
$currentEnd = Navigation::endOfPeriod($current, $range);
|
||||
$loop[] = [
|
||||
$loop[] = [
|
||||
'label' => $current->format('Y-m-d'),
|
||||
'title' => Navigation::periodShow($current, $range),
|
||||
'start' => clone $current,
|
||||
'end' => clone $currentEnd
|
||||
'end' => clone $currentEnd,
|
||||
];
|
||||
++$count;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user