Steve is in charge of designing a wall-hanging calendar. Each month is allocated a grid of 5 X 7 squares, labeled Sunday thru Saturday across the top. The problem is, Steve hates to put two dates in the same square on the calendar, necessary when the month spans parts of six weeks. Is it possible for Steve to find a year when he never has to put two dates in the same square? What is the most double-date squares he would ever need for a single year?
Months with 30 days that begin on day 7 will require double dates.
Months with 31 days that begin on day 6 or 7 will require one.
Since "30 days hath September, ...", we know that that start day of each month will shift by the following amounts
[3 0 3 2 3 2 3 3 2 3 2 3] or change that 0 to a 1 for leap years.
So, the month length and possible start days are
J F M A M J J A S O N D
31 28 31 30 31 30 31 31 30 31 30 31
1 4 4 7 2 5 7 3 6 1 4 6
2 5 5 1 3 6 1 4 7 2 5 7
and so on. Continuing the table to day 7 is trivial.
From this, any given year will have 2 or 3 double date months. The most double date squares is a bit trickier. I suppose it depends on how you handle them. For a 31 day month starting on day 7, you could double up on the first day or the last two.