Imam Al-Nawawi's Riyad-us-Saliheen
Chapter 219
The Prohibition of Observing Saum (Fasting) after the Middle of Sha'ban

1224. Abu Hurairah (May Allah be pleased with him) reported: The Prophet (sallallaahu ’alayhi wa sallam) said, "Do not observe Saum (fasting) for a day or two days preceding Ramadan. However, if a person is in the habit of observing Saum on a particular day (which may fall on these dates), he may fast on that day.''
[Al-Bukhari and Muslim].

Commentary: "However, if a person is in the habit of observing Saum on a particular day'' means that if it is his routine to observe Saum on these days, then he can do so two days before the advent of Ramadan. The reason being that in that case his Saum will not be for the reception of Ramadan but a matter of routine. Some people have taken "one or two days before'' to mean the first two days of the second half of Shawwal on the grounds that some Ahadith contain prohibition of observing Saum in the second fortnight of Shawwal. Because of this injunction, it is not permissible to observe Saum in these days, except in case it is one's routine.

1225. Ibn `Abbas (May Allah be pleased with them) reported: The Messenger of Allah (sallallaahu ’alayhi wa sallam) said, "Do not observe Saum (fasting) before the advent of Ramadan. Observe Saum at sighting of the crescent of Ramadan and terminate it at sighting the crescent (of Shawwal). If the sky is overcast, complete (the month as) thirty (days).''
[At-Tirmidhi].

Commentary:  "Before the advent of Ramadan'' here signifies the second half of Shawwal. That is, one should not observe voluntary Saum after 15th of Sha`ban so that one's vitality is maintained for the Saum of Ramadan approaching near. If the moon is not sighted due to clouds, then observing Saum should be started after completing thirty days of Sha`ban. Similarly, if the moon of the of Shawwal is not sighted, then thirty days of fasting Ramadan must be completed before celebrating `Eid-ul-Fitr.

1226. Abu Hurairah (May Allah be pleased with him) reported: The Messenger of Allah (sallallaahu ’alayhi wa sallam) said, "When there comes the middle of Sha`ban, don't observe Saum (fasting).''
[At-Tirmidhi].

1227. `Ammar bin Yasir (May Allah be pleased with them) reported: He who observes the fast on a doubtful day, has in fact disobeyed Abul-Qasim, (i.e., Messenger of Allah (sallallaahu ’alayhi wa sallam)).
[Abu Dawud and At-Tirmidhi].

Commentary:  "Doubtful day'' here signifies the day of 30th Sha`ban. In other words, if the moon is not sighted on 29th of Sha`ban because of clouds and a person observes Saum, he will be in doubt whether it is the 30th of Sha`ban or the 1st of Ramadan. Thus, there is no need to observe Saum on a doubtful day, and one should complete thirty days of the month of Sha`ban.