本文整理汇总了PHP中Zend\Date\Date::toArray方法的典型用法代码示例。如果您正苦于以下问题:PHP Date::toArray方法的具体用法?PHP Date::toArray怎么用?PHP Date::toArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend\Date\Date
的用法示例。
在下文中一共展示了Date::toArray方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testArrayVerification
/**
* ZF-6457
*/
public function testArrayVerification()
{
$date = new Date\Date();
$array = $date->toArray();
$this->assertTrue($this->_validator->isValid($array), "array expected to be valid");
}
示例2: testToArray
public function testToArray()
{
$date = new Date('2006-01-02 23:58:59', Date::ISO_8601, 'en_US');
$return = $date->toArray();
$orig = array('day' => 02, 'month' => 01, 'year' => 2006, 'hour' => 23, 'minute' => 58, 'second' => 59, 'timezone' => 'MVT', 'timestamp' => 1136228339, 'weekday' => 1, 'dayofyear' => 1, 'week' => '01', 'gmtsecs' => 18000);
$this->assertEquals($orig, $return);
}