There are formulas to calculate month length, but the easiest is to set up a table, zero relative of the month length. Thirty days as November, April, June, and September, the others, save February, have thirty-one. February....
In February a little math is necessary.
Yeah, that was my first impression as well. But then, given the year, it's also known what day Jan 1 is. But this homework problem allows users to actually
set the day of the week of Jan 1. So, the exercise is about imaginary calenders and years. I mean, if Jan 1, 2011 is to be a Wednesday, such a 2011 might as well have a Feb 29.