Another matter, how did Moses know how many days he had spent? It is written: “He was there with the Lord forty days and forty nights.” From where is it derived that there is no night On High? As it is stated: “Even darkness does not darken for You.
The night, as day, illuminates. Darkness and light are the same” (Psalms 139:12). How did he know? As it is stated: “I stood on the mountain like the first days” (Deuteronomy 10:10), and it is written: “I sat on the mountain” (Deuteronomy 9:9).
Say, now, when He was speaking with him he was standing, and when He would depart from him, he would sit and review what he had learned. You thus uphold [both verses:] “I stood on the mountain” and “I sat on the mountain.” When He spoke with him, he would know it was day, and when He said to him: ‘Study your Torah,’ he would know it was night. Likewise, David said: “Day to day gives utterance; night to night renders understanding” (Psalms 19:3).