Dan. ch. 12 concerns the destruction of both Jerusalem and the temple in AD 70. Dan. ch. 8 concerns the desecration of the temple only.
The end of the prophesy of Dan. 12 is speaking of the end of the 490 years that Gabriel began telling him about in Dan. 9:24. Daniel chap. 9 through Dan. chap. 12 is the prophesy of the complete destruction of Jerusalem.
"Seventy weeks are determined upon thy people and upon thy holy city,... " (KJV)
The people and the city are identified as "thy people" and "thy holy city". Daniel's people were the Judeans (Jews) and Daniel's holy city was Jerusalem. This limits the prophesy so that it cannot be applied to any other than Daniel's people and city- the Jews and Jerusalem.
The prophesy continues on through all of chapters 10, 11 and 12.
We are told in Dan. ch.12 when the end of this prophesy would be.
"7 And I heard the man clothed in linen, which was upon the waters of the river, when he held up his right hand and his left hand unto heaven, and sware by him that liveth for ever that it shall be for a time, times, and an half; and when he shall have accomplished to scatter the power of the holy people, all these things shall be finished."
The end of the 490 years was when the power of the holy people was scattered. The power of the holy people (the Jews) was centered in the council / sanhedrin which operated out of Jerusalem and the Herodian temple. It was scattered completely when that temple was destroyed in AD 70 and the genealogy was burned.
Dan. 12:11 defines the beginning and ending points of the 1290 days. From the beginning is the time the daily sacrifice was taken away, which happened during the Roman occupation around the fall of AD 66 when Eleazar, son of the High Priest Ananias ordered the gentile sacrifices and the peace offerings to Caesar to be stopped. This angered the Romans, and Josephus considered it to be the real beginning of the Roman-Jewish wars. (1)
The ending point of the 1290 days was when the "abomination of desolation" - that which caused the desolation or destruction - appeared. Christ references this prophesy in Matt. 24:15 when discussing the destruction of the temple. The abomination of desolation is defined in Luke 21:22.
"And when ye shall see Jerusalem compassed with armies, then know that the desolation thereof is nigh." (KJV)
The abomination of desolation was the Roman army which besieged Jerusalem, and destroyed the city and tore down the temple so that not one stone was left upon another (Matt. 24:2). The end point of the 1290 days was approx. Sep 24 - 26, AD 70, also the first of Tishri, Yom Teruah, the Day of Trumpets.
See The Signs of the Feast, Parts I, II, and III for more information on the Day of Trumpets at my blog ShreddingTheVeil.
See also The Gathering of the Elect for some of the details of the Roman-Jewish war and the prophesy of the destruction of the temple from Matt. 24 and Luke 21 here.
The Daily Sacrifice Ceased - AD 66, by Ed Stevens here