strtotime时间计算

strtotime时间计算

作者:LAMP小白  点击:1899  发布日期:2013-05-20 16:59:05  返回列表

计算出20个月前的时间戳

strtotime("-20 month")


但strtotime更有用的在这里,他的第二个参数可以传入用来计算时间的时间戳

于是会有这种好玩的连写


计算出字符20121220上20个月的字符串


date('Y-m-d', strtotime("-20 month",strtotime('20121220')) );




上一篇:rhel6安装php-mbstring 下一篇:快递查询API
0