Ejemplo n.º 1
0
    public function testSetISODate()
    {
        $a = new DateTime("2009-12-12");

        $this->setExpectedException("Doctrine\Common\DateTime\ImmutableException");
        $a->setISODate(2010, 40);
    }
Ejemplo n.º 2
0
 /**
  * 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');
 }