distance_of_time_in_words 疯了!
distance_of_time_in_words(strtotime(2010-08-07), strtotime(2010-08-01))
返回“6 分钟”
$a = '2010-08-02 00:39:29'
$b = '2010-08-01'
distance_of_time_in_words($a, $b)
返回“不到一分钟
$a = '2010-08-02 00:39:29'
$b = '2010-08-01 20:08:00'
distance_of_time_in_words($a, $b)
” 返回“不到一分钟”
我想知道我在转换中是否出错了。它接受时间戳或日期吗? 谢谢
distance_of_time_in_words(strtotime(2010-08-07), strtotime(2010-08-01))
returns '6 minutes'
$a = '2010-08-02 00:39:29'
$b = '2010-08-01'
distance_of_time_in_words($a, $b)
returns 'less than a minute'
$a = '2010-08-02 00:39:29'
$b = '2010-08-01 20:08:00'
distance_of_time_in_words($a, $b)
returns 'less than a minute'
I wonder if I'm going wrong in the conversion.. Does it accept a timestamp or date?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
检查它的源代码似乎它需要时间戳(它在函数开始时进行一些计算)。
Checking it's source code it seems it needs timestamps (it does some calculations at the beginning of the function).
希望这对其他人有帮助!
Hope this will help others!