function firstSunday($DATE)
{
$date = strftime("%Y-%m",$DATE);
$day = trim(strftime("%e",$DATE));
for($day; $day <= '7'; $day++){
$dd = strftime("%A",strtotime($date.'-'.$day));
if($dd == 'Sunday'){
return strftime("%Y-%m-%d",strtotime($date.'-'.$day));
}
}
}