The Book of Oaths (Kitab Al-Aiman)

Muslim :: Book 15 : Hadith 4075

lbn 'Umar reported: When Allah's Apostle (may peace be upon him) came back from the Battle of Hunain, Umar asked Allah's Messenger (may peace be upon him) about the vow he had taken during the days of Ignorance that he would observe I'tikaf for a day. The rest of the hadith is the same.