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.
bayhaqi:7895Abū Ṣāliḥ b. Abū Ṭāhir al-ʿAnbarī > Jaddī Yaḥyá b. Manṣūr al-Qāḍī > ʿUmar b. Ḥafṣ al-Sadūsī > ʿĀṣim b. ʿAlī > al-Masʿūdī > ʿAmr b. Murrah > ʿAbd al-Raḥman b. Abū Laylá > Muʿādh b. Jabal > Uḥīl al-Ṣiyām Thalāthah Aḥwāl Fadhakar al-Ḥadīth

[Machine] As for fasting, the Messenger of Allah ﷺ observed fasting after arriving in Madinah. He used to fast three days from every month, as well as fasting on the day of Ashura. He continued to fast for seventeen months, from the month of Rabi' al-Awwal to the month of Rabi' al-Thani, until Ramadan came. Then Allah, the Most Blessed and Exalted, obligated him to fast the month of Ramadan, as stated in the verse "Fasting is prescribed for you as it was prescribed for those before you" [Surah Al-Baqarah, 2:183]. The rest of this narration was mentioned by Mursal Abdullah ibn Rahman, who did not reach Muadh ibn Jabal.  

البيهقي:٧٨٩٥أَخْبَرَنَا أَبُو صَالِحِ بْنُ أَبِي طَاهِرٍ الْعَنْبَرِيُّ أنبأ جَدِّي يَحْيَى بْنُ مَنْصُورٍ الْقَاضِي ثنا عُمَرُ بْنُ حَفْصٍ السَّدُوسِيُّ ثنا عَاصِمُ بْنُ عَلِيٍّ ثنا الْمَسْعُودِيُّ ثنا عَمْرُو بْنُ مُرَّةَ عَنْ عَبْدِ الرَّحْمَنِ بْنِ أَبِي لَيْلَى عَنْ مُعَاذِ بْنِ جَبَلٍ ؓ قَالَ أُحِيلَ الصِّيَامُ ثَلَاثَةَ أَحْوَالٍ فَذَكَرَ الْحَدِيثَ قَالَ

وَأَمَّا حَوْلُ الصِّيَامِ فَإِنَّ رَسُولَ اللهِ ﷺ صَامَ بَعْدَمَا قَدِمَ الْمَدِينَةَ فَجَعَلَ يَصُومُ مِنْ كُلِّ شَهْرٍ ثَلَاثَةَ أَيَّامٍ وَصَامَ عَاشُورَاءَ فَصَامَ سَبْعَةَ عَشَرَ شَهْرًا شَهْرَ رَبِيعٍ إِلَى شَهْرِ رَبِيعٍ إِلَى رَمَضَانَ ثُمَّ إِنَّ اللهَ تَبَارَكَ وَتَعَالَى فَرَضَ عَلَيْهِ شَهْرَ رَمَضَانَ فَأَنْزَلَ عَلَيْهِ {كُتِبَ عَلَيْكُمُ الصِّيَامُ كَمَا كُتِبَ عَلَى الَّذِينَ مِنْ قَبْلِكُمْ} [البقرة 183] وَذَكَرَ بَاقِيَ الْحَدِيثِ هَذَا مُرْسَلٌ عَبْدُ الرَّحْمَنِ لَمْ يُدْرِكْ مُعَاذَ بْنَ جَبَلٍ