38 $value = $this->interval->invert ?
'-P' :
'P';
40 if ($this->interval->d > 0) {
41 $value .=
"{$this->interval->d}D";
44 if ($this->interval->s > 0 || $this->interval->i > 0 || $this->interval->h > 0) {
48 if ($this->interval->h > 0) {
49 $value .=
"{$this->interval->h}H";
52 if ($this->interval->i > 0) {
53 $value .=
"{$this->interval->i}M";
56 if ($this->interval->s > 0) {
57 $value .=
"{$this->interval->s}S";