The World Federation One Stop Fiqh

Ruling 1548

If there is doubt as to whether it is the last day of Shaʿbān or the first day of the month of Ramadan and someone keeps a fast with the intention of a qaḍāʾ fast or a recommended fast or suchlike, and if during the day he finds out that it is the month of Ramadan, he must make the intention of the fast of the month of Ramadan [and continue fasting].