Fix negative or large values for month