本文整理匯總了PHP中Zend_Date_DateObject::weekNumber方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Date_DateObject::weekNumber方法的具體用法?PHP Zend_Date_DateObject::weekNumber怎麽用?PHP Zend_Date_DateObject::weekNumber使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Zend_Date_DateObject
的用法示例。
在下文中一共展示了Zend_Date_DateObject::weekNumber方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testWeekNumber
public function testWeekNumber()
{
$date = new Zend_Date_DateObject();
$this->assertSame($date->weekNumber(2000, 1, 1), (int) date('W', mktime(0, 0, 0, 1, 1, 2000)));
$this->assertSame($date->weekNumber(2020, 10, 1), (int) date('W', mktime(0, 0, 0, 10, 1, 2020)));
$this->assertSame($date->weekNumber(2005, 5, 15), (int) date('W', mktime(0, 0, 0, 5, 15, 2005)));
$this->assertSame($date->weekNumber(1994, 11, 22), (int) date('W', mktime(0, 0, 0, 11, 22, 1994)));
$this->assertSame($date->weekNumber(2000, 12, 31), (int) date('W', mktime(0, 0, 0, 12, 31, 2000)));
$this->assertSame($date->weekNumber(2050, 12, 31), 52);
$this->assertSame($date->weekNumber(2050, 6, 6), 23);
$this->assertSame($date->weekNumber(2056, 1, 1), 52);
}