It was reported in al-Sahihayn from ‘Imran ibn Husayn, may Allah be pleased with him, that the Prophet (blessings and peace of Allah be upon him) said to a man: “Have you fasted anything of the Sirar of this month?” He said: “No.” He said: “If you have not fasted, then fast two days.” According to a report Reported by Al-Bukhari: I think he meant Ramadan. According to a report Reported by Muslim, (the Prophet, blessings and peace of Allah be upon him) said: “Have you fasted anything of the Sirar of Sha'ban?” (Reported by Al-Bukhari, 4/2000; Muslim, no. 1161).
There was some dispute as to the meaning of the word Sirar. The most well known view is that it refers to the end of the month. The end of the month is called Sirar because the moon is hidden (Istisrar) at that time. Someone may raise the point that it was reported in as-Sahihayn from Abu Hurayrah, may Allah be pleased with him, that the Prophet (blessings and peace of Allah be upon him) said: “Do not pre-empt Ramadan by one or two days, except for those who have the habit of fasting regularly, in which case they may fast.” (Reported by Al-Bukhari, no 1983; Muslim, no. 1082).
How can we reconcile the Hadith which encourages fasting at this time with the Hadith which says not to fast at this time? The answer is: many of the scholars and most of those who commented on this Hadith said: this man to whom the Prophet (blessings and peace of Allah be upon him) addressed this question was known to have the habit of fasting regularly, or else he had made a vow, so the Prophet (blessings and peace of Allah be upon him) commanded him to make up his fast. There are also other points of view on this issue.