580a581,608 > /* Force the month to make sense, and then if the day is too large, set it > * to the end of the month. > */ > > static int > normalize_month_end(int *year, int *month, int *day) > { > int days, result; > > if (*month < 1 || *month > 12) { > --*month; > normalize_pair(year, month, 12); > ++*month; > } > assert(1 <= *month && *month <= 12); > days = days_in_month(*year, *month); > if (*day > days) > *day = days; > if (MINYEAR <= *year && *year <= MAXYEAR) > result = 0; > else { > PyErr_SetString(PyExc_OverflowError, > "date value out of range"); > result = -1; > } > return result; > } >