def update_date_year(self):
dates = record_get_field_instances(self.record, '<STR_LIT>')<EOL>for field in dates:<EOL><INDENT>for idx, (key, value) in enumerate(field[<NUM_LIT:0>]):<EOL><INDENT>if key == '<STR_LIT:c>':<EOL><INDENT>field[<NUM_LIT:0>][idx] = ('<STR_LIT:c>', value[:<NUM_LIT:4>])<EOL><DEDENT>elif key == '<STR_LIT:t>':<EOL><INDENT>del field[<NUM_LIT:0>][idx]<EOL><DEDENT><DEDENT><DEDENT>if not dates:<EOL><INDENT>published_years = record_get_field_values(self.record, "<STR_LIT>", code="<STR_LIT:y>")<EOL>if published_years:<EOL><INDENT>record_add_field(<EOL>self.record, "<STR_LIT>", subfields=[("<STR_LIT:c>", published_years[<NUM_LIT:0>][:<NUM_LIT:4>])])<EOL><DEDENT>else:<EOL><INDENT>other_years = record_get_field_values(self.record, "<STR_LIT>", code="<STR_LIT:c>")<EOL>if other_years:<EOL><INDENT>record_add_field(<EOL>self.record, "<STR_LIT>", subfields=[("<STR_LIT:c>", other_years[<NUM_LIT:0>][:<NUM_LIT:4>])])<EOL><DEDENT><DEDENT><DEDENT>
260 Date normalization.