summaryrefslogtreecommitdiff
path: root/app/Controller/AnalyticController.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-08-31 21:21:09 -0400
committerFrederic Guillot <fred@kanboard.net>2016-08-31 21:21:09 -0400
commit0cb717f4407b81868d6b909d1d4ef4795c5e4b50 (patch)
treebf277f7bcf80e17be67206948c4900993d5edca6 /app/Controller/AnalyticController.php
parent3861e90336031873d7f6dc2f7476b5502af7d69f (diff)
Replace all date fields by helper
Diffstat (limited to 'app/Controller/AnalyticController.php')
-rw-r--r--app/Controller/AnalyticController.php8
1 files changed, 2 insertions, 6 deletions
diff --git a/app/Controller/AnalyticController.php b/app/Controller/AnalyticController.php
index ab0646a2..c3e7409a 100644
--- a/app/Controller/AnalyticController.php
+++ b/app/Controller/AnalyticController.php
@@ -31,8 +31,6 @@ class AnalyticController extends BaseController
'project' => $project,
'average' => $this->averageLeadCycleTimeAnalytic->build($project['id']),
'metrics' => $this->projectDailyStatsModel->getRawMetrics($project['id'], $from, $to),
- 'date_format' => $this->configModel->get('application_date_format'),
- 'date_formats' => $this->dateParser->getAvailableFormats($this->dateParser->getDateFormats()),
'title' => t('Lead and cycle time'),
)));
}
@@ -155,8 +153,6 @@ class AnalyticController extends BaseController
'display_graph' => $display_graph,
'metrics' => $display_graph ? $this->projectDailyColumnStatsModel->getAggregatedMetrics($project['id'], $from, $to, $column) : array(),
'project' => $project,
- 'date_format' => $this->configModel->get('application_date_format'),
- 'date_formats' => $this->dateParser->getAvailableFormats($this->dateParser->getDateFormats()),
'title' => $title,
)));
}
@@ -169,8 +165,8 @@ class AnalyticController extends BaseController
$to = $this->request->getStringParam('to', date('Y-m-d'));
if (! empty($values)) {
- $from = $values['from'];
- $to = $values['to'];
+ $from = $this->dateParser->getIsoDate($values['from']);
+ $to = $this->dateParser->getIsoDate($values['to']);
}
return array($from, $to);