PHP DateTime class just like v5.3 for PHP 5.2

做~自己de王妃 提交于 2019-12-08 05:11:04

问题


I've found a few problems in applications I've been doing where methods like DateTime::diff would be of much assistance, but my host with PHP 5.2 does not support DateTime::diff or any other from 5.3.

Can anyone point to a class implementation similar to PHP's DateTime class from v5.3, but working for PHP 5.2?

Thanks in advance


回答1:


I use following wrapper class in my php5.2 apps: http://pastebin.ca/2051944. Untill php5.3 was released - it saves much my time



来源:https://stackoverflow.com/questions/5834497/php-datetime-class-just-like-v5-3-for-php-5-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!