|
|
@ -29,11 +29,10 @@ class Duration {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function __toString () {
|
|
|
|
public function __toString () {
|
|
|
|
return $this->getDays()->asRelativeWhole() . ' '
|
|
|
|
return $this->getDays()->asRelativeWhole() . ' '
|
|
|
|
. $this->getHours()->asRelativeWhole() . ':'
|
|
|
|
. str_pad($this->getHours()->asRelativeWhole(), mb_strlen($this->getHours()->getUnitMax()), '0', STR_PAD_LEFT) . ':'
|
|
|
|
. $this->getMinutes()->asRelativeWhole() . ':'
|
|
|
|
. str_pad($this->getMinutes()->asRelativeWhole(), mb_strlen($this->getMinutes()->getUnitMax()), '0', STR_PAD_LEFT) . ':'
|
|
|
|
. $this->getSeconds()->asRelativeWhole() . '.'
|
|
|
|
. str_pad($this->getSeconds()->asRelativeWhole(), mb_strlen($this->getSeconds()->getUnitMax()), '0', STR_PAD_LEFT) . '.'
|
|
|
|
. $this->getMilliseconds()->asRelativeWhole()
|
|
|
|
. str_pad($this->getMilliseconds()->asRelativeWhole(), mb_strlen($this->getMilliseconds()->getUnitMax()), '0', STR_PAD_LEFT);
|
|
|
|
. $this->getMicroseconds()->asRelativeWhole();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Convert duration to user friendly string
|
|
|
|
* Convert duration to user friendly string
|
|
|
|