首页天道酬勤PHP指定日期获取月份

PHP指定日期获取月份

admin 10-27 11:01 1148次浏览
//code
function getMonthsInRange($startDate, $endDate) {
$months = array();
while (strtotime($startDate) <= strtotime($endDate)) {
    $month = date('Y', strtotime($startDate))."-".date('M', strtotime($startDate));
    array_push($months,$month);
    $startDate = date('d M Y', strtotime($startDate.'+ 1 month'));
}
 
return $months;
}


SSH的​SpringMVC注解怎么使用
开启win10快速启动 测试 腾讯云负载均衡方法 http到https
相关内容