Ejemplo n.º 1
0
 /**
  * Test for getYear
  */
 public function testGetYear()
 {
     $locale = new Locale('de_AT');
     $date = new Date(1234567890, $locale);
     $d2 = new Date(1610101010, $locale);
     $date->setTimeZone(date_default_timezone_get());
     $d2->setTimeZone(date_default_timezone_get());
     $result = $date->getYear();
     $this->assertTrue($result instanceof Date);
     $this->assertSame('01.01.2009 05:00:00', $result->toString());
     $this->assertSame('01.01.2021 05:00:00', $d2->getYear()->toString());
 }