Why does it say "Ashrei ha'Mechakeh v'Yagi'a l'Yamim Elef Shelosh Me'os Sheloshim va'Chamishah"?
Rashi (here and 8:14): This is 45 years more than 1290. Mashi'ach will come after 1290 years, and be hidden for 45 years (Midrash Rus 5:6). A Piyut of R. Eliezer ha'Kalir 1 says Shiro Shavu'im Shishah (42 years); he did not count the three years that are not a full Shavu'a.
Ibn Ezra (11): He endures the great afflictions - "Lehashnayah Zimnin v'Das" (7:25). Daniel combined these numbers, which are not at one time (1290 days at the end of Bayis Sheni, and 1335 days before Mashi'ach) because the numbers are close. When Melech ha'Tzafon will leave and take Egypt after three and a half years, Mashi'ach will come, just we do not know when he will go to Egypt.
Malbim #1: From the Ketz of verse 11, Ge'ulah can come at any time, until 1335 years from then, i.e. the year 5685. We explained that there are two other Ketzim – "Mo'ed Mo'adim va'Chetzi" (5673 - refer to 7:25:4:3) and "v'Nitzdak Kodesh" (5688 - refer to 8:14:3:4). It will begin in 5673, and endure 14 years, two Shavu'im – the Shavu'a in which Ben David comes, and the Shavu'a of Gog; the verse says that they will burn for seven years. Binyan ha'Mikdash will begin in 5685, and finish in three years, 5688. The angel said in Belshatzar's third year that the Tamid will be returned after 2300 years, i.e. in 5688 2 .
Malbim #2: If we count the 2300 years from Churban Sheni, they finish in 5638. "V'Nitzdak Kodesh" – the Goyim will recognize Yisrael's virtue and the Kedushah of their Torah, and cease to afflict them.
Malbim #3: We count from Bitul ha'Tamid in Bayis Rishon. Even though an idol was not put in it then, the idolaters said that their god overpowered 3 . After 1290 years was 4628 4 . We divide the added 1335 years into two stages. (a) After 1000 years (5628), Yisrael's horn begins to sprout 5 . Happy is one who waits and reaches this time! There will be another 335 years until Techiyas ha'Mesim in 5963 – 37 years before the seventh millennia. "V'Sanu'ach v'Sa'amod l'Goralcha l'Ketz ha'Yamin" (13) – then will be Techiyas ha'Mesim.
Hagahah in Rashi (Tehilim 121:1, based on Tosfos Chagigah 13a DH v'Raglei): Ha'Kalir is the Tana R. Elazar b'Ribi Shimon. (Some say so -Gilyon ha'Shas ibid.)
Malbim: The current year is 5628, 60 years earlier. The Zohar says that there will be an arousal 60 years before Mashi'ach. One can calculate "Idan v'Idanin u'Flag Idan" to be 1800 years, i.e. 5628 (refer to 7:25:4:3). I.e. the Ge'ulah will begin in this year.
I.e. this fulfills "v'Lases Shikutz Shomem." (PF)
Malbim (13): This is 800 years after Churban Sheni, i.e. twice the length of Galus Mitzrayim. Above (refer to 12:11:2:3), I explained that the first Ketz is 4350, 522 years after Churban Sheni. Of 800 years of Galus decreed, 210 were in Egypt, and 70 in Bavel; 520 remain. The year after the Churban (3829) is the first of them, and they end in 4349. The next year, 4350, they can be redeemed if they merit.


