context: Handheld roller gins had been used in the Indian subcontinent since at earliest AD 500 and then in other regions.[2] The Indian worm-gear roller gin, invented some time around the sixteenth century,[3] has, according to Lakwete, remained virtually unchanged up to the present time. A modern mechanical cotton gin was created by American inventor Eli Whitney in 1793 and patented in 1794. Whitney's gin used a combination of a wire screen and small wire hooks to pull the cotton through, while brushes continuously removed the loose cotton lint to prevent jams. It revolutionized the cotton industry in the United States, but also led to the growth of slavery in the American South as the demand for cotton workers rapidly increased. The invention has thus been identified as an inadvertent contributing factor to the outbreak of the American Civil War.[4] Modern automated cotton gins use multiple powered cleaning cylinders and saws, and offer far higher productivity than their hand-powered precursors.[5]
question: When was the cotton gin invented?
answers.text: earliest AD 500 1793 1793