Christmas day formula

Miscellaneous Forums/General Discussion/Christmas day formula

Hi all. I was a little bit challenged to create a system to find out what day Christmas falls on in any year given.

Here's how I did it. I had a few false starts that included trying to use the julian calendar etc etc.

The baseline is Christmas in 1990 falls on a Tuesday.

Here are the rules I came up with.

1. Every 90 years Christmas falls on a Tuesday. This makes it easy to get a starting point close to your target year. ( FALSE )

2. Every odd decade (ten years) gets 2 points if going backward in time and 1 point if going forward.

3. Every even decade (ten years) gets 1 point going backward in time and 2 points if going forward.

4. Christmas advances/rewinds either 1 or 2 days depending on whether it's a normal or leap year. (1 for normal, 2 for leap year)

Lets say you want to know what day Christmas falls on in 1944.

First you round up to 1950 and start counting using the point system up to 1990.

1950 = 2 points
1960 = 1 points
1970 = 2 points
1980 = 1 points
1990 = 2 points

Add up the points to get 8 points. Now advance that number of days from Tuesday and you get Wednesday. Now you know that in 1940 Christmas fell on a Wednesday.

Now apply the following rules for each year.

In odd tens (ie 1990) leap years fell on years 2 and 6.
In even tens (ie 1980) leap years fell on years 0, 4, and 8.

Since we're in 1940 (even) we'll be using 0,4,8.

Hence in 1940 Christmas fell on Wednesday. In '41 it was on Thurday, '42 on Friday, '43 on Saturday, so in 1944 (a leap year) Christmas fell on a Monday!

I crafted the formula so it could easily be done in your head and pretty fast...with some practice you could spew out the answer in seconds. This could be a great party trick!

This was pretty dang fun!

By weodo
This code will give you the correct weekday of any date between 1772 and 2099 !
'------------------------------- DOD (Day of date)
Function dod$(day,month,year) ' (DD,MM,YYYY)
Local d,a,m,y,tp$

a=14-month
a=a/12
y=year-a
m=month+(12*a)-2

d=(day+y+(y/4)-(y/100)+(y/400)+((31*m)/12)) Mod 7

Select d
 Case 0 tp$="Sunday "
 Case 1 tp$="Monday "
 Case 2 tp$="Tuesday"
 Case 3 tp$="Wednesday "
 Case 4 tp$="Thursday"
 Case 5 tp$="Friday "
 Case 6 tp$="Saturday " 
End Select

Return tp$			' Return day
End Function 


Yeah but when you walk into an office and say "hey gimme any year and I'll tell you what day of the week Christmas fell on" and 30 sec later you spit it out and they all go "holy crap"....I think pulling out a laptop to get the answer would kill the effect. :)

eep, shorter! Got rid of the whole Select-End Select block.
tp$=Trim$(Mid$("Sunday   Monday   Tuesday  WednesdayThursday Friday   Saturday ",d*9+1,9))


Untested tho, but I think it works. :P

So if I wanted to find out which day christmas is on in 2045 I would use the point system up to 2080?


I crafted the formula so it could easily be done in your head and pretty fast...with some practice you could spew out the answer in seconds. This could be a great party trick!


or you could simply go to better parties :)
<edit> In fact, this is probably the kind of thing that's stopping you being invited to those better parties in the first place.

@MattVonFat: exactly. Christmas falls on a tuesday in 2080. Then just use that as a start instead of 1990. And since 2080 (tens) start with an even number you would could 80 as 1 point, 2070 as 2 etc etc.

Here's how I would do it.

2080 = 1 point
2070 = 2 points
2060 = 1 point
2050 = 2 points
total = 6

Now add 6 days to Tuesday and you get Monday.

2045's leap years are 2040, 2044 and 2048. Advance 1 day for non-leaps years and 2 days for leap years.

2040 = Monday
2041 = Tuesday
2042 = Wednesday
2043 = Thursday
2044 = Saturday
2045 = Sunday

I haven't double check but according to my formula, Christmas should fall on a Sunday in 2045.

going to check.

Ok, seems I'm one day off. Lemme see what went wrong.

Ok...it seems Christmas doesn't fall on a Tuesday every 90 years. So that's one theory that is false.

In this case, gong forward in time...you'd have to still use 1990/Tuesday as a starting point.

So when going forward we just reverse certain rules. Odd decades get 1 point and even decades get 2 points when going forward in time. When going backward odd get 2 and even get 1.

Count up the points in the same manner but as you go up the odd decades count as 1 and even count as 2 (reversed).

1990 = 1
2000 = 2
2010 = 1
2020 = 2
2030 = 1
total = 7 points

Now rewind from Tuesday 7 days and you get Tuesday.

2040 = tues
2041 = wed
2042 = thur
2043 = fri
2044 = sun
2045 = mon

So my error was not reversing the points for odd/even decades. :)

http://www.hf.rim.or.jp/~kaji/cal/cal.cgi?2045

Actually 2045 is a bad test because it adds up to exactly 7 days so you can't tell if you had to rewind or advance.

Here's 2063:

1990=1
2000=2
2010=1
2020=2
2030=1
2040=2
2050=1
total=10

Advance 10 days from tuesday = friday
Rewind 10 days from tuesday = saturday

2060=friday
2061=sat
2062=sun
2063=mon

or

2060=sat
2061=sun
2062=mon
2063=tues

After checking it, the correct day is Tuesday. So we definitely REWIND when going forward in time.