וַיְהִ֕י מִקֵּ֖ץ שְׁנָתַ֣יִם יָמִ֑ים וּפַרְעֹ֣ה חֹלֵ֔ם וְהִנֵּ֖ה עֹמֵ֥ד עַל־הַיְאֹֽר׃
And it came to pass at the end of two full years, that Pharaoh dreamed: and, behold, he stood by the river.
Classical midrash: Bereshit Rabbah 89:1 (and parallel).
Sefaria · Bereshit Rabbah 89:1
וַיְהִי מִקֵּץ שְׁנָתַיִם יָמִים. קֵץ שָׂם לַחֹשֶׁךְ (איוב כח, ג), זְמַן נָתַן לָעוֹלָם כַּמָּה שָׁנִים יַעֲשֶׂה בָּאֲפֵלָה.
English of Core Text: “And it came to pass at the end of two full years.” “He sets an end to darkness” (Job 28:3) — He fixed a time for the world, how many years it would spend in gloom.
On the daf / in context: Bereshit Rabbah opens its comment on the verse by linking “mikeitz” to the divine appointment of an end to periods of darkness and suffering. The two years of Yosef’s continued imprisonment are presented as a measured term that Heaven had already determined.
Type of Learning: Derash on the verse (classic midrash) — not a formal named middah of the 13; the midrash reads the temporal phrase as evidence of a predetermined limit to affliction.
What Is Learned: Every period of darkness has a fixed end appointed by Heaven. The two additional years Yosef spent in prison were not endless; they had a “ketz” that arrived precisely when the time for his elevation had come.