Previous year, fixes #11433

This commit is contained in:
James Cole
2026-01-02 07:59:29 +01:00
parent f655dcbcf8
commit 2209087b94
2 changed files with 6 additions and 0 deletions

View File

@@ -157,6 +157,11 @@ trait GetConfigurationData
$index = (string)trans('firefly.year_to_date');
$ranges[$index] = [$yearBegin, new Carbon()];
// previous year:
$yearBegin = today(config('app.timezone'))->subYear()->startOfYear();
$index = (string)trans('firefly.previous_year', ['year' => $yearBegin->year]);
$ranges[$index] = [$yearBegin, $yearBegin->clone()->endOfYear()];
// everything
$index = (string)trans('firefly.everything');
$ranges[$index] = [$first, new Carbon()];

View File

@@ -43,6 +43,7 @@ return [
'last_180_days' => 'Last 180 days',
'month_to_date' => 'Month to date',
'year_to_date' => 'Year to date',
'previous_year' => 'Previous year (:year)',
'YTD' => 'YTD',
'welcome_back' => 'What\'s playing?',
'main_dashboard_page_title' => 'Home',