public void setYear ( String newYear ) { if ( newYear . length ( ) > YEAR_SIZE ) { year = newYear . substring ( 0 , YEAR_SIZE ) ; } else { year = newYear ; } }
Set the year field of the tag . The maximum size of the String is 4 . If the size exceeds the maximum size the String will be truncated .