C++ 根据日期判断星期几
int CaculateWeekDay(int y,int m, int d) { if(m==1||m==2) { m+=12; y--; } int iWeek=(d+2*m+3*(m+1)/5+y+y/4-y/100+y/400)%7; return iWeek + 1; }
int CaculateWeekDay(int y,int m, int d) { if(m==1||m==2) { m+=12; y--; } int iWeek=(d+2*m+3*(m+1)/5+y+y/4-y/100+y/400)%7; return iWeek + 1; }