I see Paul drawing upon at least two Old Testament prophecies for his statement. The first is found in Daniel 9:24:
24 Seventy weeks are decreed upon thy people and upon thy holy city, to finish transgression, and to make an end of sins, and to make reconciliation for iniquity, and to bring in everlasting righteousness, and to seal up vision and prophecy
, and to anoint the most holy.
And the second is found in Zech 13:1-4:
1 In that day there shall be a fountain opened to the house of David and to the inhabitants of Jerusalem, for sin and for uncleanness.
2 And it shall come to pass in that day, saith Jehovah of hosts, that I will cut off the names of the idols out of the land, and they shall no more be remembered; and also I will cause the prophets
and the unclean spirit to pass out of the land.
3 And it shall come to pass that, when any shall yet prophesy, then his father and his mother that begat him shall say unto him, Thou shalt not live; for thou speakest lies in the name of Jehovah
; and his father and his mother that begat him shall thrust him through when he prophesieth.
4 And it shall come to pass in that day, that the prophets shall be ashamed every one of his vision, when he prophesieth; neither shall they wear a hairy mantle to deceive:
Some of you have come to the understanding that in order for the New Covenant to be given, the Old Covenant had to be accomplished or completed. Lk 21:22 is a verse that works well for me. Jesus in speaking of the desolation of Jerusalem, said: "For these are days of vengeance, that all things which are written may be fulfilled." Daniel and Zechariah are for me part of the writings of which Jesus is referring and which must be fulfilled.
I have noted on this list some comments on Daniel's 70 weeks prophecy and I think that most of you see that this prophecy has its fulfillment with the desolation of Jerusalem. For we note in Dan 9:26, "And after the threescore and two weeks shall the anointed one be cut off, and shall have nothing: and the people of the prince that shall come shall destroy the city and the sanctuary
; and the end thereof shall be with a flood, and even unto the end shall be war; desolations are determined."
Jesus also notes in his prophecy in Mt 24 that Daniel's prophecy about the abomination of desolation would be fulfilled before that generation passed away. (Mt 24:15, 34). I would see the parallel to this in Luke as being "all things written" as applying to what Jesus said about Daniel's prophecy.
One of the things that Dan 9:24 lists as having fulfillment in the 70 weeks is "to seal up vision and prophecy." We know that on Pentecost that there was an outpouring of vision and prophecy which continued throughout the apostles' ministry. This surely was not the time of the fulfillment of the 70 weeks, but that time would surely come with the desolation of Jerusalem. And this is the time when vision and prophecy would be sealed up.
This is the same time as given by Zech 13. A fountain is opened for sin and uncleanness. In that day the prophet and unclean spirit would be removed from the land. This is the time for the completion of "an end of sin" which is also in Daniel's 70 weeks prophecy. Some see this at the cross, but I think you can see that that really don't fit well there. Especially since "vision and prophecy" have to fit into the scenario. And now in this passage when the prophets pass from the land, a fountain is opened for "sin and uncleanness."
Paul, then, in 1Cor 13 sees a time for prophecy and tongues to cease. It comes at the time of the "Perfect," which may also translate "End", "Finish," or "Completion." That End would for me be the End of the Age of which the apostles asked in Mt 24:3 (what is the sign of your coming and the end of the age?), and of which Christ said, "This gospel of the kingdom would be preached to the whole world and then the end would come." (Mt 24:14). I see Jesus saying that the end of the Mosaic Age would occur at the desolation of Jerusalem.