|
The Off-Topic Lounge APPROPRIATE FAMILY-FRIENDLY TOPICS ONLY - READ THE RULES! This forum is for posting anything (excluding topics prohibited by the forum rules) that's unrelated to email. General discussions, in other words. |
|
Thread Tools |
24 Jun 2022, 02:58 AM | #1 |
Master of the @
Join Date: Feb 2005
Location: USA
Posts: 1,871
|
|
24 Jun 2022, 04:09 AM | #2 |
The "e" in e-mail
Join Date: Oct 2002
Location: Holon, Israel.
Posts: 4,837
|
What's interesting about a calendar?
|
24 Jun 2022, 05:08 AM | #3 |
Master of the @
Join Date: Feb 2005
Location: USA
Posts: 1,871
|
Well its interesting seeing what years have the same days for example....
Like the year 2022 has the exact same day layout as 2005 2011 2033 2039 2050 2061 2067 2078 2089 and 2095 |
24 Jun 2022, 07:16 AM | #4 |
The "e" in e-mail
Join Date: Oct 2002
Location: Holon, Israel.
Posts: 4,837
|
That's simply because because there are 7 weekdays and every 4 years is a leap year (with February 29th), so you get a cycle of 28 years, so every 28 years you get the same layout. So what you have in 2022 you must also have in 2050 and in 2078 (but not in 2106 because actually there are also rules for leap years every 100 years and every 400 years so there's actually a cycle of 2800 years, though we probably would never complete a single cycle, and use star-dates long before the first cycle is over...).
Every leap year layout appears once in every 28 year cycle. Every regular year layout appears 3 times (for every weekday there's one regular year layout with it as January 1, and another such layout for a leap year). So the layout of 2022 has to appear 3 time between 2001 and 2028 (in 2005, 2011 and 2022). In Fourmilab's calendar converter you can enter jan 1 of any year and see what weekday it is (or any other date) and also convert between many different calendars and read lots of information about how they work (including several private calendars of Microsoft that depend on various bugs in different versions of Excel: they excel in bugs!) |
24 Jun 2022, 01:22 PM | #5 |
Cornerstone of the Community
Join Date: Jun 2004
Location: Rupert, WV
Posts: 879
|
I haven't made this script '$startYear changeable' other than just editing the file itself. I've written a few other PHP scripts, some useful but most both useless and useful..
- bruce http://somdcomputerguy.com/leaps.php PHP Code:
Last edited by somdcomputerguy : 24 Jun 2022 at 01:41 PM. Reason: made code font size smaller |
25 Jun 2022, 10:04 PM | #6 |
The "e" in e-mail
Join Date: Oct 2002
Location: Holon, Israel.
Posts: 4,837
|
Actually I was wrong here. My son corrected me when I told him about this 2800 thing. Since there is a one day shift in the first weekday each year, and an additional one day shift for each leap year, you get a 400+97=497 day shift in a 400 year cycle (since there are 97 leap years in a cycle). and since 497 days are exactly 71 weeks, the next 400 year cycle starts at exactly the same weekday. So we have only a 400 year cycle of calendars, not 2800, and since the first cycle started in 1582, it ended in 1982 and we are already 40 years into the second cycle.
Last edited by hadaso : 25 Jun 2022 at 10:06 PM. Reason: typo |