|The gist of the zeroth law, namely that if body A is in an equilibrium of heat exchange with body B, as indicated by say volume markings on body B, if B were a body of mercury, as in a thermometer, and if B were in heat equilibrium with C, of the the same markings, then A and C are in the same heat equilibrium.|
One of the first to stated the basics of the zeroth law was Scottish physicist and chemist Joseph Black. In the late 18th century, to cite one example, in his “Lectures on the Elements of Chemistry” delivered at the University of Edinburgh, Black outlined the view that “a second improvement in our knowledge of heat, which has been attained by the use of thermometers, is the more distinct notion we have now than formerly, of the distribution of heat among different bodies.”  He continues, “I remarked formerly, that, even without the help of thermometers, we can perceive a tendency of heat to diffuse itself from any hotter body to the cooler around, until it be distributed among them, in such a manner that none of them are disposed to take any more heat from the rest. The heat is thus brought into a state of equilibrium.” This is one of the first statements of the zeroth law of thermodynamics.
Black continues “this equilibrium is somewhat curious. We find that when all mutual action is ended, a thermometer, applied to any one of the bodies, acquires the same degree of expansion: therefore the temperature of them all is the same, and the equilibrium is universal. No previous acquaintance with the peculiar reaction of each to heat could have assured us of this, and we owe the discovery entirely to the thermometer.” He then states, what is now, essentially considered the “combined law of thermodynamics, that “we must therefore adopt, as one of the most general laws of heat, that: all bodies communicating freely with each other, and exposed to no inequality of external action, acquire the same temperature, as indicated by a thermometer. All acquire the temperature of the surrounding medium.”
In this context of the property thermal equilibria, Black typically is cited in prefix histories on the zeroth law.  Most references, however, state that Irish physicist James Maxwell’s 1871 law of equal temperatures, stated by Maxwell as:
“if when two bodies are placed in thermal communication neither of them loses or gains heat, the two bodies are said to have equal temperatures of the same temperature [and] are then said to be in thermal equilibrium.”
This was the first formulation of what is now called the zeroth law. 
The actual establishment of this argument to the position of a zeroth law, as “two systems in thermal equilibrium with a third system are in thermal equilibrium with each other”, was first formulated by Ralph Fowler in 1931.  It seems, however, that the actual coining of the term “zeroth law” was done jointly by Fowler and Edward Guggenheim in their 1939 Statistical Thermodynamics textbook: 
“The concept of temperature. As a natural generalization of experience we introduce the postulate: if to assemblies are each in thermal equilibrium with a third assembly, they are in thermal equilibrium with each other. From this it may be shown to follow that the condition for thermal equilibrium between several assemblies is the equality of a certain single-valued function of the thermodynamic states of the assemblies, which may be called the temperature t, any one of the assemblies being used as a ‘thermometer’ reading the temperature t on a suitable scale. This postulate of the ‘existence of temperature’ could with advantage be known as the zeroth law of thermodynamics.”
This seems to be the first use of the term "zeroth law", in the framework of thermodynamics.
1. Cengel, Y. & Boles, M. (2002). Thermodynamics – an Engineering Approach, 4th Ed. (textbook). New York: McGraw Hill.
2. Shorthand laws: Zeroth (equilbirum principle), First (energy principle), Second (entropy principle), Third (temperature principle).
3. Black, Joseph. (1786). Lectures on the Elements of Chemistry. University of Edinburgh.
4. Katchalsky, Aharon and Curran, Peter F. (1965). Nonequilibrium Thermodynamics in Biophysics (pg. 6). Harvard University Press.
5. Maxwell, James. (1871). Theory of Heat (pgs. 32, 336). London: Longmans, Green and Co.
6. Kestin, Joseph. (1979). A Course in Thermodynamics, Vol. 1. (pg. 40). Taylor and Francis.
7. Fowler, Ralph and Guggenheim, Eduard A. (1939). Statistical Thermodynamics: a Version of Statistical Mechanics for Students of Physics and Chemistry (zeroth law: pg. 56 - coined). Cambridge University Press.
8. Pierre, Perrot. (1998). A to Z of Thermodynamics (pg. 328). Oxford University Press.
● 10+ Variations of the Zeroth Law of Thermodynamics – Institue of Human Thermodynamics.