We should first notice that the main subject of Daniel 12 is the time of the end. Daniel writes, "When the power of the holy people has been completely shattered, all these things shall be finished" (verse 7). This refers to verse 1, which says that Michael the archangel will stand up for, or assist and sustain, God's people during a time of trouble "such as never was since there was a nation, even to that time." This is a description of the Great Tribulation Christ echoes in Matthew 24:21-22. Both Daniel 12:7 and Revelation 12:14 show that the Great Tribulation will last three-and-one-half years, or "a time, times, and half a time." This is also 1,260 days or forty-two months (see Daniel 7:25; Revelation 11:2-3).
The angel tells Daniel that his prophecies would be sealed until the end of the age, but in that time "the wise would understand" (Daniel 12:9-10). These prophecies will soon be fulfilled, and God is revealing what they mean to those who obey Him. The 1,290-day and 1,335-day time periods, then, refer to events that will happen to the people of God in this generation. Each period begins with a significant prophetic event, and both end at the return of Jesus Christ.
With these things in mind, notice verse 11: "And from the time that the daily sacrifice is taken away, and the abomination of desolation is set up, there shall be one thousand two hundred and ninety days." This verse indicates that the Jews in the modern nation of Israel may restore the twice-daily sacrifice (see Exodus 29:38-39) for a short time. However, it does not necessarily suggest that a Temple will be built in our time in Jerusalem. They could legitimately offer these sacrifices with only an altar. (Daniel 12:11 was fulfilled in type when Antiochus Epiphanes desecrated the Temple during his assault on Jerusalem in 167-164 BC. See Daniel 8:9-14, 23-26.)
Since this verse also states that the "daily sacrifice is taken away," it is likely that the armies of the Beast of Revelation 17, upon entering Jerusalem, will ban this ritual. Should this be the case, there would be 1,290 days—just a little over three and a half years—until the appearance of the Messiah.
The angel continues in Daniel 12:12, "Blessed is he who waits, and comes to the one thousand three hundred and thirty-five days." This is a blessing pronounced upon the people of God who endure until the 1,335 days, that is, to the period beginning 1,335 days before Christ's coming.
Since no one knows the day of Christ's coming (Matthew 24:36; Acts 1:7), we may not know exactly when the 1,335 days begin. Possibly, the organized efforts of God's people to proclaim the gospel to the world may end at that time. It has also been suggested that the daily sacrifices might be restarted at that time, but the Bible is unclear what happens to begin the 1,335 days.
Whatever the case, forty-five days later, or 1,290 days before the return of Christ, the Beast's armies will surround Jerusalem. Those who are worthy will have been warned and have 30 days to flee to a place of refuge God has provided for them (Revelation 12:14-16). When God's church is in its place of protection, the 1,260 days ("a time, times, and half a time," or 42 months) of the Great Tribulation will begin. At the end of the 1,260 days, Jesus Christ will return to this earth.
In the meantime, as the angel says, we are in the process of being "purified, made white, and refined" (Daniel 12:10). By putting on righteousness and holiness, with patient endurance, we can be among the blessed who wait and come to the 1,335 days.