mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-02 02:18:20 +00:00
Add two new ranges #954
This commit is contained in:
@@ -168,6 +168,16 @@ trait GetConfigurationData
|
|||||||
$ranges[ucfirst((string)trans('firefly.today'))] = [$todayStart, $todayEnd];
|
$ranges[ucfirst((string)trans('firefly.today'))] = [$todayStart, $todayEnd];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// last seven days:
|
||||||
|
$seven = Carbon::create()->subDays(7);
|
||||||
|
$index = (string)trans('firefly.last_seven_days');
|
||||||
|
$ranges[$index] = [$seven, new Carbon];
|
||||||
|
|
||||||
|
// last 30 days:
|
||||||
|
$thirty = Carbon::create()->subDays(30);
|
||||||
|
$index = (string)trans('firefly.last_thirty_days');
|
||||||
|
$ranges[$index] = [$thirty, new Carbon];
|
||||||
|
|
||||||
// everything
|
// everything
|
||||||
$index = (string)trans('firefly.everything');
|
$index = (string)trans('firefly.everything');
|
||||||
$ranges[$index] = [$first, new Carbon];
|
$ranges[$index] = [$first, new Carbon];
|
||||||
@@ -259,9 +269,10 @@ trait GetConfigurationData
|
|||||||
$now = time();
|
$now = time();
|
||||||
if (0 === $lastTime) {
|
if (0 === $lastTime) {
|
||||||
request()->session()->flash('info', trans('firefly.recurring_never_cron'));
|
request()->session()->flash('info', trans('firefly.recurring_never_cron'));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if($now - $lastTime > 129600) {
|
if ($now - $lastTime > 129600) {
|
||||||
request()->session()->flash('warning', trans('firefly.recurring_cron_long_ago'));
|
request()->session()->flash('warning', trans('firefly.recurring_cron_long_ago'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -30,6 +30,8 @@ return [
|
|||||||
'delete' => 'Delete',
|
'delete' => 'Delete',
|
||||||
'split' => 'Split',
|
'split' => 'Split',
|
||||||
'clone' => 'Clone',
|
'clone' => 'Clone',
|
||||||
|
'last_seven_days' => 'Last seven days',
|
||||||
|
'last_thirty_days' => 'Last thirty days',
|
||||||
'welcomeBack' => 'What\'s playing?',
|
'welcomeBack' => 'What\'s playing?',
|
||||||
'everything' => 'Everything',
|
'everything' => 'Everything',
|
||||||
'today' => 'today',
|
'today' => 'today',
|
||||||
|
Reference in New Issue
Block a user