fix a bug: when the value changes from 1-31(>29/28) to 2-31