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:1983al-Ṣalt b. Muḥammad > Mahdī > Ghaylān > Abū al-Nuʿmān > Mahdī b. Maymūn > Ghaylān b. Jarīr > Muṭarrif > ʿImrān b. Ḥuṣayn

That the Prophet ﷺ asked him (Imran) or asked a man and ʿImran was listening, "O Abu so-and-so! Have you fasted the last days of this month?" (The narrator thought that he said, "the month of Ramadan"). The man replied, "No, O Messenger of Allah ﷺ!" The Prophet ﷺ said to him, "When you finish your fasting (of Ramadan) fast two days (in Shawwal)." Through another series of narrators ʿImran said, "The Prophet ﷺ said, '(Have you fasted) the last days of Sha'ban?"  

البخاري:١٩٨٣حَدَّثَنَا الصَّلْتُ بْنُ مُحَمَّدٍ حَدَّثَنَا مَهْدِيٌّ عَنْ غَيْلاَنَ وَحَدَّثَنَا أَبُو النُّعْمَانِ حَدَّثَنَا مَهْدِيُّ بْنُ مَيْمُونٍ حَدَّثَنَا غَيْلاَنُ بْنُ جَرِيرٍ عَنْ مُطَرِّفٍ عَنْ عِمْرَانَ بْنِ حُصَيْنٍ ؓ

عَنِ النَّبِيِّ ﷺ أَنَّهُ سَأَلَهُ أَوْ سَأَلَ رَجُلاً وَعِمْرَانُ يَسْمَعُ فَقَالَ يَا أَبَا فُلاَنٍ أَمَا صُمْتَ سَرَرَ هَذَا الشَّهْرِ قَالَ أَظُنُّهُ قَالَ يَعْنِي رَمَضَانَ قَالَ الرَّجُلُ لاَ يَا رَسُولَ اللَّهِ قَالَ فَإِذَا أَفْطَرْتَ فَصُمْ يَوْمَيْنِ لَمْ يَقُلِ الصَّلْتُ أَظُنُّهُ يَعْنِي رَمَضَانَ قَالَ أَبُو عَبْدِ اللَّهِ وَقَالَ ثَابِثٌ عَنْ مُطَرِّفٍ عَنْ عِمْرَانَ عَنِ النَّبِيِّ ﷺ مِنْ سَرَرِ شَعْبَانَ