加减一个月
可以获取多少月之前、或者之后的时间,避免出现加一个月,到底是30天,还是31天,这个函数会自己计算。
// 增加一个月
$next_month = strtotime('+1 month', time());
// 上个月
$befor_month = strtotime('-1 month', time());
可以获取多少月之前、或者之后的时间,避免出现加一个月,到底是30天,还是31天,这个函数会自己计算。
// 增加一个月
$next_month = strtotime('+1 month', time());
// 上个月
$befor_month = strtotime('-1 month', time());
评论 (0)