عَنْ أَنَسٍ
قَالَ: كَانَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ يَعْتَكِفُ فِي الْعَشْرِ الْأَوَاخِرِ مِنْ رَمَضَانَ فَلَمْ يَعْتَكِفْ عَامًا. فَلَمَّا كَانَ الْعَامُ الْمقبل اعْتكف عشْرين
The Prophet (sallallahu alayhi wa sallam) was accustomed to engage in private devotion in the mosque during the last ten nights of Ramadan; but one year he omitted it and he engaged in it during twenty nights the next year. Tirmidhi transmitted it, and Abu Dawud and Ibn Majah transmitted it from Ubayy ibn Kab.