I have started my ZF2 application from Skeleton-Application. I want instance of Date class in one of my controller. I tried to search Date.php class under...
library\\Zend\\
but could not found. Does ZF2 has not Date.php at all or I need to palce it from somewhere else?
Zend_Date已被删除,转而使用PHP 5.3 DateTime API http://es.php.net/manual/en/book.datetime.php
Don't forget to call DateTime() in Zend Framework 2 like base class.
Like:
$date = new \DateTime($str);
where $str
is a string from which you create date object.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.