Exemplo n.º 1
0
 /**
  * @return DateTime
  */
 public static function now()
 {
     return new self(Date::now(), Time::now());
 }
Exemplo n.º 2
0
 public function testAddDay()
 {
     $this->assertEquals((new \DateTime())->setTime(0, 0, 0)->modify('1 day'), Date::now()->addDay(1)->getNative());
     $this->assertNotEquals((new \DateTime())->setTime(0, 0, 0)->modify('15 day'), Date::now()->addDay(1)->getNative());
 }