Jarir said, "We were with the Prophet ﷺ and he looked at the moon--full-moon--and said, 'Certainly you will see your Lord as you see this moon and you will have no trouble in seeing Him. So if you can avoid missing (through sleep or business, etc.) a prayer before the sunrise (Fajr) and a prayer before sunset (ʿAsr), you must do so.' He then recited Allah's Statement: And celebrate the praises Of your Lord before the rising of the sun and before (its) setting." (50.39) Ismaʿil said, "Offer those prayers and do not miss them."
كُنَّا عِنْدَ النَّبِيِّ ﷺ فَنَظَرَ إِلَى الْقَمَرِ لَيْلَةً يَعْنِي الْبَدْرَ فَقَالَ إِنَّكُمْ سَتَرَوْنَ رَبَّكُمْ كَمَا تَرَوْنَ هَذَا الْقَمَرَ لاَ تُضَامُّونَ فِي رُؤْيَتِهِ فَإِنِ اسْتَطَعْتُمْ أَنْ لاَ تُغْلَبُوا عَلَى صَلاَةٍ قَبْلَ طُلُوعِ الشَّمْسِ وَقَبْلَ غُرُوبِهَا فَافْعَلُوا ثُمَّ قَرَأَ {وَسَبِّحْ بِحَمْدِ رَبِّكَ قَبْلَ طُلُوعِ الشَّمْسِ وَقَبْلَ الْغُرُوبِ} قَالَ إِسْمَاعِيلُ افْعَلُوا لاَ تَفُوتَنَّكُمْ