18th century England.
Several slang words for gay men use a word that has a female reference. The most direct method is to use a female name. 'Molly' is the oldest known slang term, and uses this procedure (early 18th century).
Molly is a familiar form of Mary, and Mary Ann a related example.Other examples include Cissy or Sissy, Gussie, Jessie, Margery, Nancy, Nellie, Nola and Pansy.
"Women's Names for Male Homosexuals" in the Encyclopedia of Homosexuality Ed. by Wayne R. Dynes