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.
quran:31:29

Do you not see that Allah causes the night to enter the day and causes the day to enter the night and has subjected the sun and the moon, each running ˹its course˺ for a specified term, and that Allah, with whatever you do, is Acquainted?  

Have you not seen, have you ˹not˺ realised, O you being addressed, that God makes the night pass into the day and makes the day pass into the night, such that the increase of the one is relative to the decrease of the other, and He has disposed the sun and the moon, each, of the two, running, in its course, to an appointed term, namely, ˹to˺ the Day of Resurrection, and that God is Aware of what you do?
القرآن:٣١:٢٩

أَلَمْ تَرَ أَنَّ اللَّهَ يُولِجُ اللَّيْلَ فِي النَّهَارِ وَيُولِجُ النَّهَارَ فِي اللَّيْلِ وَسَخَّرَ الشَّمْسَ وَالْقَمَرَ كُلٌّ يَجْرِي إِلَىٰ أَجَلٍ مُسَمًّى وَأَنَّ اللَّهَ بِمَا تَعْمَلُونَ خَبِيرٌ  

{ألم ترَ} تعلم يا مخاطب {أن الله يُولج} يدخل {الليل في النهار ويولج النهار} يدخله {في الليل} فيزيد كل منهما بما نقص من الآخر {وسخَّر الشمس والقمر كلُّ} منهما {يجري} في فلكه {إلى أجل مسمى} هو يوم القيامة {وأن الله بما تعملون خبير}.