php的strtotime('+1 month'),一个月的最后一天bug
php的strtotime(’+1 month’)函数,如果今天是1月31号,使用strtotime(’+1 month’)函数变成3月3号,而我的结果是想获得2月份最后一天的日期,也就是2月28号,下面这段代码可以解决这个bugif(date("d",strtotime("+1 month"))!=date("d")){//下个月总天数$lastDay = cal_days_in_mont...
原创
2019-01-29 23:03:36 ·
1728 阅读 ·
0 评论