Which day was it?

Algebra Level 3

{f=14m12x=d+yf+31(m+12f2)12+y4y100+y400W(x)=x7x7+1\begin{cases} f = \left \lfloor \frac{14 - m}{12} \right \rfloor \\ x = d + y - f + \left \lfloor \frac{31(m + 12f -2)}{12} \right \rfloor + \left \lfloor \frac{y}{4} \right \rfloor - \left \lfloor \frac{y}{100} \right \rfloor + \left \lfloor \frac{y}{400} \right \rfloor \\ W(x) = x - 7 \left \lfloor \frac{x}{7} \right \rfloor + 1 \end{cases}

The equations above are the formula used to find the week day of any date on a calendar, where dd, mm, yy are date, month, and year respectively. For example, February 29, 2016, can be represented as 29/2/2016 for dd, mm, & yy.

The function W(x)W(x) will then result in values of 1-7 for Sunday to Saturday respectively.

Which day of the week was July 4, 1776 (America's Independence Day)?

Bonus: Try plug in your birthday and see which day it was!

×

Problem Loading...

Note Loading...

Set Loading...