示例#1
0
 public function testFirstOfMonth()
 {
     $dt1 = new QDateTime("2/23/2009");
     $this->assertEqual($dt1->FirstDayOfTheMonth, new QDateTime("2/1/2009"));
     $dt2 = new QDateTime("12/2/2015");
     $this->assertEqual($dt2->FirstDayOfTheMonth, new QDateTime("12/1/2015"));
     // static function test
     $this->assertEqual(QDateTime::FirstDayOfTheMonth(1, 1923), new QDateTime("1/1/1923"));
 }