Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bukhari:1080Mūsá b. Ismāʿīl > Abū ʿAwānah > ʿĀṣim And Ḥuṣayn > ʿIkrimah > Ibn ʿAbbās

The Prophet ﷺ once stayed for nineteen days and prayed shortened prayers. So when we travel led (and stayed) for nineteen days, we used to shorten the prayer but if we traveled (and stayed) for a longer period we used to offer the full prayer.  

البخاري:١٠٨٠حَدَّثَنَا مُوسَى بْنُ إِسْمَاعِيلَ قَالَ حَدَّثَنَا أَبُو عَوَانَةَ عَنْ عَاصِمٍ وَحُصَيْنٍ عَنْ عِكْرِمَةَ عَنِ ابْنِ عَبَّاسٍ ؓ قَالَ

أَقَامَ النَّبِيُّ ﷺ تِسْعَةَ عَشَرَ يَقْصُرُ فَنَحْنُ إِذَا سَافَرْنَا تِسْعَةَ عَشَرَ قَصَرْنَا وَإِنْ زِدْنَا أَتْمَمْنَا