It was mentioned to the Messenger of Allah ﷺ that he had said, "I will surely stand in prayer every night and fast every day for as long as I live."The Messenger of Allah ﷺ asked, "Are you the one who said that?"I replied, "I did say it, Messenger of Allah."The Messenger of Allah ﷺ said, "You are not capable of that. So fast and break your fast, sleep and pray, and fast three days of each month, for a good deed is rewarded tenfold, and that is like fasting the entire year."I said, "I can do better than that."He said, "Then fast one day and break your fast for two."I said, "I can do better than that, Messenger of Allah."He said, "Then fast one day and break your fast the next. That is the fast of Dawud, and it is the most balanced form of fasting."I said, "I can do better than that."The Messenger of Allah ﷺ said, "There is nothing better than that."Abdullah bin Amr said, "Had I accepted the three days that the Messenger of Allah ﷺ mentioned, it would have been dearer to me than my family and my wealth."
أخبرنا الربيع بن سليمان قال حدثنا ابن وهب قال أخبرني يونس عن ابن شهاب قال أخبرني سعيد بن المسيب وأبو سلمة بن عبد الرحمن أن
ذكر لرسول الله ﷺ أنه يقول لأقومن الليل ولأصومن النهار ما عشت فقال رسول الله ﷺ أنت الذي تقول ذلك فقلت له قد قلته يا رسول الله فقال رسول الله ﷺ فإنك لا تستطيع ذلك فصم وأفطر ونم وقم وصم من الشهر ثلاثة أيام فإن الحسنة بعشر أمثالها وذلك مثل صيام الدهر قلت فإني أطيق أفضل من ذلك قال صم يوما وأفطر يومين فقلت إني أطيق أفضل من ذلك يا رسول الله قال فصم يوما وأفطر يوما وذلك صيام داود وهو أعدل الصيام قلت فإني أطيق أفضل من ذلك قال رسول الله ﷺ لا أفضل من ذلك قال عبد الله بن عمرو لأن أكون قبلت الثلاثة الأيام التي قال رسول الله ﷺ أحب إلي من أهلي ومالي
Reported by Muslim, no. 1159 (see the preceding hadith from the narration of Ibn Wahb), and by Bukhari, no. 1976, from the narration of Zuhri, through him, and it is in Kubra, no. 2700.