Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Doomsday rule
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Why it works=== [[File:Doomsday Rule.svg|thumb|Doomsday rule]] The doomsday's anchor day calculation is effectively calculating the number of days between any given date in the base year and the same date in the current year, then taking the remainder modulo 7. When both dates come after the leap day (if any), the difference is just {{math|365''y'' + {{sfrac|''y''|4}}}} (rounded down). But 365 equals 52 × 7 + 1, so after taking the remainder we get just :<math>\left(y + \left\lfloor \frac{y}{4} \right\rfloor\right) \bmod 7.</math> This gives a simpler formula if one is comfortable dividing large values of {{math|''y''}} by both 4 and 7. For example, we can compute :<math>\left(66 + \left\lfloor \frac{66}{4} \right\rfloor\right) \bmod 7 = (66 + 16) \bmod 7 = 82 \bmod 7 = 5</math> which gives the same answer as in the example above. Where 12 comes in is that the pattern of <math>\bigl(y + \bigl\lfloor \tfrac{y}{4} \bigr\rfloor \bigr) \bmod 7</math> ''almost'' repeats every 12 years. After 12 years, we get <math>\bigl(12 + \tfrac{12}{4}\bigr) \bmod 7 = 15 \bmod 7 = 1</math>. If we replace {{math|''y''}} by {{math|''y'' mod 12}}, we are throwing this extra day away; but adding back in <math>\bigl\lfloor \tfrac{y}{12} \bigr\rfloor</math> compensates for this error, giving the final formula. For calculating the Gregorian anchor day of a century: three “common centuries” (each having 24 leap years) are followed by a “leap century” (having 25 leap years). A common century moves the doomsday forward by :<math> (100 + 24) \bmod 7 = 2 + 3 = 5 </math> days (equivalent to two days back). A leap century moves the doomsday forward by 6 days (equivalent to one day back). So ''c'' centuries move the doomsday forward by :<math> \left(5c + \biggl\lfloor {c \over 4} \biggr\rfloor \right) \bmod 7 </math>, but this is equivalent to :<math> (5 (c \bmod 4)) \bmod 7</math>. Four centuries move the doomsday forward by :<math> -2 - 2 - 2 - 1 = -7, \qquad -7 \equiv 0 \quad \pmod{7}</math>; so four centuries form a cycle that leaves the doomsday unchanged (and hence the “mod 4” in the century formula).
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)