/** * New method to get the difference in days the stored date * @param Date The date to compare to * @author Andrew Eddie <*****@*****.**> */ function dateDiff($when) { return Date_calc::dateDiff($this->getDay(), $this->getMonth(), $this->getYear(), $when->getDay(), $when->getMonth(), $when->getYear()); }
/** * New method to get the difference in days the stored date * @param Date The date to compare to * @author Andrew Eddie <*****@*****.**> */ public function dateDiff($when) { if (!is_object($when)) { return false; } return Date_calc::dateDiff($this->getDay(), $this->getMonth(), $this->getYear(), $when->getDay(), $when->getMonth(), $when->getYear()); }