Spock was a few years younger than McCoy.
How do we know? Spock's age or birthday were never really referred to in the shows or movies, nor his seniority or juniority versus McCoy AFAIK.
And since Data obviously was not referring to 2279, the 'class' line must be ignored (unless it's some form of stardate).
Possibilities:
-AD 2378 (but then somebody screwed up, because that would make TOS take place in the 24th century, not the 23rd, since McCoy's age was unambiguous)
-AD 2278 (perhaps Data and McCoy were intended to be agemates - but that would play off badly against the theme of Data as a naïve Pinocchio)
-Stardate XYZ78 (but that makes no sense because at least the digits Y and Z would be nontrivial here; the "78" would only tell the month or the week)
-Stardate 78XYZ (but that would be inconsistent with the stardates given in the episode itself)
-Stardate X78YZ (possible but really obscure)
-Class with 78 people on it (possible as described, although obviously not the writer intention)
-Class held in the famous Building 78 (quite typical militaryspeak, but perhaps less typical for Data)
-Class taught by a person named "78" (certainly possible in the Trek context, although again obviously not the intention)
The bottom line of this seems to be, though, that the "78" was thrown in either without any thought whatsoever, or then at a point where the script did not yet include the cameo by McCoy.
Timo Saloniemi