/** * Checks if given day exists in the set * @param Day $day * @return boolean */ public function has(Day $day) { if (isset($this->days[$day->getMonth()][$day->getDay()])) { return true; } return false; }
/** * Checks if day is earlier than another day * @param Day $day * @return boolean */ public function isEarlierThan(Day $day) { if ($this->getMonth() < $day->getMonth()) { return true; } elseif ($this->getMonth() == $day->getMonth()) { if ($this->getDay() < $day->getDay()) { return true; } else { return false; } } else { return false; } }