php strtotime 获取上一个月或下一个月的坑

在平时的业务逻辑中经常会遇到用strtotime('last month')或strtotime('-1 month') 获取上一个月, strtotime('next month')或strtotime('+1 month') 获取下一个月 但是在月末,如果前后两个月的天数不一样多,用strtot
posted @ 2019-10-31 19:40  钻牛角尖儿  阅读(2429)  评论(0编辑  收藏  举报