As has been stated by others, the first absolute 'on the screen' timeframe reference was STII:TWoK's opening placard of:
"In the 23rd Century..."
During the original series run it was all over the place:
In the original series second pilot "Where No Man Gone Before" gary Mitchell references a poem:
GM: "The Nightingale Woman, written by Phineas Tarbolde on the Canopius planet back in 1996. It's funny you picked that one, Doctor." ..."That's one of the most passionate love sonnets of the past couple of centuries."
^^^
Placing Star Trek in the late 22nd to late 23rd century.
However in "The Squire of Gothos", where Trelane is discussing Napoleon's exploits of the early 1800's, you have a crewman commenting to Kirk:
JAEGER: "Notice the period, Captain. Nine hundred light years from Earth. It's what might be seen through a viewing scope if it were powerful enough."
^^^
And suddenly, Star Trek is firmly in the early 28th century.
And yet later in the first season (as other's have commented) you have "Tomorrow is Yesterday" where the Enterprise is in 1968; and in repose to a Air Force officer commenting that he'll lock Kirk up for 200 years, Kirk replies:
KIRK: "That ought to be just about right."
^^^
Firmly placing Star Trek in the mid 22nd century (2168 - 200 years from 1968).
But, since TWoK, and later solidified with ST:TNG - the accepted time frame for the adventures shown in the original Star Trek series are 2265-2269.
"In the 23rd Century..."
During the original series run it was all over the place:
In the original series second pilot "Where No Man Gone Before" gary Mitchell references a poem:
GM: "The Nightingale Woman, written by Phineas Tarbolde on the Canopius planet back in 1996. It's funny you picked that one, Doctor." ..."That's one of the most passionate love sonnets of the past couple of centuries."
^^^
Placing Star Trek in the late 22nd to late 23rd century.
However in "The Squire of Gothos", where Trelane is discussing Napoleon's exploits of the early 1800's, you have a crewman commenting to Kirk:
JAEGER: "Notice the period, Captain. Nine hundred light years from Earth. It's what might be seen through a viewing scope if it were powerful enough."
^^^
And suddenly, Star Trek is firmly in the early 28th century.
And yet later in the first season (as other's have commented) you have "Tomorrow is Yesterday" where the Enterprise is in 1968; and in repose to a Air Force officer commenting that he'll lock Kirk up for 200 years, Kirk replies:
KIRK: "That ought to be just about right."
^^^
Firmly placing Star Trek in the mid 22nd century (2168 - 200 years from 1968).
But, since TWoK, and later solidified with ST:TNG - the accepted time frame for the adventures shown in the original Star Trek series are 2265-2269.