حَدَّثَنَا هَدَّابُ بْنُ خَالِدٍ، حَدَّثَنَا حَمَّادُ بْنُ سَلَمَةَ، عَنْ ثَابِتٍ، عَنْ مُطَرِّفٍ، - وَلَمْ أَفْهَمْ مُطَرِّفًا مِنْ هَدَّابٍ - عَنْ عِمْرَانَ بْنِ حُصَيْنٍ، - رضى الله عنهما - أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ لَهُ أَوْ لآخَرَ ‏"‏ أَصُمْتَ مِنْ سَرَرِ شَعْبَانَ ‏"‏ ‏.‏ قَالَ لاَ ‏.‏ قَالَ ‏"‏ فَإِذَا أَفْطَرْتَ فَصُمْ يَوْمَيْنِ ‏"‏ ‏.‏
Translation
'Imran b. Husain (Allah be pleased with them) reported that the Messenger of Allah (ﷺ) said to a person

Did you observe fast in the middle of this month. i. e. Sha'ban? He said: No. Thereupon he said to him: When it is the end of Ramadan, then observe fast for one day or two (Shu'ba had some doubt about it) but he said: I think that he has said: two days.