$year = 2010;
$month = 10;
Run Code Online (Sandbox Code Playgroud)
我如何获得上个月2010-09和下个月2010-11?
pok*_*oke 18
$date = mktime( 0, 0, 0, $month, 1, $year );
echo strftime( '%B %Y', strtotime( '+1 month', $date ) );
echo strftime( '%B %Y', strtotime( '-1 month', $date ) );
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
13283 次 |
| 最近记录: |