Praise be to Allah.
This is what is called the “day of doubt ”, because there is doubt concerning it – is it the last day of Sha’ban or the first day of Ramadan?
Fasting the day of doubt is haram because the Prophet (peace and blessings of Allah be upon him) said, “Fast when you see the new moon and break your fast when you see the new moon , and if you are not sure, then complete the number of Sha’ban as thirty days.” (Narrated by al-Bukhari, 1909)
‘Ammar ibn Yasir said: “Whoever fasts on the day concerning which there is doubt has disobeyed Abu’l-Qasim (peace and blessings of Allah be upon him).” This was narrated by al-Tirmidhi and classed as sahih by al-Albani in Sahih al-Tirmidhi, 553.
Al-Hafiz ibn Hajar said: “It was understood from this that it is haram to fast the day of doubt, because the Sahabah would not say such a thing based on personal opinion, so a report such as this has the same status as a marfu’ hadith.”
The scholars of the Standing Committee said concerning the day of doubt, “The Sunnah indicates that it is haram to fast this day.” (Fatawa al-Lajnah, 10/117)
Shaykh Muhammad ibn ‘Uthaymin (may Allaah have mercy on him) said, after mentioning the difference of opinion concerning the ruling on fasting the day of doubt:
“The most correct of these views is that it is haram, but if it is proven to the ruler that it is obligatory to fast this day and he commands the people to fast, then no one should go against his opinion, and that means that no one should show that he is not fasting on that day, rather a person (who has a different opinion) may not fast, but he should do so secretly.” (Al-Sharh al-Mumti’, 6/318)
And Allah knows best.