fix ValueError: day is out of range for month