Subject: Day of the week
Date: Sat, 29 Mar 1997 21:51:37 -0500
From: Alexander Bogomolny

Haven't you placed yourself between the hammer and anvil?

Must tell you I saw formulae reminding of the one you cite (which is probably meaningless because the variables are not what one would expect - (y)ear, (m)onth, (d)ay.) I never was into this kind of things. Whatever the formula is it's trivial.

Think of what is involved. If there were no leap years, everything would be trivial, right? Just start somewhere (at the date you know) and cycle everything modulo 7 (since your formula lacks this operation, I suspect it's wrong.) Every year would have 365 days which is 1 modulo 7. In such a simpified case, if 3/29/97 is Saturday, then 3/29/96 was Friday while 3/29/98 will be Sunday.

Now because we do have leap years things are not that simple. Having sometimes 366 day years (=2 modulo 7) we'll have to add from time to time 2 instead of 1. How often? Every 4th year (this is where a term (y-1)/4 may come from.) But every hundredth year is not leap. So we should take back (y-1)/100. Among those that end in 00, every fourth is still leap. Thus we introduce the term (y-1)/400.

I do not believe you need anything deeper than the above. As I said, the formula is probably trivial.

Best regards

|Reply| |Up| |Exchange index| |Contents| |Store|

Copyright © 1996-2012 Alexander Bogomolny

 40615448

A math books store at a unique math study site. Shopping at the store helps maintain the site. Thank you.
Sites for teachers
Sites for parents
Terms of use
Awards
Interactive Activities

CTK Exchange
CTK Wiki Math
CTK Insights - a blog
Math Help
Games & Puzzles
What Is What
Arithmetic
Algebra
Geometry
Probability
Outline Mathematics
Make an Identity
Book Reviews
Stories for Young
Eye Opener
Analog Gadgets
Inventor's Paradox
Did you know?...
Proofs
Math as Language
Things Impossible
Visual Illusions
My Logo
Math Poll
Cut The Knot!
MSET99 Talk
Old and nice bookstore
Other Math sites
Front Page
Movie shortcuts
Personal info
Privacy Policy

Guest book
News sites

Recommend this site

Sites for parents

Education & Parenting

Search:
Keywords:

Google
Web CTK
Supported by
3wVentures