PHP2008. 11. 5. 16:26

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));
}

Posted by 아마데우스