The Secret of the Calendar Handed Down From Adam to the Messiah

Yalkut Shimoni on Torah 41:3

Another interpretation: "This is the book." The Holy One, blessed be He, intercalated the year and afterward handed it to the first Adam, as it is said, "This is the book of the generations of Adam." The first Adam handed it to Enoch, who entered into the secret of the intercalation and intercalated the year, as it is said (Genesis 5:24), "And Enoch walked with God." Enoch handed it to Noah, who intercalated the year, as it is said, "As long as the earth endures," and so forth. Noah handed it to Shem, who intercalated the year and was called a priest, as it is said (Psalms 110:4), "The LORD has sworn and will not relent: You are a priest forever after the manner of Melchizedek," and "Melchizedek king of Salem," and so forth. Was he then a priest? Rather, because he was a firstborn and served his God by day and by night, he was called a priest. Shem handed it to Abraham, who intercalated the year and was called a priest, as it is said, "And he was a priest of God Most High." Abraham handed it to Isaac, who intercalated the year after the death of Abraham, as it is said (Genesis 25:11), "And it came to pass after the death of Abraham that God blessed Isaac"; because he entered into the secret of intercalation, He blessed him with an everlasting blessing. Isaac handed it to Jacob. Jacob went outside the Land and sought to intercalate the year. The Holy One, blessed be He, said to Jacob: It is not yours to intercalate; behold, Isaac your father will intercalate the year in the Land, as it is said, "And God appeared to Jacob again." Why "again"? Because the first time He appeared to him and prevented him from intercalating the year outside the Land, and when he came to the Land, the Holy One, blessed be He, said to him, Arise and intercalate the year; and because he entered into the secret of intercalation, He blessed him with an everlasting blessing. Jacob handed it to Joseph and his brothers, and they intercalated the year in the land of Egypt. When Joseph and his brothers died, the intercalations diminished; and so they are destined to diminish at the end of the fourth kingdom. And just as the Holy One, blessed be He, revealed Himself to Moses and Aaron, so is He destined to reveal Himself to the King Messiah.

Themes