Wa `alaykum as-Salamu wa Rahmatullahi wa Barakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
1- Fasting is one of the most meritorious deeds. However, a person should always adhere to the guidance of the Shariah in every act. He cannot fast on days when it is not permissible to fast.
2- Muslims look for the new moon of Ramadan on the night following the 29th day of Shaban. If the weather conditions do not permit the new moon to be sighted, then Shaban has 30 days, and this 30th day is the day of doubt.
4- However, if it is one’s habit to fast Mondays, for example, and the day of doubt happens to be Monday, then it is okay since he is certain of his intention.
5- If one has to make up for a missed day of the obligatory fasting from the previous Ramadan and has no other chance except that day (i.e., the day of doubt), then he can fast.
Answering your question, the late Muslim scholar Sheikh Atiyyah Saqr, the late head of Al-Azhar Fatwa Committee, states:
There are also some texts forbidding fasting the one or two days preceding Ramadan. Prophet Muhammad (peace be upon him) said, “Do not precede the month of Ramadan with one or two days of fasting, unless it is the habit of any of you (i.e., the person is not specifying these days but ordinarily fasts on them and the few days before them).” (At-Tirmidhi)
Also, fasting the day of doubt is an act of disobedience, for the Prophet said, “Whoever fasts the day of doubt, has disobeyed Abul-Qasim (i.e. The Prophet).” (Abu Dawud and At- Tirmidhi) This is the view of Malik, Ahmad, Ash-Shafi`i and others.
Most of the scholars hold the view that if a person fasts on that day and then it shows up that the day is one of the days of Ramadan, he has to make up for it.
The simple reason for this is that by fasting that day, he does not make the intention to fast the day of Ramadan, and the lack of the intention leads to the invalidity of the fast on that day.
In fact, when a person fasts that day, he cannot ascertain whether it is a day of Ramadan or not since it is a day of doubt. The intention is to be based on certainty.
If it is his habit to fast Mondays, for example, and this day happens to be Monday, then it is okay since he is certain of his intention.
Thus, the day will be counted as nafl (voluntary) fasting if it shows up to be the 30th of Shaban, and it will be considered fard (obligatory) if it shows up to be the first of Ramadan. This is the view of Hanafis.
Some Companions agree that it is allowable to fast on the day of doubt. Among those Companions are Aishah, Umar, Ibn Umar, Anas ibn Malik, Abu Hurairah, Muawiyah and Amr ibn Al-Aas (may Allah be pleased with them).
As for the wisdom of not fasting on that day, there are different opinions in this regard. All in all, Ibn Hajar states that such fasting goes in contrary with the ruling that links the beginning of fasting to the sighting of the new moon, which can be deduced from the hadith of the Prophet.
It is clear that if one has to make up for a missed day of the obligatory fasting from the previous Ramadan and has no other chance except that day (i.e., the day of doubt), then he can fast.
Also, if someone makes a vow to fast a specific day and it happens to be the day of doubt, then fasting is permitted and he incurs no sin.
Allah Almighty knows best.
Editor’s note: This fatwa is from Ask the Scholar’s archive and was originally published at an earlier date.