예제 #1
0
 public function testDaysinMonth()
 {
     $start = SimpleDateTime::createFromFormat("Y-m-d", "2000-01-30");
     $end = SimpleDateTime::createFromFormat("Y-m-d", "2000-02-05");
     $timeSpan = new TimeSpan($start, $end);
     $this->assertEquals(2, $timeSpan->getDaysInMonth(1));
     $this->assertEquals(4, $timeSpan->getDaysInMonth(2));
 }
예제 #2
0
 public function testGetYear()
 {
     $test = SimpleDateTime::createFromFormat("Y-m-d", "2000-01-01");
     $this->assertEquals(2000, $test->getYear());
 }