“We went out with the Messenger of Allah (ﷺ) from Al-Madinah to Makkah, during which time we shortened our prayer to two Rak’ah, until we came back.” I asked: “How long did he stay in Makkah?” He said: “Ten (days).”
Sunan Ibn Majah Book 5, Hadith 275