Sahih Muslim Book 6, Hadith Number 2573.

Chapter : Permissibility of making an intention for voluntary fasting before noon and permissibility of breaking voluntary fast without reason.

‘Aisha, the Mother of the Believers (Allah be pleased with her), reported that one day the Messenger of Allah (peace be upon him) said to me: ‘Aisha, have you anything (to eat)? I said: ‘Messenger of Allah, there is nothing with us. Thereupon he said: I am observing fast. She said: The Messenger of Allah (may peace be upon him) went out, and there was a present, for us and (at the same time) some visitors dropped in. When the Messenger of Allah (may peace be upon him) came back, I said to him: Messenger of Allah, a present was given to us, (and in the meanwhile) there came to us visitors (a major Portion of it has been spent on them), but I have saved something for you. He said: What is it? I said: It is hais (a compound of dates and clarified butter). He said: Bring that. So I brought it to him and he ate it and then said: I woke up in the morning observing fast. Talha said: I narrated this Hadith to Mujahid and he said: This (observing of voluntary fast) is like a person who sets apart Sadaqa out of his wealth. He may spend it if he likes, or he may retain it if he so likes.