def date_fixup_pre_processor(transactions, tag, tag_dict, *args):
if tag_dict['<STR_LIT>'] == '<STR_LIT>':<EOL><INDENT>year = int(tag_dict['<STR_LIT>'], <NUM_LIT:10>)<EOL>_, max_month_day = calendar.monthrange(year, <NUM_LIT:2>)<EOL>if int(tag_dict['<STR_LIT>'], <NUM_LIT:10>) > max_month_day:<EOL><INDENT>tag_dict['<STR_LIT>'] = str(max_month_day)<EOL><DEDENT><DEDENT>return tag_dict<EOL>
Replace illegal February 29, 30 dates with the last day of February.

German banks use a variant of the 30/360 interest rate calculation,
where each month has always 30 days even February. Python's datetime
module won't accept such dates.