Associated Topics || Dr. Math Home || Search Dr. Math

### Formula for the Day of the Week

```
Date: 05/21/97 at 11:08:07
From: Christine Durling
Subject: Declaration of Independence

Would you please tell us what day of the week the Declaration of
Independence was signed on as well the  formula to determine such?
Thank you very much!

Christine Durling, Education Media Specialist
Bordentown Regional High School
Bordentown, NJ 08505
```

```
Date: 05/27/97 at 14:53:12
From: Doctor Rob
Subject: Re: Declaration of Independence

This is a trick question, of course.  The date at the top of the
document is July 4th, 1776.  I believe it was actually signed on
July 2nd, however.

Ignoring this historical technicality, the day of the week upon which
July 4th, 1776, fell was Thursday.

The rule is quite complicated.  It goes like this:

Let k be the day of the month.  In this case, k = 4.

Let m be the month, counting March as 1 and February as 12.  (Here
January and February are considered as the last months of the
preceding year.  This is to make Feb. 29th [if any] be the last day
of the year.  This also means that the values of C and D are those
for the preceding year, so, for example, 1 Jan 2000 would have C = 19
and D = 99.)  In this case, m = 5 (July).

Let D be the last two digits of the year.  In this case, D = 76.

Let C be the first two digits of the year (the century).  In this
case, C = 17.

For any real number x, let [x] be the greatest integer less than or
equal to x, which you get by truncating any fractional part.  Then
compute:

f = k + [(13*m-1)/5] + D + [D/4] + [C/4] - 2*C.

Once you have this, then  f - 7*[f/7] will give you the day of the
week, with Sunday = 0, Monday = 1, and so on.

f = 4 + [64/5] + 76 + [76/4] + [17/4] - 34
= 4 + 12 + 76 + 19 + 4 - 34
= 81
and f - 7*[f/7] = 81 - 7*[81/7] = 81 - 7*11 = 81 - 77 = 4, or
Thursday.

This rule was given by a certain Rev. Zeller, and so is called
Zeller's Rule.  This works for the Gregorian calendar only.  There is
a simpler version for the Julian calendar.  Recall that English-
speaking countries used the Gregorian calendar beginning 14 Sep 1752,
and before that used the Julian calendar.

A good reference for calendar matters is the _Encyclopedia

-Doctor Rob,  The Math Forum
Check out our web site!  http://mathforum.org/dr.math/
```
Associated Topics:
High School Puzzles
Middle School Puzzles

Search the Dr. Math Library:

 Find items containing (put spaces between keywords):   Click only once for faster results: [ Choose "whole words" when searching for a word like age.] all keywords, in any order at least one, that exact phrase parts of words whole words

Submit your own question to Dr. Math
Math Forum Home || Math Library || Quick Reference || Math Forum Search