The light called Day and the darkness called Night had nothing to do with the sun and the moon by the way:
Genesis 1:14 And God said, “Let there be lights in the vaulted dome of heaven ⌊to separate day from night⌋, and let them be as signs and for appointed times, and for days and years, 15 and they shall be as lights in the vaulted dome of heaven to give light on the earth.” And it was so. 16 And God made two great lights, the greater light to rule the day and the smaller light to rule the night, and the stars. 17 And God placed them in the vaulted dome of heaven to give light on the earth 18 and to rule over the day and over the night, and to ⌊separate light from darkness⌋. And God saw that it was good.