Code optimizations.

This commit is contained in:
James Cole
2018-07-23 21:49:15 +02:00
parent 4fa5f4e5a3
commit 06d22e843a
33 changed files with 784 additions and 603 deletions

View File

@@ -124,8 +124,7 @@ class Range
// ignore preference. set the range to be the current month:
if (!app('session')->has('start') && !app('session')->has('end')) {
$viewRange = app('preferences')->get('viewRange', '1M')->data;
$start = new Carbon;
$start = app('navigation')->updateStartDate($viewRange, $start);
$start = app('navigation')->updateStartDate($viewRange, new Carbon);
$end = app('navigation')->updateEndDate($viewRange, $start);
app('session')->put('start', $start);