resolved to stay for a period in which more than twenty-one obligatory prayers would fall, he may go on shortening the prayer even if he ends up remaining for years. (1)
However, should he intend to reside in a town for more than four days, he must offer the prayer in full; for the Prophet ﷺ entered Mecca on a Sunday in Dhu’l-Ḥijjah during the Farewell Pilgrimage and remained there on Sunday, Monday, Tuesday, and Wednesday, then set out for Mina on Thursday. Thus he had arrived at daybreak of the fourth day, stayed through the fourth, fifth, sixth, and seventh days, and prayed Fajr at al-Abṭaḥ on the eighth. Throughout those days he was shortening the prayer, even though he had firmly resolved to stay for that period. Accordingly, if a traveller resolves to remain somewhere for the same length of time that the Prophet ﷺ did, he may shorten; but if he resolves to stay longer, he must pray in full. (2)
Ibn ʿAbbās (may Allah be pleased with them) said: “The Prophet ﷺ and his Companions arrived at daybreak of the fourth day, chanting the talbiyah for the Hajj, so he instructed them to make it…"