Sunan Abi Dawud Book 4, Hadith 34
The Messenger of Allah (ﷺ) stayed fifteen days in Mecca in the year of Conquest. Shortening the prayer.
Abu Dawud said: This tradition has also been transmitted by 'Abdah b. Sulaiman, Ahmad b. Khalid al-Wahbi, and Salamah b. Fadli on the authority of Ibn Ishaq ; but they did not mention the name of Ibn 'Abbas.
The Messenger of Allah (ﷺ) had a stop of seventeen days in Mecca and he shortened the prayer (i.e. prayed two rak'ahs at each time of prayer). Ibn Abbas said: He who stays seventeen days should shorten the prayer; and who stays more than that should offer complete prayer.
Abu Dawud said: The other version transmitted by Ibn 'Abbas through a different chain adds: He (the Prophet) had a stop of nineteen days (in Mecca).
The Messenger of Allah (ﷺ) stayed in Mecca seventeen days and prayed two rak'ahs (at each time of prayer).