Possible Duplicate:
Calculate which day of the week a date falls in using modular arithmetic
Yesterday there was a guy on TV. He asked people in the audience at what date they were born and instantly he could tell them on which day that was.
Can anyone explain me if it's a trick or if there's a formula I could learn?