“God said: Let there be lights in the firmament of the heavens to distinguish between the day and the night; let them be for signs, for appointed times, for days, and years” (Genesis 1:14). “God said: Let there be lights” – Rabbi Yoḥanan began: “He made the moon for appointed times” (Psalms 104:19). Rabbi Yoḥanan said: It was only the sun that was created to illuminate.1“Let there be” (yehi) is in the singular.

If so, why was the moon created? For the appointed times, in order to sanctify New Moons and years according to its calculation. Rabbi Shilo of Kefar Tamarta said in the name of Rabbi Yoḥanan: Even though “He made the moon for the appointed times,” “the sun knows its setting” (Psalms 104:19) – [the month is counted only] from the time that “the sun knows its setting.” One does not count [the months] by the moon until after the sun has set.2If the astronomical new moon takes place during the day, the calendric New Moon is not fixed on that day, but only upon the next setting of the sun, which is the start of the following day.

Yusti Ḥavra said in the name of Rabbi Berekhya: It says: “They traveled from Rameses in the first month, on the fifteenth day of the month” (Numbers 33:3).3The Sages had a tradition that the astronomical new moon of the month of the Exodus was after noon on a Wednesday, and that the Exodus took place two weeks later, on a Thursday. If you count according to the moon,4The visibility of the moon. Since the astronomical new moon was on Wednesday afternoon, the moon would not be visible until Thursday night. until now, there had been only fourteen sunsets.5If the calendric New Moon had been counted from the first visibility of the moon on Thursday night, the Exodus (on a Thursday) would have taken place after only fourteen sunsets, not fifteen.

That is, it would be called the fourteenth of the month, not the fifteenth. And furthermore, if the calendric New Moon would have begun on the day of the astronomical new moon (Wednesday), the Exodus would have been on the sixteenth. [We see] then that one counts for the moon only after the sun sets.6The calendric New Moon is counted from the sunset following the astronomical new moon, that being Wednesday night for the month of the Exodus.

Accordingly, the Exodus itself occurred on the fifteenth. Rabbi Azarya said in the name of Rabbi Ḥanina: It was only the sun that was created to illuminate. If so, why was the moon created? It is that it teaches that the Holy One blessed be He foresaw that the idolaters were destined to make them [the sun and the moon] into gods.

The Holy One blessed be He said: If even when they challenge one another,7By both being present together in the sky. the idolaters make them into gods, had there been only one [luminary], all the more so.8The moon was created in order to diminish the inclination to treat the sun as a deity. Rabbi Berekhya said in the name of Rabbi Simon: Both of them were created to illuminate, as it is stated: “They shall serve as lights” (Genesis 1:15); “God set them in the firmament of the heavens [to illuminate upon the earth]” (Genesis 1:17).

“Let them be for signs” – these are Shabbatot; “and for appointed times” – these are the three pilgrimage festivals; “for days” – these are New Moons; “and years” – this is the sanctification of years.9The determination by a religious court when a new year should begin.