从品牌网站建设到网络营销策划,从策略到执行的一站式服务
function getNextMonthEndDate($date){ $firstday = date('Y-m-01', strtotime($date)); $lastday = date('Y-m-d', strtotime("$firstday +2 month -1 day")); return $lastday; } function next_month_today($date){ //获取今天是一个月中的第多少天 $current_month_t = date("t", strtotime($date)); $current_month_d= date("d", strtotime($date)); $current_month_m= date("m", strtotime($date)); //获取下个月最后一天及下个月的总天数 $next_month_end=getNextMonthEndDate($date); $next_month_t = date("t", strtotime($next_month_end)); $returnDate=''; if($current_month_d==$current_month_t){//月末 //获取下个月的月末 $returnDate=$next_month_end; }else{//非月末 //获取下个月的今天 if($current_month_d>$next_month_t){ //如 01-30,二月没有今天,直接返回2月最后一天 $returnDate=$next_month_end; }else{ $returnDate=date("Y-m", strtotime($next_month_end))."-".$current_month_d; } } return $returnDate; } echo $date="2016-01-27"; echo " "; echo next_month_today($date); echo "
";
咨询相关问题或预约面谈,可以通过以下方式与我们联系
成都网站建设公司地址:成都市青羊区太升南路288号锦天国际A座10层 建设咨询400-028-6601
成都快上网科技有限公司-四川网站建设设计公司 | 蜀ICP备19037934号 Copyright 2020,ALL Rights Reserved cdkjz.cn | 成都网站建设 | © Copyright 2020版权所有.
专家团队为您提供成都网站建设,成都网站设计,成都品牌网站设计,成都营销型网站制作等服务,成都建网站就找快上网! | 成都网站建设哪家好? | 网站建设地图