One of my class assignments is to create a program that calculates the day of the week by first calculating the Julian day number, adding one and doing a % 7 operation. I am told that days are numbered from 0 to 6, 0 being Sunday. When I enter today's date, I get "Thursday" - and today's Friday. My program appears to have calculated the Julian day number correctly.
Here's the line I think is causing the problem.
I have no knowledge about julian day conversion, but does it have anything to do with this year being a leap year? Did you try a day prior to Feb. 29? I could be wrong, but that's the first thing that comes to my mind for this year.