如何获取给定月份后的月份名称。所以对于六月,我想要七月
我努力了:
$next_month = date('F',strtotime('June', "next month"));
这个显示一月,这显然是错误的,我要找的是七月。
那么我如何获得前一个月的数据呢?
我努力了
$prev_month = date('F',strtotime('June - 1 month'));
$next_month = date('F',strtotime('June + 1 month'));
or
$next_month = date('F',strtotime('June next month'));
edit
$next_month = date('F',strtotime('June last month'));
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)