0
可能显示的文件日期时间:: DIFF():
What can use for DateTime::diff() for PHP 5.2 ?
Getting the difference between two time/dates using php?PHP:在5.2
嗨,
我有使用此功能:日期时间:: DIFF ()
但这个功能只能工作h 5.3。
也许有人有与5.2工作相同的功能?
感谢
可能显示的文件日期时间:: DIFF():
What can use for DateTime::diff() for PHP 5.2 ?
Getting the difference between two time/dates using php?PHP:在5.2
嗨,
我有使用此功能:日期时间:: DIFF ()
但这个功能只能工作h 5.3。
也许有人有与5.2工作相同的功能?
感谢
用户贡献笔记date_diff()
(看起来总是有第一次,通常还有点意思)offer an alternative。
我没有用过它,但它看起来没问题。它使用时间戳进行比较,因此您将无法处理日期为< 1970或> 2038的日期。
你在这里搜索过吗? http://stackoverflow.com/search?q=php+time+difference – 2010-11-10 10:54:41
这是刚刚问了2个星期前:[什么可以用于PHP 5.2 DateTime :: diff()?](http://stackoverflow.com/questions/4033224/what-can-use-for-datetimediff-for-php-5-2) – BoltClock 2010-11-10 10:55:13
@Felix,一个是要求基于时间戳的比较,而不是'DateTime' – 2010-11-10 11:04:30