The basic principle is that the traveler who is actually traveling is the one who is granted a concession allowing him to shorten the four-rak’ah prayers, because Allah says (interpretation of the meaning):
“And when you (Muslims) travel in the land, there is no sin on you if you shorten As‑Salaah (the prayer)” [al-Nisa’ 4:101]
The kind of travel for which the concession of travel is prescribed is that which is regarded as travel according to custom. Whoever travels avail himself of the concessions for travelers, such as wiping over his socks for three days and two nights, joining and shortening prayers, and not fasting during Ramadaan. If this traveler intends to stay in a place for more than four days, then he should only utilize the concession during the travel distance and then he should not avail himself of the concessions when he arrives at his destination. If he intends to stay there for four days or less, then he may avail himself of the concessions for travelers.
If a traveler stays in a place but does not know when he will finish his business and cannot state a certain length of time for his stay, then he may avail himself of the concessions for traveling even if he stays for a long time.
The majority of scholars are of the view that a traveler may avail himself of the concessions of travel so long as he is not staying in the place to which he has gone for four or more days, whether he travels for work, medical treatment, a vacation or any other reason. The scholars based their opinion on the following proof in the hadeeth of Jaabir and Ibn ‘Abbaas (may Allaah be pleased with them) that the Prophet (peace and blessings of Allaah be upon him) came to Makkah on the fourth of Dhu’l-Hijjah for the Farewell Pilgrimage, and he (peace and blessings of Allaah be upon him) stayed for the fourth, fifth, sixth and seventh, and he prayed Fajr in al-Abtah on the eighth day, and he shortened his prayers during those days. He had formed the intention to stay, as is well known. So everyone who travels and intends to stay for this length of time that the Prophet (peace and blessings of Allaah be upon him) stayed, or less, may shorten his prayers. Whoever intends to stay longer than that should offer the prayers in full, because he does not come under the heading of a traveler.
However, the view of Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) says that the traveler is allowed the dispensation of shortening and combining his prayers, and of not fasting so long as he is still considered to be a traveler during the distance of the travel and for as long as he stays on travel even if that takes weeks or months because of the general meaning of the texts allowing the consession and because there is no proof of restricting the concession to any specific number of days during travel.