Umar had vowed during the days of ignorance to spend a day in spiritual retreat. He asked the Messenger of Allah ﷺ about it, and he instructed him to fulfill the retreat.
حدثنا محمد حدثنا شعبة عن عبيد الله بن عمر عن نافع
أن عمر كان قد جعل عليه يوما يعتكفه في الجاهلية فسأل رسول الله ﷺ عن ذلك فأمره أن يعتكف