Someone asked, "Messenger of Allah, what about one who fasts every day of the year?"He replied, "He has neither fasted nor broken his fast," or he said, "He has not fasted and has not broken his fast."The man asked, "Messenger of Allah, what about one who fasts two days and breaks his fast for one?"He answered, "Can anyone manage that?"The man asked, "What about one who fasts a day and breaks his fast a day?"He said, "That is the fast of Dawud ."The man asked, "What about one who fasts one day and breaks his fast for two?"He said, "I wish I had the strength for that."Then he said, "Three days of every month, and from Ramadan to Ramadan, this is fasting the entire year."
أخبرنا قتيبة قال حدثنا حماد عن غيلان بن جرير عن عبد الله بن معبد الزماني عن أبي قتادة قال
يا رسول الله كيف بمن يصوم الدهر كله قال لا صام ولا أفطر أو لم يصم ولم يفطر قال يا رسول الله كيف بمن يصوم يومين ويفطر يوما قال أو يطيق ذلك أحد قال فكيف بمن يصوم يوما ويفطر يوما قال ذلك صوم داود عليه السلام قال فكيف بمن يصوم يوما ويفطر يومين قال وددت أني أطيق ذلك قال ثم قال ثلاث من كل شهر ورمضان إلى رمضان هذا صيام الدهر كله
Muslim narrated it, no. 1162, from Qutayba bin Saeed, from Hammad bin Zayd, with this chain (see the previous hadith, no. 2385), and it is in Al-Kubra, no. 2695.