Shama-il Tirmidhi Chapter 25, Hadith Number 31 (173).

Ummul Mu’mineen Hazrat Aishah radiyallahu anha says, Rasoolullah sallallahu alaihe wasallam used to come to me and ask if there was any food available. When I would say, ‘No,’ he would say, ‘I have intended to fast.’

Once when Rasoolullah sallallahu alaihe wasallam came and enquired, I replied, ‘We have received a present.’

Rasoolullah sallallahu alaihe wasallam asked, ‘What is it?’

I replied, ‘Malidah (a type of cake made of dates, ghee, cheese or flour).’

He said, ‘I had made an intention of fasting already.’ He then ate some from it.

Two mas’alahs are derived from this hadith. One is that the intention of a nafl fast could be made any time before half of the day has passed, on condition that nothing that nullifies the fast had been committed. Sayyidina Rasoolullah sallallahu alaihe wasallam made the intention (of fasting) after enquiring from Syyidatina Aishah radiyallahu anha. This is the Madh’hab of the Hanafis and Shafi’is. The Madh’hab of Imam Malik rahmatullahi alaihe is that intention of a nafl fast is necessary from night. In this mas’alah we gain support from the above hadith. But because it is against the Madh’hab of a reputed Imam, it is better if the intention of nafl fast is made during the night. If due to circumstances this could not be done, there is no harm if the intention is made a little before Zuhr on that day.

The second mas’alah is, if one has observed a nafl fast, one has the option of breaking it. This is the Madh’hab of Imam Shafi’i. According to the Hanafisit is impermissible to break a fast or salaah, because of the verse, ‘Do not nullify your deeds.’ (47:32) But since we find from this hadith the breaking of the fast, we may act on both in the following manner. Due to an important factor or necessity we may regard it as a concession from this hadith, normally it is impermissible to break the fast without a reason. It is also clear from the hadith that this was the reason of Sayyidina Rasoolullah sallallahu alaihe wasallam breaking the fast. Some Ulama have explained that this sentence, I made an intention of fasting, was not a firm intention but just a thought that I shall fast today. According to this humble servant the first explanation is correct.

Mas’alah: According to the Hanafis, because of some necessity, if a nafl fast is broken, then it will be wajib to observe a re-compensation. It has been narrated in a hadith from Sayyidatina Aishah radiyallahu anha wherein Sayyidina Rasoolullah sallallahu alaihe wasallam told her to observe a re-compensation on another day.