If not for religious groups, we could have had World Calendar and all this would be unnecessary: https://en.m.wikipedia.org/wiki/World_Calendar .
Yea nope. Leap days not having a weekday? How would that even work?
Calculate the day of the week for any date in your head
41–50 of 68 posts
Re: Calculate the day of the week for any date in your head
#42If not for religious groups, we could have had World Calendar and all this would be unnecessary: https://en.m.wikipedia.org/wiki/World_Calendar .
Why does the week start on a Sunday in that calendar?
Do Americans, for example, feel like "a new week has started" on Sunday morning? For me Saturday and Sunday feel as one block, it's weird to imagine a separation in there.
But perhaps someone who grows up with that calendar feels like Saturday is end-of-the-week winding down, and Sunday is a start-of-the-fresh-week "warmup" day.
Re: Calculate the day of the week for any date in your head
#43Earlier quoted context omitted.
Got tricked during a CS course with this. I bet a lot of the people in that class will remember the full rule. It then came back on the final.
What do you mean, “tricked”? The method is original to me and I don’t think it has spread very far. Is there a Gregorian calendar year for which the GP algorithm gives the wrong result?
Re: Calculate the day of the week for any date in your head
#44For all but the most basic details my rule is that if I have to remember it, the system is broken. I know a small handful of passwords off the top of my head, a few email addresses, my wife's and my phone numbers, and the phone number of my home during childhood. (I'm obviously exaggerating, you know, for dramatic effect.) This trick requires so many mnemonic devices that it makes my head spin. It's still impressive…
At some point in my life, all of these seemed needlessly complex and arbitrary to me, but they don't anymore (at least unless I think too hard about them). I don't think about them unless I have to teach them to someone else, at which point I start thinking about how seriously broken they are.
I suppose that if I needed to get the day of the week from any date in history, and used this algorithm often enough, I'd eventually think of it as something I didn't have to memorize either.
Re: Calculate the day of the week for any date in your head
#45Earlier quoted context omitted.
What do you mean, “tricked”? The method is original to me and I don’t think it has spread very far. Is there a Gregorian calendar year for which the GP algorithm gives the wrong result?
The two methods are exactly - exactly - the same. Just different ways of phrasing. Don't fool yourself.
In what way do you believe that I am fooling myself?
Re: Calculate the day of the week for any date in your head
#46Earlier quoted context omitted.
You only need to remember 5 things: - For 2020, the doomsday is Saturday. All the dates below are doomsdays (So this year they are all Saturdays): - 4/4, 6/6, 8/8, 10/10, 12/12, easy enough - 9/5, 5/9, 7/11, 11/7 (9-to-5 at 7-11) - 0th of March (last day of February) - 3rd of January for non-leap years, and 4th of January for leap years. So this year the 4th is Saturday. And to calculate dates: mod 7. So e.g. 7th of…
You can skip the leap year info completely if you consider both January and February as belonging to the previous year. That makes sense as the additional day (Feb 29) is at the end of Februry. Last year Pi Day was Thursday, this year Saturday. So the general rule then is: March 14th, April 4th, May 9th, June 6th, July 11th, August 8th, September 5th, October 10th, November 7th, December 12th, January 2nd, February 6…
Re: Calculate the day of the week for any date in your head
#47Earlier quoted context omitted.
The two methods are exactly - exactly - the same. Just different ways of phrasing. Don't fool yourself.
The standard method and mine give the same result, and I believe that mine is simpler to carry out in your head. In what way do you believe that I am fooling myself?
Re: Calculate the day of the week for any date in your head
#48Earlier quoted context omitted.
The standard method and mine give the same result, and I believe that mine is simpler to carry out in your head. In what way do you believe that I am fooling myself?
Not so much as fooling yourself, but I agree with the OP your method isnt really 'original' in the sense that it's indeed exactly the same as the 'standard' one, just a tad different in how you explain the math. E.g. 'if not ending in 00 throw away...' is really just the same thing as 'except when divisable by 100'.
Re: Calculate the day of the week for any date in your head
#49Earlier quoted context omitted.
To go from "any" century, you can also memorize "2053", which is the days in a 4-year cycle: 2000 = 2 = tuesday; 2100 = 0 = sunday; 2200 = 5 = friday; 2300 = 3 = wednesday. For years other than the centuries, we need to add an offset. Given the year CCXX, we have: (a, b) = divmod(XX, 12) c = b // 4 offset = a + b + c doomsday = start + offset E.g., for 2020 (XX == 20) we get: start = 2 # from the "2053" rule (a, b) =…
The "add 11" trick in my comment is easier to remember and apply than dividing by 12 and taking remainders.
With both divide by 12 and odd 11, I would find myself occasionally making a goof when dealing with years near the end of centuries.
Re: Calculate the day of the week for any date in your head
#50Earlier quoted context omitted.
You can skip the leap year info completely if you consider both January and February as belonging to the previous year. That makes sense as the additional day (Feb 29) is at the end of Februry. Last year Pi Day was Thursday, this year Saturday. So the general rule then is: March 14th, April 4th, May 9th, June 6th, July 11th, August 8th, September 5th, October 10th, November 7th, December 12th, January 2nd, February 6…
But why do you call them Pi-Days? Pi Day is 3/14 because that's somewhat similar to 3.14, which is Pi to 3 significant digits..