In Parshat Vayechi we are introduced rather dramatically to the concept of Mashiach (Messiah) and the Messianic Age by our Forefather, Yaakov.
"And Jacob (Yaakov) called unto his sons and said: Gather yourselves together that I may tell you that which shall befall you in the End of Days." Most commentators except for the Radak explain that the "End of Days" refers to the Messianic Age. The Ramban goes even further and says Yaakov is clearly referring to the Messianic age because he alludes to the Messianic Era in his Blessing to Yehuda: "The scepter shall not depart from Yehuda, nor a scholar from among his descendants until Shiloh arrives and to him there will be a subduing of Nations."
The Ramban says that "Shiloh" is Mashiach, a descendant of Yehuda. The question that then arises is why did Yaakov lose the ability to tell his children when Mashiach was going to come? According to Rashi the Shechina withdrew from him at that moment. The Kli Yakar deals with this question extensively at the beginning of the Parsha: "And Yaakov lived in the Land of Egypt seventeen years. The days of Yaakov were the years of his life- seven years and a hundred forty years." (47:28) The Kli Yakar makes the case had Yaakov told his sons when the Messianic Age was to take place, Klal Yisrael would not do what it had to do to grow spiritually. It would have bought beautiful houses in the Galut/Exile and not yearned to live in Eretz Yisrael again. They would say that the Mashiach was so far away why yearn and why pray for his coming and our return to Zion.
The point made by the Kli Yakar is simple. The Jews must always have Eretz Yisrael in their Prayers and in their minds. They must yearn to live in Eretz Yisrael. Knowing when the "End of Days" would occur would not have encouraged Jews to reach their ultimate Spiritual potential. Hence it was hidden, but it is guaranteed.
At this point I would like to delve into the concept of Mashiach Ben Yosef and Mashiach Ben David. Clearly Yaakov is speaking to Yosef and his Brothers about "the End of Days". In Gemara Sukkah 52a a dispute occurs between Rabbi Dosa Ben Harkinus and others. Rabbi Dosa says that the prophecy of Zechariah 12:10 applies to the mourning of Mashiach Ben Yosef . We uphold the view of Rabbi Dosa.
Rabbi Shimon Bar Yochai says the Mashiach Ben Yosef will build the Temple first then be killed leading to the Messianic Era of Mashiach ben David. In contemporary times the first chief Rabbi of Israel Abraham Isaac Kook of Blessed Memory in his eulogy of Theodor Herzl in 1904 entitled the "great eulogy in Jerusalem" intimates that the secular Zionists led by Herzl were the counterparts of Mashiach Ben Yosef. They brought the State of Israel into being but Mashiach Ben David would infuse the religious aspects to Zionism, would eventually take over, and bring about the final redemption. It is not too hard to see all of this playing out in front of our very eyes. Yaakov's "End of Days" is near. We pray that it comes soon. Shabbat Shalom.