The Prophet ﷺ said: "If there is an eclipse of the sun or the moon, pray like the last obligatory prayer you did before that."
أَنَّ النَّبِيَّ ﷺ قَالَ إِذَا خَسَفَتِ الشَّمْسُ وَالْقَمَرُ فَصَلُّوا كَأَحْدَثِ صَلاَةٍ صَلَّيْتُمُوهَا
The Prophet ﷺ said: "If there is an eclipse of the sun or the moon, pray like the last obligatory prayer you did before that."
أَنَّ النَّبِيَّ ﷺ قَالَ إِذَا خَسَفَتِ الشَّمْسُ وَالْقَمَرُ فَصَلُّوا كَأَحْدَثِ صَلاَةٍ صَلَّيْتُمُوهَا
The Prophet ﷺ said: "If there is an eclipse of the sun or the moon, pray like the last obligatory prayer you did before that." (Using translation from Nasāʾī 1488)
«إِذَا انْخَسَفَتِ الشَّمْسُ وَالْقَمَرُ فَصَلُّوا كَأَحْدَثِ صَلَاةٍ صَلَّيْتُمُوهَا»
"إذا كسفَتِ الشمسُ فصَلُّوا كأحْدثِ صَلاةٍ صَلَّيتُموها من المكتوبِة".