This excerpt is taken from the book of Fadhilat al-Shaykh Mubashir Ahmad Rabbani, may Allah have mercy on him, Ahkam and Masail of Ramadan.
What should a person do if they only realize that the month of Ramadan has begun after the dawn has broken? :.
Question :.
You are asked about the ruling for a person who only becomes aware of the occurrence of the month of Ramadan after the dawn has broken. What should they do?
Fatwa :.
A person who becomes aware of the arrival of the month of Ramadan only after the dawn has broken is required to abstain from those things that are permissible when not fasting for the rest of the day. This is because it is a day of Ramadan, and it is not permissible for a resident to consume anything from the invalidators of the fast. However, he must make up for that fast because he did not spend the night of fasting before dawn. It is established from the Prophet (peace be upon him) that he said:
من لم يجمع الصيام قبل طلوع الفجر فلا صيام له
"Whoever does not intend to fast before dawn, his fast is not valid."
Reference: (Abu Dawood, Book of Fasting, Chapter on Intention in Fasting: 2454, Tirmidhi, Book of Fasting, Chapter on What is Said About No Fasting for One Who Does Not Intend at Night: 730, Nasai, Book of Fasting: 3330, Ibn Majah: 1700)
And Ibn Qudamah (may Allah have mercy on him) has mentioned this in Al-Mughni, and this is the opinion of the general jurists, referring to obligatory fasts, as we have mentioned from the hadith.
As for voluntary fasts, they can be valid with an intention during the day, provided that nothing from the invalidators is consumed. This is because it is authentically established from the Prophet (peace be upon him) that indicates this. We ask Allah to grant Muslims the ability to do what He loves and to accept their fasts and their prayers. He is All-Hearing and Near.