Dates, and what day of the week they fell on.

Is there a chart or formula to quickly find out what day of the week, say July 5th, fell on in any given year?

I have a hanging calendar, the cloth kind, that belonged to my grandmother, and was curious as to how often the dates and days of the week would match up.

Depends on what you mean by “quickly”, but yes, there are certainly formulas, some of which are even easy to memorize and to do in your head.

And your second question is even easier. Not counting phases of the moon, there are only 14 different calendars: The year can start on any one of seven days of the week, and it’s either a leap year or not. So if your grandma’s calendar is a non-leap year, it’ll be good for (on average) one out of every seven normal years, and if it’s a leap year, then it’ll be good for one out of every seven leap years.

There are 14 possible calendars - Jan 1 can be on any of the 7 days of the week, and it can be a leap year or a non-leap year. If you don’t cross a non-leap century, the calendars repeat in a 28 year cycle during which each leap year calendar appears once, and each non-leap calendar 3 times. Any given date other than Feb. 29 will appear 4 times on each weekday during that cycle.

Computationally, you basically want to add 365 days for each non-leap year you cross, and 366 for each leap year from a known starting point and take the result mod 7. Left as an exercise for the reader to code it efficiently.

The calendar was for 2002, not a leap year.

Now, I was born 12/31/54. I don’t remember ever asking what day of the week that was. How does on figure that out?

I take it that you have a 2002 calendar to refer to, and want to know the weekday in 1954. In 2002, December 31 was on a Tuesday. 1946 will be the same calendar because of the repeating 28 year cycles (2000 was a leap year, so the century didn’t screw us up) - now start working forward - 1947, it will be a Wednesday. 1948 it will be a Friday because it’s a leap year and you are after February. 1949 - Saturday, 1950 - Sunday, 1951 - Monday, 1952 - Wednesday (leap year), 1953 - Thursday, 1954 - Friday.

Or, in more compact form, I realize that the 58 year difference crossed 9 leap years, so we had 9366 + 49365 = 21179 days difference. 21179 modulo 7 = 4, so I have to go back 4 weekdays from Tuesday to Friday.

What you would really do if you were computing this, and not just using a bunch of tables, would probably be to implement something to convert a date into a count of days from a single fixed date that you knew, and simply use that modulo 7.

A 2002 calendar repeated in 2013. It’ll repeat again in 2019, 2030, 2041, 2047, 2058, 2069, 2075, 2086, and 2097.

Yes, not a leap year, so 3 times in a 28 year span. Note that it’s not at even spacing within that span - 11 year / 11 year / 6 year intervals. The exact pattern repeats at a 28 year period.

There are any number of websites that give similar information to 20th Century (1901-2000) Year Correlation and The World Almanac (among other such references) has pages with all the information you’re looking for.

If you type December 31 1954 (or any (at least semi-recent) date) into Google search, you’ll get a number of pages like

that will tell you the day of the week and other interesting things.

If you type a date like 1954/12/31 into cell A1 in Excel and =WeekDay(A1) into another cell, it will return a 6 telling you that day was the 6th day of the week. Note you cannot type =WeekDay(1954/12/31) into a single cell as it treats the date there as a division problem.

I myself coded a program to do this – in 80*86 Assembly Language! – once upon a time, way back when.

The formula, which I found somewhere, was not very simple. It had to take into account the differing lengths of all the months (which don’t precisely alternate 31/30/31/30… even aside from February), as well as leap-years, as well as the century years and the 4-century years. Messy. I don’t know of a simple formula, as Chronos says exists.

Given the formula, however, there is nothing particularly difficult about coding up a program to do it.

You can find such formulas on-line, presumably easily I would think. Hang tight a minute, I’ll see if I can find you a formula like the one I used. . . .

IIRC, Visual Basic lets you write a date enclosed in #…# punctuation marks, to make it unambiguously a date, e.g., #1954/12/31#

Given that MS Offics apps (including Excel) are all Visual Basic behind the scenes, can you use that syntax in the formulas you put in cells? Can you write =WeekDay(#1954/12/31#) ?

Okay, here’s a cite. Where else but Wikipedia?

Determination of the day of the week

Describes, in reasonable detail, a whole bunch of algorithms. Some require various table-lookups (the actual tables are given), and some don’t. I’m pretty sure the algorithm I used is Zeller’s Algorithm, or some variation of that. That computation essentially takes March 1 as the beginning of the “year”, thus putting the odd-ball February at the end of the year, with an adjustment for January and February dates. Some of the other formulas on the page work in more-or-less the same way.

Notice the strange coefficient 13/5 in one of the terms. The term comes out to a strange fraction, but then taking the integer part of that does the correct thing about some months having 30 days and some having 31. At least, IIRC, I think it’s that term that does this.

There seems to be a typo in the article: The definition of the variables shows one variable small-y and another variable Captial-Y, but the formula has small-y in two places instead.

Here’s another Wiki page discussing Zeller’s algorithm in more detail: Zeller’s congruence.

Actually, all you need are 7 calendars. On leap year day, you just go to the next calendar. You won’t have 29 Feb. on your calendar, but on 1 March you’re back on track.

I have 3 calendars up in my house, out of 21 that I own.

I didn’t say any of the formulas were simple; I said that some were easy to memorize. They’re still complicated, but they take advantage of mnemonic tricks to make the complication easier to remember.

That one I can actually answer. First place unless you cross a century year, not divisible by 400, the calendar repeats exactly every 56 years. Since 2000 is not such a year (being divisible by 400), the 1954 calendar is the same as the 2000 calendar. So you could figure it out by setting your computer calendar to 2000. But I happen to remember that New Year’s day 2000 was a Sunday. So New Year’s Day 2001 was a Tuesday (remember, 2000 was a leap year) so Dec. 31, 2000 was a Monday.

The calendar also repeats exactly every 400 years. The is because there are exactly 400 “extra days”, one for each year, together with 97 leap year days (because the 3 of the 100 leap years, the century days, have been omitted) and 497 is rather trivially divisible by 7. One of the odd results of this trivium (singular, I hope, of trivia) is that dates do not fall equally on all the days of the week. In particular, the 13th day of the month is slightly more likely to fall on a Friday than on any other day of the week.

Congratulations to your parents for arranging an extra tax exemption for the whole of 1954.

2000 - 1954 = 46, not 56. The 1954 calendar, by your logic, should be the same as the 2010 calendar.

And you have a poor memory

Yep, I was born less than two hours before midnight. I think my father was getting nervous.

My mother, the kindest and nicest person I know, said that while she was in labor, one junior nurse tried to cheer her up(father’s weren’t in the room then) by saying “Tonight is my birthday too!” Mom says she snarled “I don’t give a damn whose birthday it is!”:smiley:

Thanks for all the help everyone has given me on calculating days and dates. I’m going to bookmark this thread for a while so that I can review the information.

Here is a perpetual calendar that will let you match the day and date for any year back to 1583.

I have a world almanac that contains a perpetual calendar in the form of 14 calendars spread over two pages and a table to tell which calendar to use for any year from 1821-2080. And it confirms what has already been told here, that you were born on a Friday.