public function testSetISODate() { $a = new DateTime("2009-12-12"); $this->setExpectedException("Doctrine\Common\DateTime\ImmutableException"); $a->setISODate(2010, 40); }
/** * Compare two dates which each other for equality. * * @param DateTime $other * @return bool */ public function equals($other) { if (!$other instanceof \DateTime) { return false; } return $this->format('c e') === $other->format('c e'); }