Anas said that the Prophet visited Umm Sulaim, and when she brought him some dates and clarified butter he said, “Put your butter back in its container and your dates in their vessel, for I am fasting.” He then went to a separate part of the house and prayed a prayer which was not one of the prescribed prayers, and invoked a blessing on Umm Sulaim and the inhabitants of her house.
The Prophet came to visit me one day and asked if I had anything . When I said I had nothing he replied, “Then I shall observe a fast.” When he came to me another day and I told him I had been given a present of some hais* he said, “Show me it, for I began the day fasting.” Then he ate.
*A mixture of dates and clarified butter.
Abu Huraira reported God’s messenger as saying, “When one of you is invited to a meal at a time when he is fasting he should say he is fasting.” In a version he said, “When one of you receives an invitation he should accept it. If he is fasting he should pray, but if not, he should eat.”
He reported God’s messenger as saying, “If anyone out of a desire to please God fasts for a day, God will remove him from jahannam as far as a crow flies from the time it is a young bird till it dies of old age.”
Ahmad transmitted it, and Baihaqi transmitted it in Shu'ab al-iman from Salama b. Qais.