“The Messenger of Allah ﷺ stayed for nineteen days in which he shortened his prayer to two Rak’ah. So, whenever we stayed for nineteen days we would shorten our prayer to two Rak’ah, but if we stayed more than that we would pray four Rak’ah.”
أَقَامَ رَسُولُ اللَّهِ ﷺ تِسْعَةَ عَشَرَ يَوْمًا يُصَلِّي رَكْعَتَيْنِ رَكْعَتَيْنِ فَنَحْنُ إِذَا أَقَمْنَا تِسْعَةَ عَشَرَ يَوْمًا نُصَلِّي رَكْعَتَيْنِ رَكْعَتَيْنِ فَإِذَا أَقَمْنَا أَكْثَرَ مِنْ ذَلِكَ صَلَّيْنَا أَرْبَعًا