算法实现:计算公元后的星期数
int century = year/100;
int yearw = year%100;
int monthw = month;
if(monthw <3){
monthw += 10;
yearw --;
}
int week = (century/4 - 2*century + yearw + yearw/4 + 13*(monthw+1)/5 + day - 1)%7;
根据年月日计算星期几
最新推荐文章于 2021-03-22 19:22:15 发布