[EMAIL PROTECTED] (Mark Jackson) wrote in message news:<[EMAIL PROTECTED]>... > > A: 42 > > Q: What multiple of 7 did I add to the critical expression in the Zeller > algorithm so it would remain nonnegative for the next few centuries?
What are you calling "the Zeller algorithm", and what is the "critical expression"? There _is_ something called "Zeller's congruence": if m is the month number in an adjusted or computational year (m == 0 => March, m == 11 => Feb), then the number of days in the adjusted year before month m is [Python notation] (13*m + 2) // 5 + m * 28 Alternatively (153*m + 2) // 5 I believe that strictly the term "Zeller's congruence" applies only to the (13*m + 2)//5 part. In any case, all of the above is quite independent of the year, and there is no possibility of going negative. I've no doubt you came across a stuffed-up date-to-days calculation routine and fixed it, but it's a bit unfair to lumber Zeller with the blame. If it was a days-to-date routine, then Zeller is not even standing next to the real target. Cheers, John -- http://mail.python.org/mailman/listinfo/python-list