/** * Returns a string describing this object. * * @return string a string for debugging, not null */ public function __toString() { $buf = "TransitionRule[" . ($this->offsetBefore->compareTo($this->offsetAfter) > 0 ? "Gap " : "Overlap ") . $this->offsetBefore . " to " . $this->offsetAfter . ", "; if ($this->dow != null) { if ($this->dom == -1) { $buf .= $this->dow . " on or before last day of " . $this->month; } else { if ($this->dom < 0) { $buf .= $this->dow . " on or before last day minus " . (-$this->dom - 1) . " of " . $this->month; } else { $buf .= $this->dow . " on or after " . $this->month . ' ' . $this->dom; } } } else { $buf .= $this->month . ' ' . $this->dom; } $buf .= " at " . ($this->timeEndOfDay ? "24:00" : $this->time) . " " . $this->timeDefinition . ", standard offset " . $this->standardOffset . ']'; return $buf; }