Implementing an algorithm to determine the day of the week from a date

The following is a flowchart of Tomohiho's “doomsday” algorithm to determine a day of the week:

Monthmonth-key
January0
February3
March2
April5
May0
June3
July5
August1
September4
October6
November2
December4
dayday number
Sunday0
Monday1
Tuesday2
Wednesday3
Thursday4
Friday5
Saturday6

Here are the specifications:

Rx: <15 min Av: 15-20 min Sd: 20-25 min DNF: 25+ min             

Extra credit! Make it a web app!

Rx: <22 min Av: 22-30 min Sd: 30-35 min DNF: 35+ min             

If you get stuck you can ask the instructor or TA for a screencast solution.