# Perpetual calendar

Illustration from 1881 U.S. Patent 248872, for a perpetual calendar paperweight. The upper section is rotated to reveal one of seven lists of years (splitting leap years) for which the seven calendars below apply.
A 50-year "pocket calendar" that is adjusted by turning the dial to place the name of the month under the current year. One can then deduce the day of the week or the date.

A perpetual calendar is a calendar valid for many years, usually designed to look up the day of the week for a given date in the future.

For the Gregorian and Julian calendars, a perpetual calendar typically consists of one of three general variations:

• 14 one-year calendars, plus a table to show which one-year calendar is to be used for any given year. These one-year calendars divide evenly into two sets of seven calendars: seven for each common year (the year that does not have a February 29) with each of the seven starting on a different day of the week, and seven for each leap year, again with each one starting on a different day of the week, totaling fourteen. (See Dominical letter for one common naming scheme for the 14 calendars.)
• Seven (31-day) one-month calendars (or seven each of 28–31 day month lengths, for a total of 28) and one or more tables to show which calendar is used for any given month. Some perpetual calendars' tables slide against each other so that aligning two scales with one another reveals the specific month calendar via a pointer or window mechanism.[1] The seven calendars may be combined into one, either with 13 columns of which only seven are revealed,[2][3] or with movable day-of-week names (as shown in the pocket perpetual calendar picture).
• A mixture of the above two variations - a one-year calendar in which the names of the months are fixed and the days of the week and dates are shown on movable pieces which can be swapped around as necessary.[4]

Such a perpetual calendar fails to indicate the dates of moveable feasts such as Easter, which are calculated based on a combination of events in the Tropical year and lunar cycles. These issues are dealt with in great detail in Computus.

An early example of a perpetual calendar for practical use is found in the Nürnberger Handschrift GNM 3227a. The calendar covers the period of 1390–1495 (on which grounds the manuscript is dated to c. 1389). For each year of this period, it lists the number of weeks between Christmas day and Quinquagesima. This is the first known instance of a tabular form of perpetual calendar allowing the calculation of the moveable feasts that became popular during the 15th century.[5]

## Other uses of the term "perpetual calendar"

• Offices and retail establishments often display devices containing a set of elements to form all possible numbers from 1 through 31, as well as the names/abbreviations for the months and the days of the week, to show the current date for convenience of people who might be signing and dating documents such as checks. Establishments that serve alcoholic beverages may use a variant that shows the current month and day but subtracting the legal age of alcohol consumption in years, indicating the latest legal birth date for alcohol purchases. A very simple device consists of two cubes in a holder. One cube carries the numbers zero to five. The other bears the numbers 0, 1, 2, 6 (or 9 if inverted), 7, and 8. This is perpetual because only one and two may appear twice in date and they are on both cubes.
• Certain calendar reforms have been labeled perpetual calendars because their dates are fixed on the same weekdays every year. Examples are The World Calendar, the International Fixed Calendar and the Pax Calendar. Technically, these are not perpetual calendars but perennial calendars. Their purpose, in part, is to eliminate the need for perpetual calendar tables, algorithms, and computation devices.
• In watchmaking, "perpetual calendar" describes a calendar mechanism that correctly displays the date on the watch 'perpetually', taking into account the different lengths of the months as well as leap years. The internal mechanism will move the dial to the next day.[6]

## Algorithms

Perpetual calendars use algorithms to compute the day of the week for any given year, month, and day of the month. Even though the individual operations in the formulas can be very efficiently implemented in software, they are too complicated for most people to perform all of the arithmetic mentally.[7] Perpetual calendar designers hide the complexity in tables to simplify their use.

A perpetual calendar employs a table for finding which of fourteen yearly calendars to use. A table for the Gregorian calendar expresses its 400-year grand cycle: 303 common years and 97 leap years total to 146,097 days, or exactly 20,871 weeks. This cycle breaks down into one 100-year period with 25 leap years, making 36,525 days, or one day less than 5,218 full weeks; and three 100-year periods with 24 leap years each, making 36,524 days, or two days less than 5,218 full weeks.

Within each 100-year block, the cyclic nature of the Gregorian calendar proceeds in the same fashion as its Julian predecessor: A common year begins and ends on the same day of the week, so the following year will begin on the next successive day of the week. A leap year has one more day, so the year following a leap year begins on the second day of the week after the leap year began. Every four years, the starting weekday advances five days, so over a 28-year period, it advances 35, returning to the same place in both the leap year progression and the starting weekday. This cycle completes three times in 84 years, leaving 16 years in the fourth, incomplete cycle of the century.

A major complicating factor in constructing a perpetual calendar algorithm is the peculiar and variable length of February, which was at one time the last month of the year, leaving the first 11 months March through January with a five-month repeating pattern: 31, 30, 31, 30, 31, ..., so that the offset from March of the starting day of the week for any month could be easily determined. Zeller's congruence, a well-known algorithm for finding the day of the week for any date, explicitly defines January and February as the "13th" and "14th" months of the previous year to take advantage of this regularity, but the month-dependent calculation is still very complicated for mental arithmetic:

${\displaystyle \left\lfloor {\frac {(m+1)26}{10}}\right\rfloor \mod 7,}$

Instead, a table-based perpetual calendar provides a simple lookup mechanism to find offset for the day of the week for the first day of each month. To simplify the table, in a leap year January and February must either be treated as a separate year or have extra entries in the month table:

 Month Add For leap years Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec 0 3 3 6 1 4 6 2 5 0 3 5 6 2

## Perpetual Julian and Gregorian calendar tables

### Table one (cyd)

The following calendar works for any date from 15 October 1582 onwards, but only for Gregorian calendar dates.

A genuinely perpetual calendar, which allows its user to look up the day of the week for any Gregorian date.

### Table two (cymd)

 Years of the century Example 1 Gregorian 31 March 2006: Greg century 20(c) and year 06(y) meet at A in the table of Latin square. The A in row Mar(m) meets 31(d) at Fri in the table of Weekdays. The day is Friday. Example 2 BC 1 January 45: BC 45 = -44 = -100 + 56 (a leap year). -1 and 56 meet at B and Jan_B meets 1 at Fri(day). Example 3 Julian 1 January 1900: Julian 19 meets 00 at A and Jan_A meets 1 at Sat(urday). Example 4 Gregorian 1 January 1900: Greg 19 meets 00 at G and Jan_G meets 1 at Mon(day). 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 Centuries Latin square Months Julian Greg. -4 3 10 17 — — F E D C B A G Jan Apr Jul -3 4 11 18 15 19 G F E D C B A Jan Oct -2 5 12 19 16 20 A G F E D C B May -1 6 13 20 — — B A G F E D C Feb Aug 0 7 14 21 17 21 C B A G F E D Feb Mar Nov 1 8 15 22 — — D C B A G F E Jun 2 9 16 23 18 22 E D C B A G F Sep Dec Days Weekdays 1 8 15 22 29 Mon Tue Wed Thu Fri Sat Sun 2 9 16 23 30 Tue Wed Thu Fri Sat Sun Mon 3 10 17 24 31 Wed Thu Fri Sat Sun Mon Tue 4 11 18 25 Thu Fri Sat Sun Mon Tue Wed 5 12 19 26 Fri Sat Sun Mon Tue Wed Thu 6 13 20 27 Sat Sun Mon Tue Wed Thu Fri 7 14 21 28 Sun Mon Tue Wed Thu Fri Sat
 Juliancenturies Gregoriancenturies Days of the week Months Days 04 11 18 19 23 27 Sun Mon Tue Wed Thu Fri Sat Jan Apri Jul 01 08 15 22 29 03 10 17 Mon Tue Wed Thu Fri Sat Sun Sep Dec 02 09 16 23 30 02 09 16 18 22 26 Tue Wed Thu Fri Sat Sun Mon Jun 03 10 17 24 31 01 08 15 Wed Thu Fri Sat Sun Mon Tue Feb Mar Nov 04 11 18 25 00 07 14 17 21 25 Thu Fri Sat Sun Mon Tue Wed Feb Aug 05 12 19 26 –1 06 13 Fri Sat Sun Mon Tue Wed Thu May 06 13 20 27 –2 05 12 16 20 24 Sat Sun Mon Tue Wed Thu Fri Jan Oct 07 14 21 28 Years 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99

### Table three (dmyc)

 # Juliancenturies(mod 7) Gregoriancenturies(mod 4) Dates Years of the century (mod 28) 6 5 4 3 2 1 0 0108152229 0209162330 0310172431 04111825 05121926 06132027 07142128 05 12 19 16 20 24 Apr Jul Jan Sun Mon Tue Wed Thu Fri Sat 01 07 12 18 29 35 40 46 57 63 68 74 85 91 96 06 13 20 Sep Dec Sat Sun Mon Tue Wed Thu Fri 02 13 19 24 30 41 47 52 58 69 75 80 86 97 07 14 21 17 21 25 Jun Fri Sat Sun Mon Tue Wed Thu 03 08 14 25 31 36 42 53 59 64 70 81 87 92 98 08 15 22 Feb Mar Nov Thu Fri Sat Sun Mon Tue Wed 09 15 20 26 37 43 48 54 65 71 76 82 93 99 09 16 23 18 22 26 Aug Feb Wed Thu Fri Sat Sun Mon Tue 04 10 21 27 32 38 49 55 60 66 77 83 88 94 10 17 24 May Tue Wed Thu Fri Sat Sun Mon 05 11 16 22 33 39 44 50 61 67 72 78 89 95 11 18 25 19 23 27 Jan Oct Mon Tue Wed Thu Fri Sat Sun 06 17 23 28 34 45 51 56 62 73 79 84 90 00