In case...
In case, therefore, he forgets this and observes a recommended fast and remembers it before midday his recommended fast is nullified and he can turn his intention to an obligatory fast, and if he takes notice of the position after midday his fast is void, and if he remembers this after sunset, his fast is in order. 1573. If it is obligatory for a person to observe a specific fast other than the fasts of the month of Ramazan, for example.
if he has vowed that he would observe fast on a particular day, and he does not make an intention purposely till the Azan for dawn prayers, his fast is void. And if he does not know that it is obligatory for him to fast on that day or forgets about it and remembers it before midday, and if he has not performed any act which invalidates a fast and makes an intention to fast, his fast is in order, but otherwise it is void. 1574.
If a person does not make an intention till near midday for an unspecified obligatory fast, like a fast for atonement, (Kaffarah) there is no harm in it. Rather if he had decided before making an intention to fast that he would not fast, or was undecided as to whether he should or should not fast, and if he has not performed any act, which invalidates a fast, and makes an intention before midday to fast, his fast is in order. 1575.
If an unbeliever embraces Islam in the month of Ramazan before midday, he should, on the basis of obligatory precaution, make an intention to fast, and complete it. And if he does not observe fast on that day he should observe its qaza. 1576. If a patient recovers from his illness in the middle of a day of the month of Ramazan, before or after noon, it is not obligatory for him to observe fast on that day although he may not have performed any act at that time, which invalidates a fast. 1577.
If there is a doubt about the last day of Shaban or the fist day of Ramazan then the fast of that day is not obligatory. If however, somebody wants to observe fast on that day he cannot do so with the intention of observing the Ramazan fast nor can he do so with the intention that if it is the Ramazan day then it is the Ramazan fast and if it is not Ramazan then it is the lapsed fast or some other fast like that.
He should rather observe the fast with the intention of the lapsed fast or some other fast and if it is known later that it was the Ramazan day then it will be counted as the Ramazan fast.