In the name of Allah, Most Gracious, Most Merciful.
Abu Hurairah (May Allah be pleased with him) reported: The Messenger of Allah (May Allah exalt his mention and protect him from imperfection) said: “Fast when you see the new moon (of Ramadan) and break your fast when you see the new moon (of Shawwal.) If clouds prevent you from seeing it, complete thirty days in the month of Shaban (the one that precedes Ramadan). (Al-Bukhari and Muslim).
Commentary: (…) If the moon of Ramadan is not sighted on the 29th Sha’ban, then its thirty days be completed and Ramadan’s Saum be started on the next day. Similarly, if the moon for the month of Shawwal is not sighted on the 29th of Ramadan, thirty days of Saum must be completed before celebrating ‘Eid-ul-Fitr. This means that the sighting of the moon is necessary for keeping the Saum of Ramadan. Counting by celestial system is not sufficient for this purpose. (…)
Riyaadiss-Saliheen (The Meadows of the Righteous)
By Imam An Nawawi
Chapter 217, Page 356, No 1221