php计算星期几


0?(5+($year+1)+($year-1)/4-($year-1)/100+($year-1)/400)%7:(5+$year+$year/4-$year/100+$year/400)%7;
$week = $month>2?($week+2*($month+1)+3*($month+1)/5)%7:($week+2*($month+2)+3*($month+2)/5)%7;
if (($year%4==0 && $year%100 !=0 ) || $year%400 ==0 && $month >2 )
{
$week =($week+1)%7;
}
$week=($week+$day)%7;
echo $arr[$week];
}
else
echo “错误”;
?>



发表评论

电子邮件地址不会被公开。 必填项已用*标注

− 9 = 1