Removed the duration method and replaced with explicit methods to get start and end

This commit is contained in:
Erik Thuning 2019-07-23 15:23:26 +02:00
parent a412256598
commit e67634b62b

@ -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) {