Fix bug in daysInMonth

It was incorrectly calculating June as having 31 days and July as having only 30.