Hadith 7.2
Fasting
Abu Umama reported God’s messenger as saying, "If anyone fasts for a day while on <i>jihad</i>,* God will put between him and hell a ditch as wide as the distance between heaven and earth." *<i>Mirqat</i> gives this meaning, but says it may refer to the <i>hajj</i>, the <i>'umra</i>, seeking knowledge, or desiring to please God. The Arabic is 'in God’s way.' Tirmidhi transmitted it.
وَعَنْ أَبِي أُمَامَةَ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «مَنْ صَامَ يَوْمًا فِي سَبِيلِ اللَّهِ جَعَلَ اللَّهُ بَيْنَهُ وَبَيْنَ النَّارِ خَنْدَقًا كَمَا بَيْنَ السَّمَاءِ وَالْأَرْضِ» . رَوَاهُ التِّرْمِذِيّ
Hadith gradings, numbering and translations can differ between editions. For legal rulings or detailed interpretation, consult qualified scholarship and the referenced edition.