Some direct references to Earth dates in dialog from 22nd-25th century
Voyager has a lot.
(Time and Again): TUVOK: A Romulan research colony was nearly destroyed during the testing of one these devices. It lead to the Polaric Test Ban Treaty of 2268.
(Eye of the Beholder): TUVOK: Captain, what year is it?
TELEK: What year?
TUVOK: If you please.
TELEK: By your calendar, the year is 2351.
CHAKOTAY: But this is 2371.
(The 37s): JANEWAY: What I'm going to tell you is going to sound hard to believe. Even preposterous. We think you were abducted from Earth in the 1930's and brought millions of miles through space to a planet on the other side of the galaxy. You were put into a kind of deep sleep for a very long time. It's not the 1930's any more. The year is 2371, over four hundred years from the time you were abducted.
(Dreadnought): DREADNOUGHT [OC]: Probability assessment indicates you are operating within the parameters of the Cardassian Federation Alliance, as described in the treaty of 2367. A treaty rejected by the Maquis.
(Dreadnought): DREADNOUGHT [OC]: Probability assessment indicates you are operating within the parameters of the Cardassian Federation Alliance, as described in the treaty of 2367. A treaty rejected by the Maquis.
(Lifesigns): EMH: It's all part of my programming. For example, this exact procedure was developed by Doctor Leonard McCoy in the year 2253. I'm equipped with the collective medical knowledge of more than three thousand cultures. Additionally, as you see here, my imaging system allows me to perform, and in many cases improve upon, the most delicate tactile manoeuvres required by a dizzying array of surgical procedures.
(Warlord): KIM: Volleyball. They're a Championship team. Gold medal winners in 2216.
(Scientific Method): TORRES: Well, I appreciate the sacrifice. Tell me about the wine.
PARIS: Ah. Ktarian Merlot, 2282. You might want to let it breathe first.
(Year of Hell): TORRES: A notorious athlete, Parrises Squares championship finals, er, controversial decision.
KIM: M'Kota R'Cho. The first and only Klingon to play the game. During the finals of 2342 one of the referees called a penalty against his team. R'Cho strangled him.
(Year of Hell): JANEWAY: I think I'll replicate a bottle of Saint Emillion for the occasion. 2370. I hear that was a good year.
(In the Flesh) CHAKOTAY: Before today? March 3rd, 2368. The day I resigned my commission. I can still remember the look on the Admiral's face.
(11:59) KIM: It was around 2210. My uncle Jack was on a deep space mission to Beta Capricus.
(Warhead); PARIS: Neelix, you're a saint. Okay, that'll be one bottle of Mouton Rothschild, a 2342 if it's in the database. A Terrelian pheasant, steamed asparagus, and a single rose.
(Alice): PARIS: All right, all right, hold on. If you were married in 2304 and your daughter was conceived in your eleventh pon farr, that would make you a hundred and sixty two years old.
(Q2) ICHEB: Though it was a blatant violation of the Prime Directive, Kirk saved the Pelosians from extinction, just as he had the Baezians and the Chenari many years earlier. Finally, in the year 2270, Kirk completed his historic five year mission
(Endgame): CADET: In the year 2377, you aided the Borg resistance movement known as Unimatrix Zero.
(Endgame): Chakotay's gravestone says 2329-2394
Now while some of those are in time travel related episodes and refer to the travel (37s, Eye of the Beholder), there are others in those episodes which don't refer to dates due to time travel (Endgame, Year of Hell).
Ancient Earth History may include references to Kirk and McCoy, but Chakotay's resignation, Parrises Squares, and Ktarian Merlot don't fit in either category.
Broadly the categories are
1) Explaining (in universe) time difference to time travellers
2) Dating alcohol
3) Sport events
4) Treaty dates
5) Events from >100 years ago
But even then there are statements like Chakotay's in "In the Flesh".
TOS, TNG and DS9 have fewer references
TOS
(Wolf in the Fold) COMPUTER: Working. 1932. Shanghai, China, Earth. Seven women knifed to death. 1974, Kiev, USSR, Earth. Five women knifed to death. 2105. Martian colonies. Eight women knifed to death. 2156. Heliopolis, Alpha Eridani Two.
TNG
(The Neutral Zone) DATA: By your calendar two thousand three hundred sixty four
(Up the Long Ladder) PICARD: Locate all Earth deep space launches from 2123 until 2190, with a destination in or near the Ficus sector. (et. al)
I can't find a single reference in DS9 to a specific year (plenty of relative references, e.g.
SISKO: I'd like you to meet Harmon Bokai, a baseball player from the London Kings who's been dead for two hundred years.
DULMUR: A hundred and five years, one month, and twelve days ago.,
or references to a century like
COMPUTER: Idran is based on the analysis conducted in the twenty-second century by the Quadros-One probe of the Gamma Quadrant.
DAX: A similar subspace rupture was reported in the Hanoli System in the mid twenty third century.