# 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 allow the calculation of 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 two 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 (year that does not have a February 29) that starts on each day of the week, and seven for each leap year that starts on each 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).

Note that 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 manuscript 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.[4]

## 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, so as to show the current date for the 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.
• 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 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 days. The internal mechanism will move the dial to the next day.[5]

These meanings are beyond the scope of the remainder of this article.

## Algorithms

Perpetual calendars use algorithms to compute the day of the week for any given year, month, and day of 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.[6] 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 exactly 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 week for any date, explicitly defines January and February as the "13th" and "14th" months of the previous year in order 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 look-up mechanism to find offset for the day of 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 table

For Julian dates before 1300 and after 1999 the year in the table which differs by an exact multiple of 700 years should be used. For Gregorian dates after 2299, the year in the table which differs by an exact multiple of 400 years should be used. The values "r0" through "r6" indicate the remainder when the Hundreds value is divided by 7 and 4 respectively, indicating how the series extend in either direction. Both Julian and Gregorian values are shown 1500–1999 for convenience.

For each component of the date (the hundreds, remaining digits and month), the corresponding numbers in the far right hand column on the same line are added to each other and the day of the month. This total is then divided by 7 and the remainder from this division located in the far right hand column. The day of the week is beside it. Bold figures (e.g., 04) denote leap year. If a year ends in 00 and its hundreds are in bold it is a leap year. Thus 19 indicates that 1900 is not a Gregorian leap year, (but 19 in the Julian column indicates that it is a Julian leap year, as are all Julian x00 years). 20 indicates that 2000 is a leap year. Use Jan and Feb only in leap years.

100s of Years Remaining Year Digits Month D
o
W
#
Julian
(r ÷ 7)
Gregorian
(r ÷ 4)
r5 19 16 20 r0 00 06   17 23 28 34   45 51 56 62   73 79 84 90 Jan    Oct Sa 0
r4 18 15 19 r3 01 07 12 18 29 35 40 46 57 63 68 74 85 91 96   May Su 1
r3 17
N/A
02   13 19 24 30   41 47 52 58   69 75 80 86   97 Feb  Aug M 2
r2 16 18 22 r2 03 08 14   25 31 36 42   53 59 64 70   81 87 92 98 Feb Mar Nov Tu 3
r1 15
N/A
09 15 20 26   37 43 48 54   65 71 76 82   93 99   Jun W 4
r0 14 17 21 r1 04 10   21 27 32 38   49 55 60 66   77 83 88 94   Sep Dec Th 5
r6 13
N/A
05 11 16 22 33 39 44 50 61 67 72 78 89 95 Jan Apr Jul F 6

Example: On what day does Feb 3, 4567 (Gregorian) fall?
1) The remainder of 45 / 4 is 1, so use the r1 entry: 5.
2) The remaining digits 67 give 6.
3) Feb (not Feb for leap years) gives 3.
4) Finally, add the day of the month: 3.
5) Adding 5 + 6 + 3 + 3 = 17. Dividing by 7 leaves a remainder of 3, so the day of the week is Tuesday.

### Revised Julian calendar

Note that the date (and hence the day of the week) in the Revised Julian calendar and Gregorian calendar is the same from 14 October 1923 (the date of the change from the Julian calendar to the Revised Julian calendar which advanced 13 days to align with the Gregorian calendar) until 28 February AD 2800 inclusive,[7]

The Julian table above may be used to compute the day of the week for the Revised Julian calendar if the procedure is modified to account for dropped leap years.

For simplicity with large years, subtract 6300 (the least-common multiple of the 900-year period of the leap years and the 7-day week) or a multiple thereof before starting so as to reach a year that is less than 6301.[citation needed]

To look up the weekday of any date for any year using the table, subtract 100 from the year, divide the difference by 100, multiply the resulting quotient (omitting fractions) by seven and divide the product by nine. Note the quotient (omitting fractions). Enter the table with the Julian year, and just before the final division add 50 and subtract the quotient noted above.

Example: What is the day of the week of 27 January 8315?

8315-6300=2015, 2015-100=1915, 1915/100=19 remainder 15, 19x7=133, 133/9=14 remainder 7. 2015 is 700 years ahead of 1315, so 1315 is used. From table: for hundreds (13): 6. For remaining digits (15): 4. For month (January): 0. For date (27): 27. 6+4+0+27+50-14=73. 73/7=10 remainder 3. Day of week = Tuesday.

### Sunday Letter

To find the Sunday Letter, calculate the day of the week for either 1 January or 1 October. If it is Sunday, the Sunday Letter is A, if Saturday B, and similarly backwards through the week and forwards through the alphabet to Monday, which is G.

Leap years have two Sunday Letters, so for January and February calculate the day of the week for 1 January and for March to December calculate the day of the week for 1 October.

Leap years are all years which divide exactly by four with the following exceptions:

In the Gregorian calendar – all years which divide exactly by 100 (other than those which divide exactly by 400).

In the Revised Julian calendar – all years which divide exactly by 100 (other than those which give remainder 200 or 600 when divided by 900).

### Check the result

A result control is shown by the calendar period from 1582 October 15 possible, 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.

## Mental calculation

Among all possible algorithms (see page Determination of the day of the week), the most suitable for mental calculation can be considered the algorithm created by Italian F. Berio[8], consisting in summing 5 terms and using modulo operation to reduce the sum result to a value lower than 7.

Modulo operation (indicated by "mod" symbol) is analogous to watch arithmetic (according to which e.g. hour "15" corresponds to hour "3" because 15 mod 12 = 3) and consists in the remainder of division (therefore 18 mod 7 = 4 because 18 / 7 = 2 and the remainder of division is 4; or, equivalently, because after removing two times 7 from 18, the remainder is 4).

The following paragraphs illustrate the algorithm by itself, the criteria to optimize it for mental calculation and examples of mental operations to be actually executed.

### The algorithm

Taken a date dd/mm/ccyy (or mm/dd/ccyy ), its components are described in the following table:

Number corresponds to within the limits
dd day of the month from 1 to 31
mm month of the year from 1 to 12
cc first two digits of the year [int(year / 100)] from 15 onward
yy last two digits of the year (year mod 100) from 0 to 99

The algorithm consists in determining five terms D, M, C, Y, L and calculating [(D + M + C + Y + L) mod 7] ; modulo operations can be executed not only after having summed the five terms but also, optionally, on any term or partial sum.

The day of the month (modulo 7) provides the first term D of the final expression:

• D = dd mod 7
• The second term M is a code derived from the month. The table differs according to the desired starting day of the week, which can be either Monday (as in ISO 8601 standard) or Sunday; the corresponding tables are the following:
Starting day of the week = Monday
Month M (common year) M (leap year)
January 6 5
February 2 1
March 2
April 5
May 0
June 3
July 5
August 1
September 4
October 6
November 2
December 4
Starting day of the week = Sunday
Month M (common year) M (leap year)
January 0 6
February 3 2
March 3
April 6
May 1
June 4
July 6
August 2
September 5
October 0
November 3
December 5
• The third term C is a code derived from the century, that is the first two digits cc of the year: to the 4 possible results of "cc mod 4" the following number C is associated:
 cc mod 4 C 0 1 2 3 0 5 3 1

and therefore, for the first centuries in the scope of gregorian calendar validity, C is given by:

 cc C 15 16 17 18 19 20 21 22 23 1 0 5 3 1 0 5 3 1

Indeed, second and third terms could have seven different combinations of values: the combination considered for M and C in this article is the one optimized for current century because for cc = 20 the associated value is C = 0.

The fourth term Y is derived from the last two digits yy of the year; since, in the scope of a single century, in the gregorian calendar the days of the week repeat every 28 years, Y is considered as

• Y = yy mod 28

The fifth term L is obtained, as well as Y, starting from the last two digits yy of the year, and represents the number of leap years which are certainly contained in yy years (int indicates the function integer part of the number):

• L = int[(yy mod 28) / 4]

For example, for year 2023 the result of operation is 5 because 23 contains 5 whole blocks of 4 years each; arithmetically:

L = int[(23 mod 28) / 4] = int(23 / 4) = 5

Once determined the five terms, the following expression can be calculated:

• [(D + M + C + Y + L) mod 7]

The expression provides a number between 0 and 6 which indicates the final result (the searched day of the week); according to the desired starting day of the week ("1" either for Monday or for Sunday), the corresponding column must be considered in the following table:

Result Day of the week starting from Monday Day of the week starting from Sunday
0 (equivalent to 7) Sunday Saturday
1 Monday Sunday
2 Tuesday Monday
3 Wednesday Tuesday
4 Thursday Wednesday
5 Friday Thursday
6 Saturday Friday

The days before the introduction of gregorian calendar (Friday 15th October, 1582 or later dates according to the country), cannot be calculated with the C tables shown above because the julian calendar was in force. The algorithm will remain in force until the possible future introduction of corrections to gregorian calendar.

### Criteria for mental calculation

To execute the mental calculation in an effective manner, firstly it is convenient to memorize the above table which provides the term M in an self-referential form. One method is to memorize the names of the months truncated or modified to have a number of characters identical to the M code (to avoid confusion between codes 5 and 6, it is convenient to break the groups of 6 characters into two parts). According to the desired starting day of the week, the resulting tables can be the following:

Starting day of the week = Monday
Month M (common year) M (leap year)
January JAN UAR JAN UAR -1
February FE FE -1
March MA
April APRIL
May .
June JUN
July JULYY
August A
September SEPT
October OCT OBE
November NO
December DECE
Starting day of the week = Sunday
Month M (common year) M (leap year)
January . JAN UAR
February FEB FEB -1
March MAR
April APR ILL
May M
June JUNE
July JUL YYY
August AU
September SEPTE
October .
November NOV
December DECEM

(If "Starting day of the week = Sunday" and Month = January, for common years the code is M = 0 while for leap years the code is M = -1 or equivalently M = 6).

Secondly, it is convenient to keep into account that the sum C+Y+L (the contribution due to the year) does not change for a whole year; therefore, at least for the current year, it is sufficient to memorize the sum C+Y+L at the beginning of the year.

Thirdly, it is convenient to consider that, in the scope of a single century (constant cc), the calendar repeats every 28 years (because 28 is the least common multiple of 7 and 4, in which 7 is the repetition period of week days and 4 the repetition period of leap years); therefore, if yy is greater or equal to 28 it is sufficient to consider as year the one obtained by subtracting 28 or one of its multiples (56 or 84).

Furthermore, it has to be kept into account that, as soon as a term or a partial sum is greater or equal to 7, it is convenient to subtract immediately 7 or one of its multiples to minimize the values in use. Particularly, the value 7 is equivalent to 0.

Finally, it is necessary to know the rule that establishes in the gregorian calendar which years are leap years: if yy is not 0, the year is a leap year if yy is divisible by 4; if yy is 0 (centurial years), the year is leap year if cc is divisible by 4.

Therefore, the operations to be mentally executed (speedy in spite of the apparent complexity) are:

• consider the number of the day; if it is greater or equal to 7, subtract immediately the highest possible multiple of 7;
• sum the code of the month provided self-referentially by the name of the month; if the month is January or February and the year is a leap year, subtract 1 (as per table of M code); if the sum reaches or exceeds 7, subtract immediately 7;
• sum the code of the century: for current century (cc = 20) the code is 0 (as per table of C code); for last century (cc = 19) the code is 1; if the sum reaches or exceeds 7, subtract immediately 7;
• consider the year yy: if it is greater or equal to 28 it is sufficient to consider as yy the year obtained by subtracting 28 or one of its multiples (56 or 84);
• sum the year yy, possibly reduced by a multiple of 7;
• sum the number of leap years which are certainly contained in yy years: if yy does not reach 4 (it is less than 4), consider 0 leap years; else if it does not reach 8, consider 1 leap year; else if it does not reach 12, consider 2 leap years, etc.; if the sum reaches or exceeds 7, subtract 7;
• the obtained number indicates the day of the week: according to the chosen starting day of the week, in the former case 1 = Monday, 2 = Tuesday, ..., 6 = Saturday, 0 (equivalent to 7) = Sunday; in the latter case 1 = Sunday, 2 = Monday, ..., 6 = Friday, 0 (equivalent to 7) = Saturday.

The examples in the following two paragraphs illustrate how to proceed operationally to execute the calculation.

### Examples of mental calculation with Monday as starting day of the week

This paragraph illustrates examples of calculation of the expression (D + M + C + Y + L) mod 7 in a manner optimized to be executed mentally.

The date format adopted is dd/mm/ccyy and Monday is considered as starting day of the week.

01/03/2000: thinking to the date as 1 "MA" 2000, sum 1 (the day) + 2 ("MA") + 0 (for current century) + 0 (year) + 0 (number of leap years in 0 years) = 3, therefore Wednesday.

08/03/2000: thinking to the date as 8 "MA" 2000, consider 8 (the day); 7 can be immediately subtracted and remains 1; continue by summing 2 ("MA") + 0 (for current century) + 0 (year) + 0 (number of leap years in 0 years) = 3, therefore Wednesday.

01/01/2003: thinking to the date as 1 "JAN UAR" 2003, sum 1 (the day) + 6 ("JAN UAR"); until now, 7 is obtained: subtract immediately 7 and remains 0; continue by summing 0 (for current century) + 3 (year) + 0 (number of leap years in 3 years) = 3, therefore Wednesday.

01/01/2000: thinking to the date as 1 "JAN UAR" 2000, sum 1 (the day) + 5 ("JAN UAR" -1, that is 6-1 because year 2000 was leap year) + 0 (for current century) + 0 (year) + 0 (number of leap years in 0 years) = 6, therefore Saturday.

01/01/2004: thinking to the date as 1 "JAN UAR" 2004, sum 1 (the day) + 5 ("JAN UAR" -1 because year 2004 was leap year) + 0 (for current century) + 4 (year); until now, 10 is obtained: subtract immediately 7 and remains 3; continue by summing 1 (number of leap years in 4 years) = 4, therefore Thursday.

25/12/2000: thinking to the date as 25 "DECE" 2000, consider 25 (the day); 21 (multiple of 7) can be immediately subtracted and remains 4; continue by summing 4 ("DECE"), obtaining 8; 7 can be immediately subtracted and remains 1; continue by summing 0 (for current century) + 0 (year) + 0 (number of leap years in 0 years) = 1, therefore Monday.

01/10/2003: thinking to the date as 1 "OCT OBE" 2003, consider 1 (the day) + 6 ("OCT OBE"), obtaining 7; 7 can be immediately subtracted and remains 0; continue by summing 0 (for current century) + 3 (year) + 0 (number of leap years in 3 years) = 3, therefore Wednesday.

01/10/2004: thinking to the date as 1 "OCT OBE" 2004, consider 1 (the day) + 6 ("OCT OBE"), obtaining 7; 7 can be immediately subtracted and remains 0; continue by summing 0 (for current century) + 4 (year) + 1 (number of leap years in 4 years) = 5, therefore Friday.

01/10/2005: thinking to the date as 1 "OCT OBE" 2005, consider 1 (the day) + 6 ("OCT OBE"), obtaining 7; 7 can be immediately subtracted and remains 0; continue by summing 0 (for current century) + 5 (year) + 1 (number of leap years in 5 years) = 6, therefore Saturday.

19/03/2007: thinking to the date as 19 "MA" 2007, consider 19 (the day); 14 (multiple of 7) can be immediately subtracted and remains 5; continue by summing 2 ("MA"), obtaining 7; 7 can be immediately subtracted and remains 0; continue by summing 0 (for current century) + 0 (year = 7, however 7 can be immediately subtracted) + 1 (number of leap years in 7 years) = 1, therefore Monday.

19/03/2008: thinking to the date as 19 "MA" 2008, consider 19 (the day); 14 (multiple of 7) can be immediately subtracted and remains 5; continue by summing 2 ("MA"), obtaining 7; 7 can be immediately subtracted and remains 0; continue by summing 0 (for current century) + 1 (year = 8, however 7 can be immediately subtracted) + 2 (number of leap years in 8 years) = 3, therefore Wednesday.

19/03/2036: thinking to the date as 19 "MA" 2036, consider 19 (the day); 14 (multiple of 7) can be immediately subtracted and remains 5; continue by summing 2 ("MA"), obtaining 7; 7 can be immediately subtracted and remains 0; continue by summing 0 (for current century); since the year is greater or equal to 28, by subtracting 28 remains 8 (because the calendar of year 2036 is identical to the one of year 2008), therefore consider for yy the value 8; therefore, continue by summing 1 (year = 8, however 7 can be immediately subtracted) + 2 (number of leap years in 8 years) = 3, therefore Wednesday.

19/03/1936: thinking to the date as 19 "MA" 1936, consider 19 (the day); 14 (multiple of 7) can be immediately subtracted and remains 5; continue by summing 2 ("MA"), obtaining 7; 7 can be immediately subtracted and remains 0; continue by summing 1 (for last century); since the year is greater or equal to 28, by subtracting 28 remains 8 (because the calendar of year 1936 is identical to the one of year 1908), therefore consider for yy the value 8; therefore, continue by summing 1 (year = 8, however 7 can be immediately subtracted) + 2 (number of leap years in 8 years) = 4, therefore Thursday.

31/12/1999: thinking to the date as 31 "DECE" 1999, consider 31 (the day); 28 (multiple of 7) can be immediately subtracted and remains 3; continue by summing 4 ("DECE"), obtaining 7; 7 can be immediately subtracted and remains 0; continue by summing 1 (for last century); since the year is greater or equal to 28, subtract a multiple of 28 (56 or 84, in this case 84) and remains 15 (because the calendar of year 1999 is identical to the one of year 1915), therefore consider for yy the value 15; therefore, continue by summing 1 (year = 15, however 14 can be immediately subtracted since it is a multiple of 7) + 3 (number of leap years in 15 years) = 5, therefore Friday. (To be noted that the next day, 01/01/2000, was Saturday).

01/01/2100: thinking to the date as 1 "JAN UAR" 2100, sum 1 (the day) + 6 ("JAN UAR", that is 6 because year 2100 will not be leap year); until now, 7 is obtained: subtract immediately 7 and remains 0; continue by summing 5 (for next century) + 0 (year) + 0 (number of leap years in 0 years) = 5, therefore Friday.

### Examples of mental calculation with Sunday as starting day of the week

This paragraph illustrates examples of calculation of the expression (D + M + C + Y + L) mod 7 in a manner optimized to be executed mentally.

The date format adopted is dd/mm/ccyy and Sunday is considered as starting day of the week.

01/03/2000: thinking to the date as 1 "MAR" 2000, sum 1 (the day) + 3 ("MAR") + 0 (for current century) + 0 (year) + 0 (number of leap years in 0 years) = 4, therefore Wednesday.

08/03/2000: thinking to the date as 8 "MAR" 2000, consider 8 (the day); 7 can be immediately subtracted and remains 1; continue by summing 3 ("MAR") + 0 (for current century) + 0 (year) + 0 (number of leap years in 0 years) = 4, therefore Wednesday.

01/01/2003: thinking to the date as 1 "." 2003, sum 1 (the day) + 0 (".") + 0 (for current century) + 3 (year) + 0 (number of leap years in 3 years) = 4, therefore Wednesday.

01/01/2000: thinking to the date as 1 "." 2000, sum 1 (the day) + 6 ("JAN UAR", that is 6 because year 2000 was leap year); until now, 7 is obtained: subtract immediately 7 and remains 0; continue by summing 0 (for current century) + 0 (year) + 0 (number of leap years in 0 years) = 0, therefore Saturday.

01/01/2004: thinking to the date as 1 "." 2004, sum 1 (the day) + 6 ("JAN UAR", that is 6 because year 2004 was leap year); until now, 7 is obtained: subtract immediately 7 and remains 0; continue by summing 0 (for current century) + 4 (year) + 1 (number of leap years in 4 years) = 5, therefore Thursday.

25/12/2000: thinking to the date as 25 "DECEM" 2000, consider 25 (the day); 21 (multiple of 7) can be immediately subtracted and remains 4; continue by summing 5 ("DECEM"), obtaining 9; 7 can be immediately subtracted and remains 2; continue by summing 0 (for current century) + 0 (year) + 0 (number of leap years in 0 years) = 2, therefore Monday.

01/10/2003: thinking to the date as 1 "." 2003, consider 1 (the day) + 0 (".") + 0 (for current century) + 3 (year) + 0 (number of leap years in 3 years) = 4, therefore Wednesday.

01/10/2004: thinking to the date as 1 "." 2004, consider 1 (the day) + 0 (".") + 0 (for current century) + 4 (year) + 1 (number of leap years in 4 years) = 6, therefore Friday.

01/10/2005: thinking to the date as 1 "." 2005, consider 1 (the day) + 0 (".") + 0 (for current century) + 5 (year) + 1 (number of leap years in 5 years) = 7, equivalent to 0, therefore Saturday.

19/03/2007: thinking to the date as 19 "MAR" 2007, consider 19 (the day); 14 (multiple of 7) can be immediately subtracted and remains 5; continue by summing 3 ("MAR"), obtaining 8; 7 can be immediately subtracted and remains 1; continue by summing 0 (for current century) + 0 (year = 7, however 7 can be immediately subtracted) + 1 (number of leap years in 7 years) = 2, therefore Monday.

19/03/2008: thinking to the date as 19 "MAR" 2008, consider 19 (the day); 14 (multiple of 7) can be immediately subtracted and remains 5; continue by summing 3 ("MAR"), obtaining 8; 7 can be immediately subtracted and remains 1; continue by summing 0 (for current century) + 1 (year = 8, however 7 can be immediately subtracted) + 2 (number of leap years in 8 years) = 4, therefore Wednesday.

19/03/2036: thinking to the date as 19 "MAR" 2036, consider 19 (the day); 14 (multiple of 7) can be immediately subtracted and remains 5; continue by summing 3 ("MAR"), obtaining 8; 7 can be immediately subtracted and remains 1; continue by summing 0 (for current century); since the year is greater or equal to 28, by subtracting 28 remains 8 (because the calendar of year 2036 is identical to the one of year 2008), therefore consider for yy the value 8; therefore, continue by summing 1 (year = 8, however 7 can be immediately subtracted) + 2 (number of leap years in 8 years) = 4, therefore Wednesday.

19/03/1936: thinking to the date as 19 "MAR" 1936, consider 19 (the day); 14 (multiple of 7) can be immediately subtracted and remains 5; continue by summing 3 ("MAR"), obtaining 8; 7 can be immediately subtracted and remains 1; continue by summing 1 (for last century); since the year is greater or equal to 28, by subtracting 28 remains 8 (because the calendar of year 1936 is identical to the one of year 1908), therefore consider for yy the value 8; therefore, continue by summing 1 (year = 8, however 7 can be immediately subtracted) + 2 (number of leap years in 8 years) = 5, therefore Thursday.

31/12/1999: thinking to the date as 31 "DECEM" 1999, consider 31 (the day); 28 (multiple of 7) can be immediately subtracted and remains 3; continue by summing 5 ("DECEM"), obtaining 8; 7 can be immediately subtracted and remains 1; continue by summing 1 (for last century); since the year is greater or equal to 28, subtract a multiple of 28 (56 or 84, in this case 84) and remains 15 (because the calendar of year 1999 is identical to the one of year 1915), therefore consider for yy the value 15; therefore, continue by summing 1 (year = 15, however 14 can be immediately subtracted since it is a multiple of 7) + 3 (number of leap years in 15 years) = 6, therefore Friday. (To be noted that the next day, 01/01/2000, was Saturday).

01/01/2100: thinking to the date as 1 "." 2100, sum 1 (the day) + 0 (".", that is 0 because year 2100 will not be leap year) + 5 (for next century) + 0 (year) + 0 (number of leap years in 0 years) = 6, therefore Friday.