كتاب الصوم
7  
Fasting
(10a)
Chapter: Private Devotional Exercises in a Mosque - Section 1
(9)
باب الاعتكاف - الفصل الأول
Mishkat al-Masabih 2101
Ibn ‘Umar said that when ‘Umar consulted the Prophet about a vow he had made in the pre-Islamic period to spend a night in devotion in the sacred mosque, he said, “Fulfill your vow.” (Bukhari and Muslim.)
وَعَنِ ابْنِ عُمَرَ: أَنَّ عُمَرَ سَأَلَ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ: " كُنْتُ نَذَرْتُ فِي الْجَاهِلِيَّةِ أَنْ أَعْتَكِفَ لَيْلَةً فِي الْمَسْجِد الْحَرَام؟ قَالَ: «فأوف بِنَذْرِك»
Reference : Mishkat al-Masabih 2101
In-book reference : Book 7, Hadith 142