Fix bug in calculating number of days to display for next month