One day I learnt how to calculate the the day of the week for any date, and thereafter one of my favourite tricks has been to ask people the date of their birth and proceed to inform them which day of the week it was. The method is fairly simple, given that I'm good at mental arithmetic.
The formula is as follows:
( Year number + (Year number / 4) + Month number + Day number ) mod 7
Year number is the actual number of the year minus 1900. Thus 1980 will be 80, while 2015 will be 115. When you take a quarter of the year number, round down.
Month number requires a bit of memory: There's a different number for each month:
J F M A M J J A S O N D
0 3 3 6 1 4 6 2 5 0 3 5
This is easy for me to remember: My phone number used to begin with 336, 5035 is a postcode, and there's an 0 for October. My friend found a way to learn the numbers by seasons (according to the way seasons are designated in Australia). Spring and summer are both 503, autumn is 361 and winter is 462.
Day number is just which day of the month.
"mod 7" means the remainder when the total is divided by seven, ie subtract all the multiples of 7 you can, leaving you a result of 0-6.
This number then gives you the day of the week:
0 1 2 3 4 5 6 S M T W T F SAgain this is easy to remember, because "Mon", "Tue" and "Fri" sound similar to 1, 2 and 5.
Thus for Colin's date of birth, 21st June 1982, we calculate it thus:
Year number is 82.
Quarter of year number is 20. 82 + 20 = 102.
Month number for June is 4. 102 + 4 = 106.
Day number is 21. 106 + 21 = 127.
127 mod 7 = 1.
2 corresponds to Monday, so 21st June 1982 was a Monday.
Another rule which mustn't be left out is that in the first two months of a leap year (any year divisible by 4), you must subtract 1 from the total.
Another helpful trick is that you can subtract any multiple of 28 from the year number before applying the formlua. Thus 1900, 1928, 1956, 1984, 2012, etc all reduce to zero, and you can start with a year number no higher than 27.
Enter a date (1901-2099): Calculate
After you click Calculate, the answer will appear here.
More background for those who are interested
One day my auntie told me about an autistic man who would hang around a shopping centre, asking passers by to name a date, and he would tell them what day that was or would be. I decided that that would be a good trick to learn myself. Here's how I went:
Firstly, whatever formula would be used would include the day number and have a mod 7 at the end.
You may have noticed that any given date will move forward by one day in the week each year, or two in a leap year. (Eg my birthday in 2001 was Sunday, in 2002 it was Monday, in 2003 it was Tuesday and in 2004 it was a Thursday). There are 365 days in a non-leap year, which is 52 weeks and one day, making the date the following year 52 weeks and one day later (or two in the case of a leap year.
Because of this, we add into our formula the number of years since 1900 and also the number of leap years since 1900; as leap years are every year divisible by 4, we can use a quarter of the year number for this.
The only thing left to put in the formula at this point it the month number. Having decided that I wanted Sunday to by 0 (to allow 1=Mon, 2=Tue, 5=Fri), I tried a few dates I knew to make sure I had the correct month numbers. Months with the same month number, eg November, March and February (in non-leap year), will have the same calendar (apart from number of days), and you may have noticed if you notice things like when the first of a particular day is on the 1st, or Friday 13ths, or such like.
If the date is in the first two months of a leap year, then the quarter of the year number includes the one for the 29th Feb in that year, which has not actually been yet, so one must be subracted in such cases (even if it is the 29th Feb).
Because the calendar is the same every 28 years (because they will always contain 7 leap years), we can take a short cut by subtracting multiples of 28 from the year number. The first time that I showed my trick off heavily was at the schoolies festival in 2002, where a majority of the people were born in 1984, which reduces to zero, making my calculation much quicker. Sometimes I use this simplification even when it puts the number below 0, eg 1981 can be reduced to -3. Remember of course that the quarter of that must round down (ie -1, not 0).
My other trick that often rides side by side with this one is to ask someone (from Adelaide) in which suburb they live, and tell them the postcode. But that's purely a memory trick rather than arithmetic, and it can't be taught.
Other stuff about leap years
To keep the seasons occurring at the same time every year, we need to have an average of about 365.24 days in each year. Because this is so close to a quarter, we make every fourth year a leap year. (If it had turned out a different fraction, it could have been a more complicated rule.) The only exceptions are in some century years: Every century which isn't a multiple of 400 is not a leap year. 2000 was a leap year although 1900 wasn't, nor will 2100 be. So the "every four years" rule works for the whole of the 20th and 21st centuries, which includes the whole of my lifetime and most likely that of anyone reading this, so I don't have to incorporate century rules into my trick. Also significant is that the entire computer era as we know it fits into these two centuries, so that computers have been able to use a simple rule unless they are concerned with dates in other centuries.
And if you're wondering about leap seconds, that's a different astronomical issue. A second was calculated by taking the average day (earth rotates once) and dividing it into hours, then minutes, then seconds. At some stage it was officially defined as the time for a certain number of vibrations of an electron in a certain kind of atom. The earth has been rotating a tiny bit slower, so occasionally we throw in an extra second. Thus a leap year (a year with an extra day) makes the years average the right length, so summer always comes at the same time, while a leap second (an extra second in a day) makes our days average the right length, so midday continues to come at the same time.