Dawud bin Abi Hind narrated to us from Ikrimah, who narrates from Ibn Abbas (may Allah be pleased with them both): When a woman gives birth to a child after nine months, she should nurse it for twenty-one months; if she gives birth after seven months, she should nurse it for twenty-three (23) months; and when she gives birth after six (6) months, she should nurse it for twenty-four (24) months, as Allah has said.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الرضاع / 15670