The Messenger of Allah ﷺ met me and said, "Have I not been told that you say, 'I will surely stand in prayer all night and fast all day'?"I think he said, "Yes, Messenger of Allah, I did say that."He said, "Stand in prayer and sleep, fast and break your fast. Fast three days of every month, for that is like fasting the entire year."I said, "Messenger of Allah, I am capable of more than that."He said, "Then fast one day and break your fast for two."I said, "I am capable of more than that."He said, "Then fast one day and break your fast the next. That is the most balanced form of fasting, and it is the fast of Dawud."I said, "I am capable of more than that."The Messenger of Allah ﷺ replied, "There is nothing better than that."
حدثنا الحسن بن علي حدثنا عبد الرزاق حدثنا معمر عن الزهري عن ابن المسيب وأبي سلمة
لقيني رسول الله ﷺ فقال ألم أحدث أنك تقول لأقومن الليل ولأصومن النهار قال أحسبه قال نعم يا رسول الله قد قلت ذاك قال قم ونم وصم وأفطر وصم من كل شهر ثلاثة أيام وذاك مثل صيام الدهر قال قلت يا رسول الله إني أطيق أفضل من ذلك قال فصم يوما وأفطر يومين قال فقلت إني أطيق أفضل من ذلك قال فصم يوما وأفطر يوما وهو أعدل الصيام وهو صيام داود قلت إني أطيق أفضل من ذلك فقال رسول الله ﷺ لا أفضل من ذلك
Bukhari narrated it in the Book of Fasting, chapter "Fasting the whole year," hadith no. 1976, and Muslim in the Book of Fasting, chapter "The prohibition of..." hadith no. 1159, from the hadith of Zuhri through this route. It is also found in Musanaf Abdul-Razzaq, hadith no. 7862, on fasting the whole year for one who is harmed by it.