Imam al-Shafi'i (may Allah have mercy on him) said: I heard one of the people of knowledge of the Qur'an whom I approve of say: "That you complete the count of the fast of the month of Ramadan and magnify Allah upon its completion for having guided you; and its completion is the setting of the sun on the last day of the month of Ramadan."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب صلاة العيدين / 6127