When Can I Reuse This Calendar?
whencanireusethiscalendar.com
whencanireusethiscalendar.com
Cool project otherwise!
( ) 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://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).
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.
At the very least it made sure I always knew how many days each month had!
But I expected it to be higher :D Did we miss anything?
$ printf '%d\n' {1900..2100} | while read year; do printf "$year %s\n" $(cal $year | sed 1d | md5sum | cut -d ' ' -f 1) ; done | grep "$(cal 2019 | sed 1d | md5sum | cut -d ' ' -f 1)" | cut -d ' ' -f 1 | xargs
1901 1907 1918 1929 1935 1946 1957 1963 1974 1985 1991 2002 2013 2019 2030 2041 2047 2058 2069 2075 2086 2097I 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.
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
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...
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!)
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].
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.