//当前日期
$start_date = date("Y-m-d",time());
//本月最后一天日期
$end_date = date('Y-m-d', strtotime("$start_date +1 month -2 day"));
//获得该时间段内所有日期列表
for($i = strtotime($start_date); $i <= strtotime($end_date); $i += 86400)
{
$ThisDate=date("Y-m-d",$i);
print $ThisDate.'<br/>';
}
php获得一段时间范围内日期列表
最新推荐文章于 2021-03-09 18:45:37 发布