PHP的日期和时间帮助(如Java中的Joda-Time) [英] Date and Time helper for PHP (like Joda-Time in Java)
问题描述
我正在寻找一个图书馆(开源),例如 Joda-Time Java世界。有没有这样的图书馆?
I am looking for a library (open source) like Joda-Time in the Java world. Is there any library like that?
Joda-Time非常有助于计算日期和时间。我可以添加几天,几周,一个月,一年,也可以方便地转换日期和时间。
Joda-Time is very helpful to calculate date and time. I can add days, weeks, month, year and also can converting date and time easily.
我希望有像Joda-Time for PHP这样的图书馆。
I wish there is library like Joda-Time for PHP.
编辑:我需要一些Joda-Time中可用的功能,如daysBetween(计算2个日期之间的天数),monthBetween和weeksBetween之间...
有些添加功能并且可以从PHP本身获得减法日期。
I need some functions that available in Joda-Time like daysBetween (to calculate number of days between 2 date), monthsBetween and weeksBetween ... Some functions about add and substract date is available from PHP itself.
推荐答案
这是您要查找的内容: https://github.com/briannesbitt/Carbon
This is what you are looking for : https://github.com/briannesbitt/Carbon
这篇关于PHP的日期和时间帮助(如Java中的Joda-Time)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!