Fix possibility of month + period changing years

Account for possibility that the increase in month due to period calculates the correct year.