0% found this document useful (0 votes)
2K views

The Key Value Method

The Key Value Method uses codes for months and years to efficiently calculate the day of the week for a given date. An example is provided for December 16, 2482. The steps involve: 1) taking the last 2 digits of the year, 2) dividing by 4 and ignoring remainders, 3) adding the day, 4) adding the month's key value, 5) adjusting for leap years if needed, 6) adding the century code, 7) adding the last 2 digits of the year, and 8) dividing by 7 to get the day of the week.

Uploaded by

best4ev1
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views

The Key Value Method

The Key Value Method uses codes for months and years to efficiently calculate the day of the week for a given date. An example is provided for December 16, 2482. The steps involve: 1) taking the last 2 digits of the year, 2) dividing by 4 and ignoring remainders, 3) adding the day, 4) adding the month's key value, 5) adjusting for leap years if needed, 6) adding the century code, 7) adding the last 2 digits of the year, and 8) dividing by 7 to get the day of the week.

Uploaded by

best4ev1
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

The Key Value Method

This method uses codes for different months and years to speed up the calculation of
the day of the week. You might even be able to memorize the codes. We'll use
December 16, 2482 as an example.

Take the last 2 digits of the year. In our example, this is 82.

Divide by 4, and drop any remainder. 82 / 4 = 20, remainder 2, so we think


"20."

Add the day of the month. In our example, 20 + 16 = 36.

Add the month's key value, from the following table.


Jan Feb Mar Apr May June July Aug Sept Oct Nov Dec
1

The month for our example is December, with a key value of 6. 36 + 6 = 42.

If your date is in January or February of a leap year, subtract 1. We're using


December, so we don't have to worry about this step.

Add the century code from the following table. (These codes are for the
Gregorian calendar. The rule's slightly simpler for Julian dates.)
1700s 1800s 1900s 2000s
4

Our example year is 2482, and the 2400s aren't in the table. Luckily, the
Gregorian calendar repeats every four hundred years. All we have to do is add
or subtract 400 until we have a date that is in the table. 2482 - 400 = 2082, so
we look at the table for the 2000s, and get the code 6. Now we add this to our
running total: 42 + 6 = 48.

Add the last two digits of the year. 48 + 82 = 130.

Divide by 7 and take the remainder. This time, 1 means Sunday, 2 means
Monday, and so on. A remainder of 0 means Saturday. 130 / 7 = 18, remainde

You might also like