Capital Gains Tax

If someone moved out of their primary residence (lived in for 3 years prior) in May 2020 and turned it into a rental property by what month and year do they have to sell the property to avoid paying capital gains tax? Considering the 2/5 year rule.