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; }
时间: 2024-10-12 21:50:02
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; }