Determination of the day of the week

The weekday calculation (also called calendar arithmetic) is based on an algorithm by which one can calculate the day of the week for any date. A monitoring of results is given with the mapped Dauer-/Ewigen calendars. The Wochentagsberechung is also a popular discipline championships in mental arithmetic. A well-known record holder in this discipline is Jan van Koningsveld.

Introduction

A mod b (a mod b ) gives the residual that remains when one integer divides a by b. Important for the weekday calculation of the residual modulo 7

The integer result of the division ( in the above example 2) is achieved with the notation a div b. For the weekday calculation here is (for the year digit ) div 4 important.

Calculation

Assuming that a date according to the following scheme composed:

Where the first two digits of the four-digit year display and the last two. Can you calculate the following 5 values ​​of a sum.

Days digit

The daily number: it is the day of the month modulo 7

Month digit

The monthly figure that you have to remember:

In January, it starts with zero. The numbers of the other arising from the remnants of the previous month.

If you miss a month digit, you can calculate it so again.

Digit of the year

For the year digit is the year, so only the last two digits, add in the century to the rounded integer result of the division by 4 of the same number. This sum is then divided modulo 7

This results in this example, the following numbers:

There will always be incremented by 1, and leap years by 2, after 6 it goes again with the 0 on. These digits are repeated every 28 years .. 28 so had the same number like .. 56 and 84 ..

Example for 1950: 50 (50 div 4 = 12) = 62, which goes into 7 exactly 8 times = 56 and 6 remain as the balance The annual figure for 1950 is therefore the 6 Since the year digit of .. 50 is the same as of .. 78 or .. 22 ( 78 = 50 28, 22 = 50-28 ), one can accomplish the calculation of the annual rate in this case also with smaller numbers: the annual number of 1950 is the same as that of 1922, ie 22 (22 div 4 = 5) = 27 = 3 x 7 6; also naturally obtained as the 6th digit of the year

Century digit

The first two digits of the year are. The formula for the century digit is:

Accordingly, the century digit:

Note: The century digit is not the same as to the membership of the century. The 20 th century, for example, covers the 1901 to 2000.

The cycle of 400 years in the Gregorian calendar has 146,097 days and which are divisible by 7. So the days of the week are repeated every 400 years, in 2004, for example, has the same days of the week as 1604, 2404, 2804, etc.

Leap-year correction

We have previously attributed the leap to the whole year, the bill does so only as of March 1. If the date is in January or February of a leap year, is ( or 6, as always modulo 7 is expected ) otherwise.

Result

If you add these 5 numbers and the remainder when determined by 7, we get the week:

Based on the numerical results can now be determined the day of the week:

With all these additions you can always expect the same mod 7, so

You then have to do it only with numbers from 0 to 6, so that fingers are sufficient as a computing aid.

Examples

July 14, 1789

The Bastille was stormed on a Tuesday.

May 23, 1949

The Federal Republic of Germany was founded on a Monday.

January 18, 1892

Oliver Hardy was born on a Monday.

November 9, 1989

The fall of the wall was on a Thursday.

Julian calendar

In the Julian calendar, the bill extends the same, but the century digits are different, and you must make sure that all .. he 00- years are leap years. The Julian calendar has a cycle of 700 years.

The formula for the century digit in the Julian calendar is:

Others

Towards the end of the 19th century, many methods have been published for weekday calculation. The first release is probably the Lewis Carroll in the journal "Nature" ( Volume 35, March 31, 1887, p 517). It writes Carroll, "I myself am not a calculator and on average I need about 20 seconds to answer a question; but I have no doubt that a real calculator to answer would not even need 15 seconds. "

Sports

For since 2004 taking place in the biennial rhythm World Championships in mental arithmetic calendar computing is a discipline. The winners were 2004 and 2006 Matthias Kesselschläger ( Germany ) and in 2008 Jan van Koningsveld ( also Germany ). The world record is 93 data in a minute, and was erected in 2010 by Yusnier Viera Romero from Cuba.

827492
de