There is no fixed minimum duration of companionship in the definition. Even a very brief meeting with the Prophet ﷺ in a state of faith can qualify a person as a Companion.
Some had extended time with him, while others had only a brief encounter. Length of association is a separate issue; Companion status is not defined by a specified number of days or months.
Even a moment of companionship in faith can meet the condition when followed by death upon Islam.