In this sense (the one popularized by Michael Feathers’ book on the subject) age does not matter: code written last week without tests is already legacy. The first job is to get it under test, not to make it pretty.
Legacy code
A common working definition: code without tests, so you cannot change it with confidence.