This characteristic mocking of literary ennui was ostensibly made by Wilde at an English country house some time before 1882—but evidently it was not noted until 1884 in America, a little time after Wilde's visits there by American newspapers which often carried anecdotes about Wilde.
The remarks about the comma appear as an exchange in one of the stories either he was relating, or that were being related about him .
The first example is from the The Topeka Daily Capital, on June 5, 1884 (opposite top) a reprinting from the New York Graphic, (not found) which was identically reprinted that year in The Indiana Herald, on June 11, Watkins Express (Schuyler Co., NY) on June 12, the Fort Wayne Daily Gazette on June 13, the Coffeyville Weekly Journal on June 14, &c.
British journals appear to have been quick to seize upon good copy appropriated from other newspapers, even from as far as America.
The second example (opposite) is a reprinting of the American story with only minor changes, and appeared later that year in Household Words: A Weekly Journal, edited by Charles Dickens.
The quotation has been variously recorded, but the version that has been the popular source for successive biographers is Sherard.
Wilde's first biographer, Robert Harborough Sherard (1861—1943), wrote several books about Wilde and his circle, and he included the anecdote, slightly amended, in his first two biographies (examples 3 and 4 opposite).
Sherad's reference to the 'English country house' suggests that his source may have been the earlier press reports rather than personal reminiscence—if so, his accounts contain some artistic license, including the improvement of the afternoon for the comma's return.
Original research and text by John Cooper
 It is impossible to know whether the story, even if told by Wilde, is based on a fact or frivolity—but on the evidence it is a fair inference given its nature to attribute it to him (cf. Gustave Flaubert, below)
Some sources associate the idea appropriately with the famously fastidious Flaubert, but this may be a confusion with a letter he wrote to Leon Lauren-Pichat, on December 7, 1856, in which he asserted that he would not change even a comma of a manuscript.
The Letters of Gustave Flaubert, 1830-1857, Volume 1, Harvard University Press, 1980
The Topeka Daily Capital, Topeka, KS, June 5, 1884, 6
Household Words: A Weekly Journal, Volume 8, November 1884 to April 1885 (Odds and Ends, p.79), Charles Dickens, Ed.
Sherard, Robert Harborough, Oscar Wilde: The Story of an Unhappy Friendship, The Hermes Press, 1902
Sherard, Robert Harborough, The Life of Oscar Wilde. London: T. Werner Laurie, 1906