# Eikonal Blog

## 2011.03.28

### Universal calendars

Filed under: mathematics — Tags: — sandokan65 @ 16:59

According to Daniel Zwillinger (“Standard Mathematical Tables And Formulae”; 31st ed; 2003; Recipe 10.3.2, but formula 10.3.1) the specific date maps to the following day of the week (in the Gregorian calendar):

$W = \left(k + [2.6 m -0.2] - 2 C + Y + \left[\frac{Y}4\right] + \left[\frac{C}{4}\right]\right) \ (mod \ 7)$

Here:

• W = day of the week (0=Sunday to 6=Saturday)
• k = the day in the month (= 1 to 31)
• m = the month (1=March to 12=February)
• C = century minus one (1997 $\rightarrow C=19$, 2005 $\rightarrow C=20$)
• Y = the year inside century, where the years begining is march 1st (so, 1997 maps to $Y=97$ except for January and February when it goes to $Y=96$
• and $[...]$ is the floor function (the largest integer part of the enclosed real number).

For example, today is March 29th, 2011. That would be:

• The day’s order number inside this month: $k=29$
• This month is, according to Roman counting, the first one in the year: $m=1$
• The year inside the century is $Y=11$ (since it is past February)
• The century is 21st, so $C=21-1 = 20$
• So: $[2.6 m -0.2] = [2.6 -0.2] = [2.4] = 2$, $[Y/4] = [11/4] = [2.25] = 2$, $[C/4] = [20/4] = 5$
• and $W = \left(29 + 2 - 2 \times 20 + 11 + 2 + 5\right) \ (mod \ 7) = (49-40) \ (mod \ 7)$ $= 9 \ (mod \ 7) = 2$ i.e. today is Tuesday (correct).