When was the theory of comparative advantage developed?

The classical theory of comparative advantage was developed in 1817 by David Ricardo.