Abdullah bin Abbas reported,

The Prophet ﷺ never fasted a complete month other than Ramadan. He would fast until one would say, "By Allah, he will not break his fast," and he would go without fasting until one would say, "By Allah, he will not fast."

Azami 4421

Sahih

عن ابن عباس، قال

ما صام النبي ﷺ شهرا كاملا قط غير رمضان، ويصوم حتى يقول القائل: لا والله لا يفطر، ويفطر حتى يقول القائل: لا والله لا يصوم.

الأعظمي 4421صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Fasting
Chapter
Voluntary fasting and encouragement to do it
Section
How did the Prophet ﷺ fast outside of Ramadan?
Numbering
Jami al-Kamil 4421 (2nd edition)
Azami 4421