Alas, I wrote in my diary with a pen. I will have to turn the pages 90 degrees and write at right-angles. But having said that, I do keep calendars and diaries. This could actually work for me. As a humour point. An obsessional diary of the films I saw in London in 1985/6 would make a poignant backdrop to my current diarizing of more humdrum daily existence in 20xx
The OP might be using "diary" the way some people use "planner," a notebook that comes hard-coded with days of week, date, and month written at the top of a given page
Presumably this planner/diary has text in it that would be confusing to write beneath. One's messages from 1983 or whatever would conflict with the ones you're writing that are applicable to 2020.
If you turn it upside down, you know to only read text that's "right side up" when the notebook is upside down.
You are almost right. By turning 90 degrees, I am writing ACROSS the old words, not upside-down with respect to the old words. It becomes a cross-hatch.
Writing across, is how in the old days, people used to reply to letters. Didn't always work well for joined-up writing but worked well-enough.
The Diary was days-of-the-week. So, the same semantic intent as for a calendar wired to a specific year. I need monday to be the "right" monday.
Yes! I love this! I once wrote a Python script for this same purpose. Thinking about that problem really gave me much more familiarity with the ins and outs of the Gregorian calendar.
I did something similar with perl and my university's bus schedule. I find those kind of simple, probably over-engineered projects where the time put in probably isn't worth it[1] to be really useful ways for learning something like times or dates far better than reading about it would.
At the very least it made sure I always knew how many days each month had!
I wouldn't be surprised if it was just a for loop checking for all the years in a range, whether they start on the same day of week, and are/are not leap years :)
The calculations are actually really easy. Note that the length of a (regular) year is 1 mod 7, which means weekdays slip by 1 day each year, except for leap years. Over the 400-year Gregorian calendar cycle, there are 97 leap years, for a total of 497 days of slip... so adding 400 years to the current calendar year will always yield the same calendar.
More specifically, there are 14 possible calendars. The leap year cycle is 4 days (excluding the 100 year skips), and the weekday cycle is 7 days, so the leap year×weekday cycle is 28 years. So the starting weekdays are on a 28-year cycle, but you have to slip your resulting calculation by the number of centuries from the beginning of the 400-year cycle (i.e., integer division of year by 100). You'll reuse a leap year calendar in 28 years (40 years, if it crosses a round-hundred year), and you'll reuse a non-leap year calendar in 6 or 11 years (12 or 6 years, if it cross a round-hundred year).
The easiest way to code it is to just precompute the year % 400 table and report the results.
> The leap year cycle is 4 days (excluding the 100 year skips)
I think you mean “The leap year cycle is 4 days (excluding the 100 year skips, except every fourth 100 years when they don’t),” eg how 2000 was a leap year despite this individual rule.
(I know it’s accounted for elsewhere in the modulo logic, but you shouldn’t resist the impulse to point out just how crazy it all is!)
I don't have the source code of this site, but checking if a calendar can be used again is pretty easy.
1. Check which weekday the year starts
2. Check if this year is a leap year.
If the year starts on the same weekday as another year and the leap-yeariness is the same, the year is the same.
With this info it's really easy to use your favorite date library to check which years match, but you can also do that manually.
Each year starts on the next weekday that the previous year did. (2019-01-01 was a Tuesday, 2020-01-01 will be a Wednesday) except when that previous year was a leap year. In that case one day is skipped.
I wonder where and how he got all the old calendar images. Seems like that'd be a fairly tedious process, not to mention aligning matching each to the appropriate year(s).
No it doesn't: for example Easter was 5th of April in 2015 and it will be again in 2037, but 2009 has Easter on 12th of April (while having the same day of the week structure). If you take into account Orthodox Easter too it's even more complicated as 2009, 2015 and 2037 have different dates for that.
Just as a side note: here's an accepted official rule of Easter, which even itself has some differentiation - in my opinion - the craziest (that I know) rotating schedule ever:
Easter falls on the first Sunday after the Full Moon date, based on mathematical calculations, that falls on or after March 21. If the Full Moon is on a Sunday, Easter is celebrated on the following Sunday.
> the craziest (that I know) rotating schedule ever
I'm guessing you aren't Jewish? Easter is based on the Jewish calendar, but they didn't want to admit that, so they came up with these crazy rules based on the Christian calendar to approximate the Jewish calendar. Easter is supposed to be three days after passover, and in many years, it is, but every few years they are way off and Easter is either a few weeks before or after the Seder.
If your old calendar includes holidays, you'd have to remember to ignore the ones that are based on rules other than the Gregorian calendar (e.g. Easter was April 21 this year but will be April 14 in 2047). Clearly those holidays are just a conspiracy by Big Calendar to get us to buy more calendars.
I guess we are talking about the newest justice of the US Supreme Court. His nomination was controversial because of multiple sexual assault allegations and his overall questionable character. I don't really get the connection to calendars though.
Supporters said it showed no party, which was where the assault occurred. Detractors said it didn't prove a negative and that numerous events were suspicious. Everybody was shocked that someone would keep a high school calendar for 35 years.
This is all offtopic but per the site, a 1982 calendar would next be reusable in 2021, 2027, and 2038.
I suspect I used this very site years ago to help buy a ~$7 German calendar from the 60's for a friend, as a joke. Old calendars are cheap, being out of date and all!
Seventy should do it. Easter always falls between March 22 and April 25, a 35-day window. Once you've pinned down the day of the week of January 1 (or any other day you care about) and whether it's a leap year or not, you have five possibilities for Easter. So there are 7 * 2 * 5 = 70 possible calendars.
You could get away with 7 if you're willing to switch calendars in the middle of the year. Buy one leap year calendar for each day of the week. If it's a leap year, use as normal. If it's not, on March 1, just switch to the calendar with the correct March 1 day.
This would be a lot easier if the year ran from March 1 to February 28/29. Which it did, for the ancient Romans - so the additional day was at the end of the year. This also explains why September through December come from roots meaning 7 through 10, despite being the ninth through twelfth months.
Heh! Nice one :-) . I remember taking a competitive exam called CAT for admission to MBA. CAT is notorious for being highly competitive and also has some questions involving calendars. Some tricks and tips involving calendars here - https://www.hitbullseye.com/Quant/Modern-Mathematics.php
The real benefit of this is that for the next hundred years or so, you can continue to set your VHS Recorder's clock / calendar, which has only a two digit year. Some of them display weak day calculated from the year. So always setting the calendar year back by 28 years, for years after 2000 can extend your VHS unit's life an extra century or so.
It seems most dissenters are people upset that the calendar is incongruent with their favorite religious texts. If we change the calendar then we might invalidate creation myth, oh noes!
Logically, the World Calendar is better, but it lacks the human whimsy of Greg's calendar. There's a kind of charm in our imperfect inventions. Like Boston's streets or time zones
It's hard to get a raging party together on Tuesday. At least with the current calendar, every few years I can have a party on my actual birthday. With the modified calendar, I'd always have my party before of after my real birthday.
Also, relatedly and less personal, holidays like July 4th would always be on a Wednesday, which is a terrible day to have a statutory holiday. There is a reason that the holidays that are defined by their day of the week always fall on Monday or Friday (with Thanksgiving being the exception, but the Friday following is almost always a holiday for most people).
Ignoring leap years, the pattern within a century [1] is that the calendar for year Y, where Y is the 2-digit year, can next be reused in:
Y+6 if Y is of the form 4N or 4N+1
Y+11 if Y is of the form 4N+2
Y+5 if Y is of the form 4N+3
If you start at a 4N year, this takes you to a 4N+2 year, then 4N+1 year, then a 4N+3 year, and then back to a 4N year, so you'll step through the century in steps of 6, 11, 6, 5, and repeat.
So, for 2019, 19 = 4x4+3, and we at at the add 5 stage of that 6, 11, 6, 5 pattern, and so (ignoring leap years) we get the same calendar in 2019+5 = 2024, 2024+6 = 2030, 2030+11 = 2041, 2041+6 = 2047, 2047+5 = 2052, 2052+6 = 2058, 2058+11 = 2069, 2069+6 = 2075, 2075+5 = 2080, 2080+6 = 2086, and 2080+11 = 2097.
Now it is time to stop ignoring leap year. 2019 is not a leap year, so strike from that list any leap years, leaving 2030, 2041, 2047, 2058, 2069, 2075, 2086, and 2097.
Note you can also go backward. 2019-6 = 2013, 2013-11 = 2002.
Another way to do this, perhaps simpler, is to note that two 2-digit years, Y1 and Y2, in the same century have the same calendar (ignoring leap years) if Y1 + Y1//4 == Y2 + Y2//4 mod 7.
The smallest year for which Y + Y//4 == K mod 7, for K=0,1,2...,6 is: 0, 1, 2, 3, 9, 4, 5.
So, back to 2019. 19 + 19//4 == 2 mod 7, which we see from the prior paragraph first occurs in 2002. That's a 4N+2, so we start the 6, 11, 6, 5 pattern at 11. Get the next three years that match 2002 from that pattern: 2013, 2019, 2024.
You could continue the cycle from there to finish off the century, buy perhaps easier is to note that the whole pattern of calendars and leap years repeats every 28 years.
28 years added to 2002, 2013, 2019, 2024 gives 2030, 2041, 2047, and 2052. Another 28 years gives 2058, 2069, 2075, and 2080. Next is 2086 and 2097.
Let's bust out of our confinement to the current century. Century C has the same calendars as century C+4, so our 2019 calendar will work in 2402, 2413, 2419, and so on.
Using 2000 as the base, whenever we cross a century boundary within the current 400 century span, it is like adding 5 to the Y + Y//4 value.
For 2019 we were using 19 + 19//4 == 2 mod 7 for our target. When we cross into the 2100s we pick up 5, and so need to subtract 5 from that 2 to compensate. Remember, we do all that mod 7, and the result is 4. In the 2100 century, then, we are looking for years with Y + Y//4 == 4 mod 7. As we saw 6 paragraphs back, 2109 would be the first such year.
2109 is a 4N+1 year, which puts us at the second 6 in the 6, 11, 6, 5 pattern, giving us 2115, 2120, 2126 as the other matching years in the first 28. Repeat those every 28 to fill with the 2100s.
Don't forget to delete the leap years!
Note: the calendars for the leap years are only off during January and February. You can go ahead and use, for example, the 2019 calendar in 2024 for March through December.
[1] for our purposes, century == fullyear//100, in Python 3. E.g., the current century is [2000, 2099].
This reminds me of the efforts I made to answer the following question from a Soviet puzzle book I happened upon."Does New Year's Day fall more often on a Sunday or a Saturday?". I will leave the working out of the answer to the curious.
72 comments
[ 3.0 ms ] story [ 130 ms ] threadI don't get it. Please explain?
i.e. https://plannerpads.com/media/wysiwyg/2016-EXCD-Green-SB-Spr...
Presumably this planner/diary has text in it that would be confusing to write beneath. One's messages from 1983 or whatever would conflict with the ones you're writing that are applicable to 2020.
If you turn it upside down, you know to only read text that's "right side up" when the notebook is upside down.
I could be wrong.
Writing across, is how in the old days, people used to reply to letters. Didn't always work well for joined-up writing but worked well-enough.
The Diary was days-of-the-week. So, the same semantic intent as for a calendar wired to a specific year. I need monday to be the "right" monday.
At the very least it made sure I always knew how many days each month had!
1: https://xkcd.com/1205/
More specifically, there are 14 possible calendars. The leap year cycle is 4 days (excluding the 100 year skips), and the weekday cycle is 7 days, so the leap year×weekday cycle is 28 years. So the starting weekdays are on a 28-year cycle, but you have to slip your resulting calculation by the number of centuries from the beginning of the 400-year cycle (i.e., integer division of year by 100). You'll reuse a leap year calendar in 28 years (40 years, if it crosses a round-hundred year), and you'll reuse a non-leap year calendar in 6 or 11 years (12 or 6 years, if it cross a round-hundred year).
The easiest way to code it is to just precompute the year % 400 table and report the results.
If you are interested, Chrono [1] internally uses the exact table. Constants there refer to dominical letters [2].
[1] https://github.com/chronotope/chrono/blob/a4488007272569f752...
[2] https://en.wikipedia.org/wiki/Dominical_letter
I think you mean “The leap year cycle is 4 days (excluding the 100 year skips, except every fourth 100 years when they don’t),” eg how 2000 was a leap year despite this individual rule.
(I know it’s accounted for elsewhere in the modulo logic, but you shouldn’t resist the impulse to point out just how crazy it all is!)
1. Check which weekday the year starts
2. Check if this year is a leap year.
If the year starts on the same weekday as another year and the leap-yeariness is the same, the year is the same.
With this info it's really easy to use your favorite date library to check which years match, but you can also do that manually.
Each year starts on the next weekday that the previous year did. (2019-01-01 was a Tuesday, 2020-01-01 will be a Wednesday) except when that previous year was a leap year. In that case one day is skipped.
Edit:ninja'd by jcranmer
Easter falls on the first Sunday after the Full Moon date, based on mathematical calculations, that falls on or after March 21. If the Full Moon is on a Sunday, Easter is celebrated on the following Sunday.
https://www.timeanddate.com/calendar/determining-easter-date...
I'm guessing you aren't Jewish? Easter is based on the Jewish calendar, but they didn't want to admit that, so they came up with these crazy rules based on the Christian calendar to approximate the Jewish calendar. Easter is supposed to be three days after passover, and in many years, it is, but every few years they are way off and Easter is either a few weeks before or after the Seder.
Cool project otherwise!
Supporters said it showed no party, which was where the assault occurred. Detractors said it didn't prove a negative and that numerous events were suspicious. Everybody was shocked that someone would keep a high school calendar for 35 years.
This is all offtopic but per the site, a 1982 calendar would next be reusable in 2021, 2027, and 2038.
But I expected it to be higher :D Did we miss anything?
https://en.m.wikipedia.org/wiki/World_Calendar
( ) having one or two days per year which are part of no month is stupid
( ) having one or two days per year with no day of the week is asinine
( ) social constructs are actually very important
https://qntm.org/calendar
https://en.wikipedia.org/wiki/International_Fixed_Calendar
I find it much more compelling than World Calendar, although ultimately I think switching calendar systems is not very practical at this point.
I had not seen it, so thanks for sharing!
Also, relatedly and less personal, holidays like July 4th would always be on a Wednesday, which is a terrible day to have a statutory holiday. There is a reason that the holidays that are defined by their day of the week always fall on Monday or Friday (with Thanksgiving being the exception, but the Friday following is almost always a holiday for most people).
Y+6 if Y is of the form 4N or 4N+1
Y+11 if Y is of the form 4N+2
Y+5 if Y is of the form 4N+3
If you start at a 4N year, this takes you to a 4N+2 year, then 4N+1 year, then a 4N+3 year, and then back to a 4N year, so you'll step through the century in steps of 6, 11, 6, 5, and repeat.
So, for 2019, 19 = 4x4+3, and we at at the add 5 stage of that 6, 11, 6, 5 pattern, and so (ignoring leap years) we get the same calendar in 2019+5 = 2024, 2024+6 = 2030, 2030+11 = 2041, 2041+6 = 2047, 2047+5 = 2052, 2052+6 = 2058, 2058+11 = 2069, 2069+6 = 2075, 2075+5 = 2080, 2080+6 = 2086, and 2080+11 = 2097.
Now it is time to stop ignoring leap year. 2019 is not a leap year, so strike from that list any leap years, leaving 2030, 2041, 2047, 2058, 2069, 2075, 2086, and 2097.
Note you can also go backward. 2019-6 = 2013, 2013-11 = 2002.
Another way to do this, perhaps simpler, is to note that two 2-digit years, Y1 and Y2, in the same century have the same calendar (ignoring leap years) if Y1 + Y1//4 == Y2 + Y2//4 mod 7.
The smallest year for which Y + Y//4 == K mod 7, for K=0,1,2...,6 is: 0, 1, 2, 3, 9, 4, 5.
So, back to 2019. 19 + 19//4 == 2 mod 7, which we see from the prior paragraph first occurs in 2002. That's a 4N+2, so we start the 6, 11, 6, 5 pattern at 11. Get the next three years that match 2002 from that pattern: 2013, 2019, 2024.
You could continue the cycle from there to finish off the century, buy perhaps easier is to note that the whole pattern of calendars and leap years repeats every 28 years.
28 years added to 2002, 2013, 2019, 2024 gives 2030, 2041, 2047, and 2052. Another 28 years gives 2058, 2069, 2075, and 2080. Next is 2086 and 2097.
Let's bust out of our confinement to the current century. Century C has the same calendars as century C+4, so our 2019 calendar will work in 2402, 2413, 2419, and so on.
Using 2000 as the base, whenever we cross a century boundary within the current 400 century span, it is like adding 5 to the Y + Y//4 value.
For 2019 we were using 19 + 19//4 == 2 mod 7 for our target. When we cross into the 2100s we pick up 5, and so need to subtract 5 from that 2 to compensate. Remember, we do all that mod 7, and the result is 4. In the 2100 century, then, we are looking for years with Y + Y//4 == 4 mod 7. As we saw 6 paragraphs back, 2109 would be the first such year.
2109 is a 4N+1 year, which puts us at the second 6 in the 6, 11, 6, 5 pattern, giving us 2115, 2120, 2126 as the other matching years in the first 28. Repeat those every 28 to fill with the 2100s.
Don't forget to delete the leap years!
Note: the calendars for the leap years are only off during January and February. You can go ahead and use, for example, the 2019 calendar in 2024 for March through December.
[1] for our purposes, century == fullyear//100, in Python 3. E.g., the current century is [2000, 2099].