X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/466c7825f8313f5e3a11c63383537c8bb302a932..c00312b6fe7c20acfe9cb61a75d16a110f815767:/WEB-INF/lib/DateAndTime.class.php diff --git a/WEB-INF/lib/DateAndTime.class.php b/WEB-INF/lib/DateAndTime.class.php index d960f008..4752e99f 100644 --- a/WEB-INF/lib/DateAndTime.class.php +++ b/WEB-INF/lib/DateAndTime.class.php @@ -287,27 +287,17 @@ class DateAndTime { } function isError() { - if ($this->mParseResult!=0) return true; + if ($this->mParseResult != 0) return true; return false; } - function getClone() { - if (version_compare(phpversion(), '5.0') < 0) { - $d = new DateAndTime($this->getFormat()); - $d->setTimestamp($this->getTimestamp()); - return $d; - } else { - return clone($this); - } - } - function before(/*DateAndTime*/ $obj) { - if ($this->getTimestamp()<$obj->getTimestamp()) return true; + if ($this->getTimestamp() < $obj->getTimestamp()) return true; return false; } function after(/*DateAndTime*/ $obj) { - if ($this->getTimestamp()>$obj->getTimestamp()) return true; + if ($this->getTimestamp() > $obj->getTimestamp()) return true; return false; } @@ -316,12 +306,6 @@ class DateAndTime { return false; } - function nextDate() { - $d = $this->getClone(); - $d->incDay(); - return $d; - } - function decDay(/*int*/$days=1) { $this->setTimestamp(@mktime($this->mHour, $this->mMinute, $this->mSecond, $this->mMonth, $this->mDate - $days, $this->mYear)); }