$stimestamp = 1609430400;
$etimestamp = 1640966399;
// 计算日期段内有多少天
$days = ($etimestamp-$stimestamp)/86400+1;
// 保存每天日期
$date = array();
for($i=0; $i<$days; $i++){
$date[] = date('Y年m月d日', $stimestamp+(86400*$i));
}
return $date;
//获取上个月的时间
$begin_ago_time = date('Y-m-01 00:00:00',strtotime('-1 month'));
$end_ago_time = date("Y-m-d 23:59:59", strtotime(-date('d').'day'));
获取某年内每天的日期
最新推荐文章于 2022-08-30 22:56:06 发布