year:00-99month:01-12day:01-31unsignedcharGetWeekFromDay(unsignedcharyear,unsignedcharmonth,unsigned
//year:00-99
//month:01-12
//day:01-31
unsignedcharGetWeekFromDay(unsignedcharyear,unsignedcharmonth,unsignedcharday)
{
if(month==1||month==2)
{
month+=12;
if(year>0)
year–;
else
year=4;
}
//回来星期几(星期一用1表明,而星期天用7表明)
return1+((day+2*month+3*(month+1)/5+year+year/4)%7);
}
声明:本文内容来自网络转载或用户投稿,文章版权归原作者和原出处所有。文中观点,不代表本站立场。若有侵权请联系本站删除(kf@86ic.com)https://www.86ic.net/ziliao/zhudong/257560.html