It was narrated from Hafsah that the Messenger of Allah (ﷺ) said: There is no fast for the one who did not make it incumbent upon himself from the night before.
It was narrated that ‘Aishah said: “The Messenger of Allah (ﷺ) would enter upon me and say: ‘Do you have anything (any food)?’ If we said: ‘No,’ he would say: ‘Then I am fasting.’ So he would continue fasting, then it we were given some food, he would break his fast.” She said: “Sometimes he would fast and (then) break fast (i.e., combine fasting and breaking fast in one day).” I said: “How is that?” She said: “Like the one who goes out with charity (i.e., something to give in charity),and he gives some away and keeps some.”