My Autistic son does this in a couple of seconds. He can only really do the last 50 years tho. Savants who do this are called "human calendars".
Calculate the day of the week for any date in your head
21–30 of 68 posts
Re: Calculate the day of the week for any date in your head
#22Earlier 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.
Re: Calculate the day of the week for any date in your head
#23Re: Calculate the day of the week for any date in your head
#24Earlier quoted context omitted.
Did you read the whole thing?
No. As soon as the algo asserts "the last day of February is Thursday the 28th," and didn't explain how it knew 2019 wasn't a leap year or that the 28th was indeed a Thursday, I stopped reading.
Re: Calculate the day of the week for any date in your head
#25If not for religious groups, we could have had World Calendar and all this would be unnecessary: https://en.m.wikipedia.org/wiki/World_Calendar .
Re: Calculate the day of the week for any date in your head
#26Re: Calculate the day of the week for any date in your head
#27If 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?
It seems to me we go through life with little exceptional circumstances all the time, and go right back to normal pretty easily.
Is it that hard to imagine having a holiday not disrupting the weekly rhythm of your life? For example, there's a group I go to every Wednesday. But since Christmas and New Year's are both Wednesdays, it's being skipped two weeks in a row. On the other hand, if Christmas and New Year's "didn't count" then we could carry on without changing the schedule, getting in the way of other standing plans, etc.
Re: Calculate the day of the week for any date in your head
#28If not for religious groups, we could have had World Calendar and all this would be unnecessary: https://en.m.wikipedia.org/wiki/World_Calendar .
This would make the days of the week always cycle synchronously with the days of the month.
Then you have one day left over for New Years and that extra Leap Day every 4 years that your linked calendar proposes.
If you are going to redo something like a calendar, ending up still having different length months and weeks that drift against them seems like a non-victory.
Re: Calculate the day of the week for any date in your head
#29If not for religious groups, we could have had World Calendar and all this would be unnecessary: https://en.m.wikipedia.org/wiki/World_Calendar .
Re: Calculate the day of the week for any date in your head
#30Earlier quoted context omitted.
Yea nope. Leap days not having a weekday? How would that even work?
Instead of just dumping the first thought that comes through your head on us, could you explain why you think it wouldn't work? What issues do you see arising? It seems to me we go through life with little exceptional circumstances all the time, and go right back to normal pretty easily. Is it that hard to imagine having a holiday not disrupting the weekly rhythm of your life? For example, there's a group I go to eve…