推理过程见 Zeller:
struct date
{
int year;
short month,day;
};
int zeller( struct date t )
{
if (t.month<3)
{
t.year = t.year - 1;
t.month = t.month + 12;
}
int c = t.year / 100;
int y = t.year % 100;
int ans = ( c/4 - 2*c + y + y/4 + (26*(t.month+1))/10 + t.day - 1 ) % 7;
if (ans>0) return ans;
else return ans+7;
}