function getMonthEnd($month) { if(strlen($month) == 6){ $tmp = substr($month,0,4) .'-'. substr($month,4,2) .'-01'; }else{ $tmp = $month .'-01'; }
$tmp = strtotime("+1 month",strtotime($tmp)); return date("d",strtotime("-1 day",$tmp)); }