In this case, you could use 1 yr., 2 yr. and the abbreviation would always be correct. As reported from the Oxford Dictionary of English, it's the same in British English, except the abbreviation is written without a period at the end (e.g. yr instead of yr.). As the other answers says, there should be a space between the number and yr./yrs..