Ibn ʿAbbas said, "We stayed for 19 days with Prophet on a journey during which we used to offer shortened prayers." Ibn ʿAbbas added, "We offer the Qasr prayer (i.e. shortened prayer) If we stay up to 19 days as travelers, But if we stay longer, we offer complete prayers.
أَقَمْنَا مَعَ النَّبِيِّ ﷺ فِي سَفَرٍ تِسْعَ عَشْرَةَ نَقْصُرُ الصَّلاَةَ وَقَالَ ابْنُ عَبَّاسٍ وَنَحْنُ نَقْصُرُ مَا بَيْنَنَا وَبَيْنَ تِسْعَ عَشْرَةَ فَإِذَا زِدْنَا أَتْمَمْنَا