The_Piper Report post Posted July 2, 2008 (edited) I found this today by accident, here is the detailled explanation, which gave me a good headache, lol http://en.wikipedia.org/wiki/Doomsday_rule And now an easier explanation and some examples Doomsday Doomsday is the last day of February. If you know what day of week Doomsday is, you can easily count back and forth and find out, which day of week any day of this year is. Ok, counting from February to December just to find out which day of week Christmas is, might be a little bit boring. Lets say, Doomsday is a Monday. And there are more mondays in a year than just one. Even some very easy to remember dates. Like 4./4., 6./6., 8./8., 10./10., 12./12. Plus, easy to remember with this sentence "I work from 9 to 5 at the 7-11.": 5./9., 9./5., 7./11, 11./7. Since February is the only month affected by leap years (28 or 29 days), all days in a year after February have a static distance to the last day in February, the Doomsday. So the above dates are *ALWAYS* the same day of week than Doomsday is in every year! The remaining Doomsdays are: January, 3rd (4th, if in a leap year) March zero (meaning, its 7th, 14th, 21th, 28th) So this is the table you should know by heart, one Doomsday for every month, all the same day of week as the original Doomsday (end of February) is: Table 1 January, 3rd (4th in a leap year)February, last day (28th, 29th in a leap year) <== the original Doomsday March zero (7th, 14th, 21th, 28th) April, 4th May, 9th (9 to 5!!) June, 6th July, 11 (7-11!!) August, 8th September, 5th (9 to 5!!) October, 10th November, 7th (7-11!!) December, 12th Second table you have to learn by heart is the corresponding "starting" day of week for every century. I give you 4, that should be enough to show off and calculate the birthdays for your friends Table 2 Century = 21 -> SundayCentury = 20 -> Tuesday Century = 19 -> Wednesday Century = 18 -> Friday [Edit] Why only 400 years? After 400 years, the order of days of week starts again. This happens all 400 years, so if you have to calculate the day of week for the 21.06.2408, just add or subtract 400 years until the date fits into the time frame from 1800-2199. So for calculating a date in 2408, subtract 400 years and youre back in the year 2008. So century = 20, doomsday starts with Wednesday. So you can calculate all dates for the Gregorian Calendar just by adding/subtracting 400 from the year. Now lets calculate and travel through time. Example: Today, 3rd July 2008 (Thursday) Century is 20, so Doomsday starts with Tuesday. Now lets travel through time, we take the year (08) and calculate 3 simple things: 1. How often does 12 fit in the year (08)? 0 2. Whats the difference between the result (0x12=0) and the year (08)? 8 3. How often does 4 fit into the difference (8)? 2 Ok, now lets add the 3 results, 0+8+2=10 A week has 7 days, so lets calculate 10 MODULO 7 = 3 And thats it, Doomsday must travel 3 days forwards from Tuesday over Wednesday (+1), Thursday (+2) to Friday (+3). So Doomsday, last day in February in the year 2008 is a Friday. The corresponding Doomsday in July is 11th. So July, 11th is a Friday too. 11-7 (one week before) = 4. So July 4th is a Friday too. And one day back to today, July 3rd is a Thursday Example: 17.02.1875 (Wednesday) Century is 18, so Doomsday starts with Friday. The year is 75, so: 1. How often does 12 fit into 75? 6 times, 6x12=72. Remember 6 2. Difference between 6x12=72 and year (75)? 3, remember 3 3. How often does 4 fit into the difference (3)? 0, remember 0 6+3+0 = 9. 9 MODULO 7 = 2, so Doomsday moves from Friday to Sunday. Doomsday for February is the last day in February. Is 1875 a leap year? 1875 / 4 = 468.75 *meep* false 1872 / 100 = 18,72 *meep* false 1872 / 400 = 4,68 *meep* false so it is not a leap year and February has 28 days. So, February 28th 1875 is a Sunday. one week back, February 21th 1875 is a Sunday. 4 days back to 17th is a Saturday(20th), Friday(19th), Thursday(18th), Wednesday(17th) Bingo Quite easy and funny, isnt it? Piper [Edit] typos >.< Edited July 3, 2008 by The_Piper Share this post Link to post Share on other sites
villekPL Report post Posted July 2, 2008 how to easily calculate the day of week right..... Share this post Link to post Share on other sites
The_Piper Report post Posted July 3, 2008 C'mon, dont say its too hard for you to learn 2 simple tables, do 3 calculations and one addition and then count back and forth to a given date.. I guess, i can even train my ficus to do that <SCNR> Piper Share this post Link to post Share on other sites