|
|
Scott Cram![]() Inner circle 2678 Posts ![]() |
Back in 2009, Bob Goddard posted an interesting day for any date algorithm he dubbed the "First Sunday Doomsday Algorithm": http://firstsundaydoomsday.blogspot.com/......ide.html
It's interesting for several reasons, not the least of which is that it can easily handle Julian dates all the way back to 1 AD, as well as Gregorian dates! I did find a quicker way to get through step 1, which concerns the last 2 digits of the year. I think this is quicker than his approach: a) Break the year into an addition problem, consisting of the most recent leap year, a plus sign, and the time since the most recent leap year (at this stage, 00 years are always considered leap years). For example, 91 would be turned into the problem (88+3), 68 would be turned into (68+0), and 45 would be turned into (44+1). (It turns out that splitting numbers into addition problems makes many math tricks easier. I wrote about this in more detail recently on my blog: http://headinside.blogspot.com/2013/07/m......ier.html ) b) Starting from the addition problem you created in step a, divide the leap year number by 2, and change the plus sign to a minus sign, and perform this new operation. For example, (88+3) becomes (44-3), which is 41. (68+0) becomes (34-0), which is 34. (44+1) becomes (22-1), which totals 21. c) Take the total from step b, and subtract the largest multiple of 7 which is equal to or less than that total. From 41, we subtract 35, because 35 is the largest multiple of 7 equal to or less than 41. 41-35=6, so that's our total for step 1 of Bob Goddard's approach. With 34, we'd do 34-28=6. For 21, we'd do 21-21=0. If you're familiar with modular arithmetic, step c is just calculating the number mod 7. 41 mod 7? 6. 34 mod 7? 6. 21 mod 7? 0. Once you have a number from 0 to 6 at this stage, you continue from step 2 of Bob Goddard's algorithm at the link above. Here are all the years from 00 to 99 run through this formula in Wolfram|Alpha: http://tinyurl.com/lh2zcyy Any thoughts on this approach? I'd love to hear them! |
hcs![]() Special user Germany, Magdeburg 537 Posts ![]() |
Dear Scott,
let me comment your finding: I mentioned this methode in my book "Encyclopedia of the Day of Week Calculation" in chapters "Komplement-Methode" and "2er Doomsday". (see p.60 and p.81 in v.1.20 from Feb. 2011 that you got from me). Of course my german text is difficult to understand but I'm sure that you will catch the examples given by me. Maybe this method goes back to W.W. Durbin: „The Linking Ring, VI“; August 1927 but I couldn't find this article! It would be fine if someone can help! In April 2011 I also described this methode in my comment to Bob Goddards blog: http://www.blogger.com/comment.g?blogID=......12123249 BTW: I will sent to you the actuelle third revised edition of my Encyclopedia. (see pp. 68 and 89/90) Best regards Hans-Christian |
hcs![]() Special user Germany, Magdeburg 537 Posts ![]() |
I wrote "Maybe this method goes back to W.W. Durbin: „The Linking Ring, VI“; August 1927".
I'm sure that the origin of the "complement methode" is this article: E. Rogent, W. W. Durbin: „How to find the day of the week on which any particular date falls”, The Linking Ring, Vol. 6“; August 1927. BTW: The actuelle edition of my encyclopedia is the second revised edition not the third edition. |
stanalger![]() Special user St. Louis, MO 998 Posts ![]() |
|
hcs![]() Special user Germany, Magdeburg 537 Posts ![]() |
Al,
thank you very much for sharing this link. I could not find it by a search. HCS |
The Magic Cafe Forum Index » » Magical equations » » Bob Goddard's Day For Any Date Algorithm (0 Likes) |
[ Top of Page ] |
All content & postings Copyright © 2001-2025 Steve Brooks. All Rights Reserved. This page was created in 0.03 seconds requiring 5 database queries. |
The views and comments expressed on The Magic Café are not necessarily those of The Magic Café, Steve Brooks, or Steve Brooks Magic. > Privacy Statement < ![]() ![]() ![]() |