From e67634b62b6d399342866a4bb45f8d175661e6ff Mon Sep 17 00:00:00 2001 From: Erik Thuning <boooink@gmail.com> Date: Tue, 23 Jul 2019 15:23:26 +0200 Subject: [PATCH] Removed the duration method and replaced with explicit methods to get start and end --- include/Inventory.php | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/include/Inventory.php b/include/Inventory.php index 6d45589..4efa501 100644 --- a/include/Inventory.php +++ b/include/Inventory.php @@ -91,19 +91,14 @@ class Inventory { return $this->id; } - public function get_duration($format = true) { - $style = function($time) { - return $time; - }; - if($format) { - $style = function($time) { - return gmdate('Y-m-d', $time); - }; - } - return array('start' => $style($this->starttime), - 'end' => $style($this->endtime)); + public function get_starttime() { + return $this->starttime; } + public function get_endtime() { + return $this->endtime; + } + public function get_seen_products() { $out = array(); foreach($this->seen_products as $prodid) {