protected static int yearFrom2Digits ( int shortYear , int currentYear ) { if ( shortYear < 100 ) { shortYear += currentYear - ( currentYear % 100 ) ; if ( Math . abs ( shortYear - currentYear ) >= 50 ) { if ( shortYear < currentYear ) { return shortYear + 100 ; } else { return shortYear - 100 ; } } } return shortYear ; }
Converts a relative 2 - digit year to an absolute 4 - digit year