Hadith.1922 - Commander of the Faithful Imam Ali ibn Abi Talib عليه السلام was asked about the day of doubt (the day when it is uncertain whether it is the last day of Sha'ban or the first day of Month of Ramadan).
Imam عليه السلام said: "Fasting one day from Sha'ban is more beloved to me than breaking my fast for one day in the Month of Ramadan."
It is permissible to fast on that day with the intention that it is from Sha'ban. If it turns out to be from Month of Ramadan, the fast suffices; if it is from Sha'ban, it does no harm. However, if someone fasts on that day while in doubt and without proper intention, they must make up that day, even if it turns out to be from Month of Ramadan, because no obligatory acts are accepted without certainty. It is not permissible for someone fasting on the day of doubt to intend it as being from Month of Ramadan.