[Machine] Translation: The Prophet ﷺ stayed in Mecca for seventeen (or eighteen) days, shortening the prayer and offering two rak'ahs. These narrations differ between seventeen and eighteen days, as you can see. The most authentic narration, in my opinion, is the one reported by Muhammad ibn Isma'il al-Bukhari in his Sahih. Abdullah ibn al-Mubarak also adopted this narration, and there is no disagreement about it.
أَنَّ النَّبِيَّ ﷺ أَقَامَ بِمَكَّةَ سَبْعَ عَشْرَةَ يَقْصُرُ الصَّلَاةَ يُصَلِّي رَكْعَتَيْنِ اخْتَلَفَتْ هَذِهِ الرِّوَايَاتُ فِي تِسْعَ عَشْرَةَ وَسَبْعَ عَشْرَةَ كَمَا تَرَى وَأَصَحُّهَا عِنْدِي وَاللهُ أَعْلَمُ رِوَايَةُ مَنْ رَوَى تِسْعَ عَشْرَةَ وَهَى الرِّوَايَةُ الَّتِي أَوْدَعَهَا مُحَمَّدُ بْنُ إِسْمَاعِيلَ الْبُخَارِيُّ فِي الْجَامِعِ الصَّحِيحِ فَأَخَذَ مَنْ رَوَاهَا وَلَمْ يُخْتَلَفْ عَلَيْهِ عَلَى عَبْدِ اللهِ بْنِ الْمُبَارَكِ وَهُوَ أَحْفَظُ مَنْ