The sun stood still and the moon stayed until the nation avenged themselves on their enemies. This is written in the book of Yashar. The sun stayed in the middle of the sky and did not rush to set for almost an entire day.
What is the book of Yashar? “Sefer HaYashar” in Hebrew means “Book of the Upright” and Rashi on 2 Samuel 1:18 tells us that it refers to the book of Genesis, which details the lives of the righteous Avraham, Yitzchak and Yaakov. So where is our incident alluded to in that book? Rashi says in Genesis 48:19, where Yaakov told Yosef that the descendants of Ephraim would be even greater than those of Menashe. (Joshua, of course, is from the Tribe of Ephraim.)