Doomsday (weekday)
   HOME

TheInfoList



OR:

The Doomsday rule, Doomsday algorithm or Doomsday method is an
algorithm In mathematics and computer science, an algorithm () is a finite sequence of rigorous instructions, typically used to solve a class of specific problems or to perform a computation. Algorithms are used as specifications for performing ...
of determination of the day of the week for a given date. It provides a perpetual calendar because the
Gregorian calendar The Gregorian calendar is the calendar used in most parts of the world. It was introduced in October 1582 by Pope Gregory XIII as a modification of, and replacement for, the Julian calendar. The principal change was to space leap years d ...
moves in cycles of 400 years. The algorithm for mental calculation was devised by John Conway in 1973, drawing inspiration from Lewis Carroll's perpetual calendar algorithm. It takes advantage of each year having a certain day of the week upon which certain easy-to-remember dates, called the ''doomsdays'', fall; for example, the last day of February, 4/4, 6/6, 8/8, 10/10, and 12/12 all occur on the same day of the week in any year. Applying the Doomsday algorithm involves three steps: Determination of the anchor day for the century, calculation of the anchor day for the year from the one for the century, and selection of the closest date out of those that always fall on the doomsday, e.g., 4/4 and 6/6, and count of the number of days ( modulo 7) between that date and the date in question to arrive at the day of the week. The technique applies to both the
Gregorian calendar The Gregorian calendar is the calendar used in most parts of the world. It was introduced in October 1582 by Pope Gregory XIII as a modification of, and replacement for, the Julian calendar. The principal change was to space leap years d ...
and the
Julian calendar The Julian calendar, proposed by Roman consul Julius Caesar in 46 BC, was a reform of the Roman calendar. It took effect on , by edict. It was designed with the aid of Greek mathematicians and astronomers such as Sosigenes of Alexandri ...
, although their doomsdays are usually different days of the week. The algorithm is simple enough that it can be computed mentally. Conway could usually give the correct answer in under two seconds. To improve his speed, he practiced his calendrical calculations on his computer, which was programmed to quiz him with random dates every time he logged on.


Anchor days for some contemporary years

Doomsday's anchor day for the current year in the Gregorian calendar (2023) is Tuesday. For some other contemporary years: The table is filled in horizontally, skipping one column for each leap year. This table cycles every 28 years, except in the Gregorian calendar on years that are a multiple of 100 (such as 1900 and 2100 which are not leap years) that are not also a multiple of 400 (like 2000 which is still a leap year). The full cycle is 28 years (1,461 weeks) in the Julian calendar, 400 years (20,871 weeks) in the Gregorian calendar.


Memorable dates that always land on Doomsday

One can find the day of the week of a given calendar date by using a nearby doomsday as a reference point. To help with this, the following is a list of easy-to-remember dates for each month that always land on the doomsday. As mentioned above, the last day of February defines the doomsday. For January, January 3 is a doomsday during common years and January 4 a doomsday during leap years, which can be remembered as "the 3rd during 3 years in 4, and the 4th in the 4th year". For March, one can remember the pseudo-date " March 0", which refers to the day before March 1, i.e. the last day of February. For the months April through December, the even numbered months are covered by the double dates 4/4, 6/6, 8/8, 10/10, and 12/12, all of which fall on the doomsday. The odd numbered months can be remembered with the mnemonic "I work from
9 to 5 Working(laboring) time is the period of time that a person spends at paid labor. Unpaid labor such as personal housework or caring for children or pets is not considered part of the working week. Many countries regulate the work week by law, s ...
at the 7-11", i.e., 9/5, 7/11, and also 5/9 and 11/7, are all doomsdays (this is true for both the Day/Month and Month/Day conventions). Several well-known dates, such as Pi Day and
Independence Day (United States) Independence Day (colloquially the Fourth of July) is a federal holiday in the United States commemorating the Declaration of Independence, which was ratified by the Second Continental Congress on July 4, 1776, establishing the United State ...
, also fall on doomsdays every year. The chart below includes only the mnemonics covered in the source listed. Since the doomsday for a particular year is directly related to weekdays of dates in the period from March through February of the next year, common years and leap years have to be distinguished for January and February of the same year. January and February can be treated as the last two months of the previous year.


Example

To find which day of the week
Christmas Day Christmas is an annual festival commemorating the birth of Jesus Christ, observed primarily on December 25 as a religious and cultural celebration among billions of people around the world. A feast central to the Christian liturgical year, ...
of 2021 is, proceed as follows: in the year 2021, doomsday is on Sunday. Since December 12 is a doomsday, December 25, being thirteen days afterwards (two weeks less a day), fell on a Saturday. Christmas Day is always the day before doomsday. In addition, July 4 ( U.S. Independence Day) is always on a doomsday, as are
Halloween Halloween or Hallowe'en (less commonly known as Allhalloween, All Hallows' Eve, or All Saints' Eve) is a celebration observed in many countries on 31 October, the eve of the Western Christian feast of All Saints' Day. It begins the observan ...
(October 31), Pi Day (March 14), and
Boxing Day Boxing Day is a holiday celebrated after Christmas Day, occurring on the second day of Christmastide (26 December). Though it originated as a holiday to give gifts to the poor, today Boxing Day is primarily known as a shopping holiday. It ...
(December 26).


Mnemonic weekday names

Since this algorithm involves treating days of the week like numbers modulo 7, John Conway suggested thinking of the days of the week as "Noneday" or "Sansday" (for Sunday), "Oneday", "Twosday", "Treblesday", "Foursday", "Fiveday", and "Six-a-day" in order to recall the number-weekday relation without needing to count them out in one's head. There are some languages, such as
Slavic languages The Slavic languages, also known as the Slavonic languages, are Indo-European languages spoken primarily by the Slavic peoples and their descendants. They are thought to descend from a proto-language called Proto-Slavic, spoken during the ...
, Chinese,
Greek Greek may refer to: Greece Anything of, from, or related to Greece, a country in Southern Europe: *Greeks, an ethnic group. *Greek language, a branch of the Indo-European language family. **Proto-Greek language, the assumed last common ancestor ...
, Portuguese, Galician and
Hebrew Hebrew (; ; ) is a Northwest Semitic language of the Afroasiatic language family. Historically, it is one of the spoken languages of the Israelites and their longest-surviving descendants, the Jews and Samaritans. It was largely preserved ...
, that base some of the names of the week days in their positional order. The Slavic and Chinese agree with the table above; the other languages mentioned count from Sunday as day one.


Finding a year's anchor day

First take the anchor day for the century. For the purposes of the doomsday rule, a century starts with '00 and ends with '99. The following table shows the anchor day of centuries 1600–1699, 1700–1799, 1800–1899, 1900–1999, 2000–2099, 2100–2199 and 2200-2299. For the Gregorian calendar: :Mathematical formula : Tuesday = anchor. :Algorithmic :Let :if then anchor = Tuesday :if then anchor = Sunday :if then anchor = Friday :if then anchor = Wednesday For the Julian calendar: : Sunday = anchor. Note: . Next, find the year's anchor day. To accomplish that according to Conway:John Horton Conway, #Divide the year's last two digits (call this ) by 12 and let be the
floor A floor is the bottom surface of a room or vehicle. Floors vary from simple dirt in a cave to many layered surfaces made with modern technology. Floors may be stone, wood, bamboo, metal or any other material that can support the expected load ...
of the quotient. #Let be the remainder of the same quotient. #Divide that remainder by 4 and let be the floor of the quotient. #Let be the sum of the three numbers (). (It is again possible here to divide by seven and take the remainder. This number is equivalent, as it must be, to the sum of the last two digits of the year taken collectively plus the floor of those collective digits divided by four.) #Count forward the specified number of days ( or the remainder of ) from the anchor day to get the year's one. :\begin\left(\right) \bmod 7+\rm=\rm\end For the twentieth-century year 1966, for example: :\begin\left(\right) \bmod 7+\rm & = & \left(5+6+1\right) \bmod 7+\rm \\ \ & = & \rm\end As described in bullet 4, above, this is equivalent to: :\begin\left(\right) \bmod 7+\rm & = & \left(66+16\right) \bmod 7+\rm \\ \ & = & \rm\end So doomsday in 1966 fell on Monday. Similarly, doomsday in 2005 is on a Monday: :\left(\right) \bmod 7+\rm=\rm


Why it works

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 (rounded down). But 365 equals 52 × 7 + 1, so after taking the remainder we get just :\left(y + \left\lfloor \frac \right\rfloor\right) \bmod 7. This gives a simpler formula if one is comfortable dividing large values of by both 4 and 7. For example, we can compute :\left(66 + \left\lfloor \frac \right\rfloor\right) \bmod 7 = (66 + 16) \bmod 7 = 82 \bmod 7 = 5 which gives the same answer as in the example above. Where 12 comes in is that the pattern of ''almost'' repeats every 12 years. After 12 years, we get . If we replace by , we are throwing this extra day away; but adding back in compensates for this error, giving the final formula.


The "odd + 11" method

A simpler method for finding the year's anchor day was discovered in 2010 by Chamberlain Fong and Michael K. Walters,Chamberlain Fong, Michael K. Walters
"Methods for Accelerating Conway's Doomsday Algorithm (part 2)"
7th International Congress on Industrial and Applied Mathematics (2011).
and described in their paper submitted to the 7th
International Congress on Industrial and Applied Mathematics The International Congress on Industrial and Applied Mathematics (ICIAM) is an international congress in the field of applied mathematics held every four years under the auspices of the International Council for Industrial and Applied Mathematics. T ...
(2011). Called the "odd + 11" method, it is equivalent to computing :\left(y + \left\lfloor \frac \right\rfloor\right) \bmod 7. It is well suited to mental calculation, because it requires no division by 4 (or 12), and the procedure is easy to remember because of its repeated use of the "odd + 11" rule. Furthermore, addition by 11 is very easy to perform mentally in base-10 arithmetic. Extending this to get the anchor day, the procedure is often described as accumulating a running total in six steps, as follows: # Let be the year's last two digits. #If is odd, add 11. #Now let . #If is odd, add 11. #Now let . #Count forward days from the century's anchor day to get the year's anchor day. Applying this method to the year 2005, for example, the steps as outlined would be: # # (adding 11 because is odd) # # (do nothing since is even) # #Doomsday for 2005 = 6 + Tuesday = Monday The explicit formula for the odd+11 method is: : 7- \left frac + 11 \left(\frac\bmod 2\right)\right\bmod 7. Although this expression looks daunting and complicated, it is actually simple because of a common subexpression that only needs to be calculated once. Anytime adding 11 is needed, subtracting 17 yields equivalent results. While subtracting 17 may seem more difficult to mentally perform than adding 11, there are cases where subtracting 17 is easier, especially when the number is a two-digit number that ends in 7 (such as 17, 27, 37, ..., 77, 87, and 97).


Correspondence with dominical letter

Doomsday is related to the dominical letter of the year as follows. Look up the table below for the dominical letter (DL). For the year 2023, the dominical letter is A - 0 = A.


Overview of all Doomsdays

* In leap years the th doomsday is in ISO week . In common years the day after the th doomsday is in week . Thus in a common year the week number on the doomsday itself is one less if it is a Sunday, i.e. in a
common year starting on Friday A common year starting on Friday is any non-leap year (i.e. a year with 365 days) that begins on Friday, 1 January, and ends on Friday, 31 December. Its dominical letter hence is C. The most recent year of such kind was 2021 and the next one wi ...
.


Computer formula for the anchor day of a year

For computer use, the following formulas for the anchor day of a year are convenient. For the Gregorian calendar: :\mbox = \mbox + y + \left\lfloor\frac\right\rfloor - \left\lfloor\frac\right\rfloor + \left\lfloor\frac\right\rfloor = \mbox + 5\times (y\bmod 4) + 4\times (y\bmod 100) + 6\times (y\bmod 400) For example, the doomsday 2009 is Saturday under the Gregorian calendar (the currently accepted calendar), since :\mbox \bmod 7 = \mbox + 2009 + \left\lfloor\frac\right\rfloor - \left\lfloor\frac\right\rfloor + \left\lfloor\frac\right\rfloor As another example, the doomsday 1946 is Thursday, since :\mbox \bmod 7 = \mbox + 1946 + \left\lfloor\frac\right\rfloor - \left\lfloor\frac\right\rfloor + \left\lfloor\frac\right\rfloor For the Julian calendar: :\mbox = \mbox + y + \left\lfloor\frac\right\rfloor = \mbox+ 5\times (y\bmod 4) + 3\times (y\bmod 7) The formulas apply also for the
proleptic Gregorian calendar The proleptic Gregorian calendar is produced by extending the Gregorian calendar backward to the dates preceding its official introduction in 1582. In nations that adopted the Gregorian calendar after its official and first introduction, dates occ ...
and the
proleptic Julian calendar The proleptic Julian calendar is produced by extending the Julian calendar backwards to dates preceding AD 8 when the quadrennial leap year stabilized. The leap years that were actually observed between the implementation of the Julian calendar in ...
. They use the
floor function In mathematics and computer science, the floor function is the function that takes as input a real number , and gives as output the greatest integer less than or equal to , denoted or . Similarly, the ceiling function maps to the least int ...
and
astronomical year numbering Astronomical year numbering is based on AD/ CE year numbering, but follows normal decimal integer numbering more strictly. Thus, it has a year 0; the years before that are designated with negative numbers and the years after that are designated ...
for years BC. For comparison, see the calculation of a Julian day number.


400-year cycle of anchor days

Since in the Gregorian calendar there are 146,097 days, or exactly 20,871 seven-day weeks, in 400 years, the anchor day repeats every four centuries. For example, the anchor day of 1700–1799 is the same as the anchor day of 2100–2199, i.e. Sunday. The full 400-year cycle of doomsdays is given in the adjacent table. The centuries are for the Gregorian and
proleptic Gregorian calendar The proleptic Gregorian calendar is produced by extending the Gregorian calendar backward to the dates preceding its official introduction in 1582. In nations that adopted the Gregorian calendar after its official and first introduction, dates occ ...
, unless marked with a J for Julian. The Gregorian leap years are highlighted. Negative years use
astronomical year numbering Astronomical year numbering is based on AD/ CE year numbering, but follows normal decimal integer numbering more strictly. Thus, it has a year 0; the years before that are designated with negative numbers and the years after that are designated ...
. Year 25BC is −24, shown in the column of −100J (proleptic Julian) or −100 (proleptic Gregorian), at the row 76. A leap year with Monday as doomsday means that Sunday is one of 97 days skipped in the 400-year sequence. Thus the total number of years with Sunday as doomsday is 71 minus the number of leap years with Monday as doomsday, etc. Since Monday as doomsday is skipped across 29 February 2000 and the pattern of leap days is symmetric about that leap day, the frequencies of doomsdays per weekday (adding common and leap years) are symmetric about Monday. The frequencies of doomsdays of leap years per weekday are symmetric about the doomsday of 2000, Tuesday. The frequency of a particular date being on a particular weekday can easily be derived from the above (for a date from 1 January – 28 February, relate it to the doomsday of the previous year). For example, 28 February is one day after doomsday of the previous year, so it is 58 times each on Tuesday, Thursday and Sunday, etc. 29 February is doomsday of a leap year, so it is 15 times each on Monday and Wednesday, etc.


28-year cycle

Regarding the frequency of doomsdays in a Julian 28-year cycle, there are 1 leap year and 3 common years for every weekday, the latter 6, 17 and 23 years after the former (so with intervals of 6, 11, 6, and 5 years; not evenly distributed because after 12 years the day is skipped in the sequence of doomsdays). The same cycle applies for any given date from 1 March falling on a particular weekday. For any given date up to 28 February falling on a particular weekday, the 3 common years are 5, 11, and 22 years after the leap year, so with intervals of 5, 6, 11, and 6 years. Thus the cycle is the same, but with the 5-year interval after instead of before the leap year. Thus, for any date except 29 February, the intervals between common years falling on a particular weekday are 6, 11, 11. See e.g. at the bottom of the page
Common year starting on Monday A common year starting on Monday is any non-leap year (i.e., a year with 365 days) that begins on Monday, 1 January, and ends on Monday, 31 December. Its dominical letter hence is G. The most recent year of such kind was 2018 and the next one wil ...
the years in the range 1906–2091. For 29 February falling on a particular weekday, there is just one in every 28 years, and it is of course a leap year.


Julian calendar

The
Gregorian calendar The Gregorian calendar is the calendar used in most parts of the world. It was introduced in October 1582 by Pope Gregory XIII as a modification of, and replacement for, the Julian calendar. The principal change was to space leap years d ...
is currently accurately lining up with astronomical events such as solstices. In 1582 this modification of the
Julian calendar The Julian calendar, proposed by Roman consul Julius Caesar in 46 BC, was a reform of the Roman calendar. It took effect on , by edict. It was designed with the aid of Greek mathematicians and astronomers such as Sosigenes of Alexandri ...
was first instituted. In order to correct for calendar drift, 10 days were skipped, so doomsday moved back 10 days (i.e. 3 days): Thursday 4 October (Julian, doomsday is Wednesday) was followed by Friday 15 October (Gregorian, doomsday is Sunday). The table includes Julian calendar years, but the algorithm is for the Gregorian and proleptic Gregorian calendar only. Note that the Gregorian calendar was not adopted simultaneously in all countries, so for many centuries, different regions used different dates for the same day.


Full examples


Example 1 (1985)

Suppose we want to know the day of the week of September 18, 1985. We begin with the century's anchor day, Wednesday. To this, add , , and above: * is the floor of , which is 7. * is , which is . * is the floor of , which is 0. This yields . Counting 8 days from Wednesday, we reach Thursday, which is the doomsday in 1985. (Using numbers: In modulo 7 arithmetic, 8 is congruent to 1. Because the century's anchor day is Wednesday (index 3), and 3 + 1 = 4, doomsday in 1985 was Thursday (index 4).) We now compare September 18 to a nearby doomsday, September 5. We see that the 18th is 13 past a doomsday, i.e. one day less than two weeks. Hence, the 18th was a Wednesday (the day preceding Thursday). (Using numbers: In modulo 7 arithmetic, 13 is congruent to 6 or, more succinctly, −1. Thus, we take one away from the doomsday, Thursday, to find that September 18, 1985 was a Wednesday.)


Example 2 (other centuries)

Suppose that we want to find the day of week that the
American Civil War The American Civil War (April 12, 1861 – May 26, 1865; also known by Names of the American Civil War, other names) was a civil war in the United States. It was fought between the Union (American Civil War), Union ("the North") and t ...
broke out at
Fort Sumter Fort Sumter is a sea fort built on an artificial island protecting Charleston, South Carolina from naval invasion. Its origin dates to the War of 1812 when the British invaded Washington by sea. It was still incomplete in 1861 when the Battle ...
, which was April 12, 1861. The anchor day for the century was 99 days after Thursday, or, in other words, Friday (calculated as ; or just look at the chart, above, which lists the century's anchor days). The digits 61 gave a displacement of six days so doomsday was Thursday. Therefore, April 4 was Thursday so April 12, eight days later, was a Friday.


See also

*
Ordinal date An ordinal date is a calendar date typically consisting of a ''year'' and a day of the year or ordinal day number (or simply ordinal day or day number), an ordinal number ranging between 1 and 366 (starting on January 1), though year may sometime ...
*
Computus As a moveable feast, the date of Easter is determined in each year through a calculation known as (). Easter is celebrated on the first Sunday after the Paschal full moon, which is the first full moon on or after 21 March (a fixed approx ...
– Gauss algorithm for Easter date calculation *
Zeller's congruence Zeller's congruence is an algorithm devised by Christian Zeller in the 19th century to calculate the day of the week for any Julian or Gregorian calendar date. It can be considered to be based on the conversion between Julian day and the calendar ...
– An algorithm (1882) to calculate the day of the week for any Julian or Gregorian calendar date. * Mental calculation


References


External links


Encyclopedia of Weekday Calculation by Hans-Christian Solka, 2010

Doomsday calculator that also "shows all work"


* ttp://www.recordholders.org/en/list/mental-calculation-rankings.html National records for finding Calendar Dates
World Ranking of Memoriad Mental Calendar Dates
(all competitions combined)





* {{DEFAULTSORT:Doomsday Rule Gregorian calendar Julian calendar Calendar algorithms 1973 introductions John Horton Conway