Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:6127al-Shāfiʿī > Man Arḍá from Ahl al-ʿIlm Bi-al-Qurān

[Machine] I heard someone who was pleased from the people of knowledge of the Quran saying, "So you complete the count of fasting the month of Ramadan, and you magnify Allah upon its completion according to what He has guided you, and its completion is when the sun sets on the last day of the month of Ramadan." Abu Sa'id bin Abi 'Amr informed us about that, Abu al-'Abbas narrated to us from Ash-Shafi'i who said, "The Shaykh informed me, and it reached me from Sa'id bin Jubair, from Ibn Abbas in his statement, 'And mention the name of your Lord and devote yourself to Him in prayer' [Al-Ala, 15]' He said, 'Mention Allah while heading towards the 'Eid prayer.'"  

البيهقي:٦١٢٧قَالَ الشَّافِعِيُّ

سَمِعْتُ مَنْ أَرْضَى مِنْ أَهْلِ الْعِلْمِ بِالْقُرْآنِ يَقُولُ فَتُكْمِلُوا عِدَّةَ صَوْمِ شَهْرِ رَمَضَانَ وَتُكَبِّرُوا اللهَ عِنْدَ إِكْمَالِهِ عَلَى مَا هَدَاكُمْ وَإِكْمَالُهُ مَغِيبُ الشَّمْسِ مِنْ آخِرِ يَوْمٍ مِنْ أَيَّامِ شَهْرِ رَمَضَانَ أَخْبَرَنَا بِذَلِكَ أَبُو سَعِيدِ بْنُ أَبِي عَمْرٍو ثنا أَبُو الْعَبَّاسِ أنبأ الرَّبِيعُ عَنِ الشَّافِعِيِّ قَالَ الشَّيْخُ وَبَلَغَنِي عَنْ سَعِيدِ بْنِ جُبَيْرٍ عَنِ ابْنِ عَبَّاسٍ فِي قَوْلِهِ {وَذَكَرَ اسْمَ رَبِّهِ فَصَلَّى} [الأعلى 15] قَالَ ذَكَرَ اللهَ وَهُوَ يَنْطَلِقُ إِلَى الْعِيدِ