/** * @param Date $otherDate * @return bool */ public function isSameTime(Date $otherDate) { return $this->format('H:i:s') === $otherDate->format('H:i:s'); }
/** * @param Date $date * @return bool */ public function matches(Date $date) { return (bool) $this->toArray()[$date->format('D')]; }