ENOfficial
It was narrated from Ibn 'Umar that 'Umar had vowed -during the Jahiliyyah- to spend a day in 'Itikaf. He asked the Messenger of Allah (ﷺ) about that, and he commanded him to perform the 'Itikaf.
Source: sunnah.com
Other translations
Arabic
أَخْبَرَنَا أَحْمَدُ بْنُ عَبْدِ اللَّهِ بْنِ الْحَكَمِ، قَالَ حَدَّثَنَا مُحَمَّدُ بْنُ جَعْفَرٍ، قَالَ حَدَّثَنَا شُعْبَةُ، قَالَ سَمِعْتُ عُبَيْدَ اللَّهِ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، أَنَّ عُمَرَ، كَانَ جَعَلَ عَلَيْهِ يَوْمًا يَعْتَكِفُهُ فِي الْجَاهِلِيَّةِ فَسَأَلَ رَسُولَ اللَّهِ صلى الله عليه وسلم عَنْ ذَلِكَ فَأَمَرَهُ أَنْ يَعْتَكِفَهُ .
sunnah.com