Yahya bin Abu Ishaq narrated that Anas said:
“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).”