diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-08-31 21:32:29 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-08-31 21:32:29 -0400 |
commit | 1b6b1cc5e6e26a3e3081cdd9613508a66c3751ee (patch) | |
tree | 10a791ad38fc73f642dff26d1a88223de6abed7c /app/Core/DateParser.php | |
parent | 0cb717f4407b81868d6b909d1d4ef4795c5e4b50 (diff) |
Time spent for subtasks are not rounded too the nearest quarter anymore
Diffstat (limited to 'app/Core/DateParser.php')
-rw-r--r-- | app/Core/DateParser.php | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/app/Core/DateParser.php b/app/Core/DateParser.php index 5d770241..b9aa9230 100644 --- a/app/Core/DateParser.php +++ b/app/Core/DateParser.php @@ -239,23 +239,11 @@ class DateParser extends Base */ public function getHours(DateTime $d1, DateTime $d2) { - $seconds = $this->getRoundedSeconds(abs($d1->getTimestamp() - $d2->getTimestamp())); + $seconds = abs($d1->getTimestamp() - $d2->getTimestamp()); return round($seconds / 3600, 2); } /** - * Round the timestamp to the nearest quarter - * - * @access public - * @param integer $seconds Timestamp - * @return integer - */ - public function getRoundedSeconds($seconds) - { - return (int) round($seconds / (15 * 60)) * (15 * 60); - } - - /** * Get ISO-8601 date from user input * * @access public |