/** * Compare the reciever with another date. If receiver is the same date as the * date it returns 0 if receiver is before the dat it returns 1 and if it's after the date * it returns -1 * * @param KDate $date * @return int */ public function compare(KDate $date) { $thisTimestamp = $this->getTimestamp(); $dateTimestamp = $date->getTimestamp(); return $thisTimestamp - $dateTimestamp; }