The Messenger of Allah ﷺ said, "Allah said, 'Every deed of the son of Adam is for him, except fasting. It is for Me, and I shall reward it. Fasting is a shield. When it is the day of fasting for one of you, let him not engage in obscene speech or raise his voice in argument. If someone insults him or tries to fight him, let him say, "I am a fasting person." By the One in whose hand is the soul of Muhammad, the smell of the fasting person's breath is more fragrant to Allah than the scent of musk. The fasting person has two joys to delight in. When he breaks his fast, he rejoices, and when he meets his Lord, he rejoices in his fast.'"
قال رسول الله ﷺ: قال الله: كل عمل ابن آدم له إلا الصيام فإنه لي وأنا أجزي به، والصيام جنة، وإذا كان يوم صوم أحدكم فلا يرفث ولا يصخب، فإن سابه أحد أو قاتله فليقل: إني امرؤ صائم. والذي نفس محمد بيده لخلوف فم الصائم أطيب عند الله من ريح من ريح المسك. للصائم فرحتان يفرحهما: إذا أفطر فرح، وإذا لقي ربه فرح بصومه.
Bukhari related it in the Book of Fasting (1904), and Muslim in the Book of Fasting (1151:163), both through the route of Ibn Jurayj, who said, "Ataa (that is, Ibn Abu Rabah) told me, on the authority of Abu Salih the oil merchant, that he heard Abu Hurairah say" (then he mentioned it). The wording given is Bukhari's, and Muslim's wording is close to it.His saying, "except fasting, for it is Mine and I reward for it." Fasting was prescribed for those before us as a means of disciplining and subduing the self, and fasting was not considered an act of worship among them. Rather, their worship consisted of sujud to idols, calling upon them, making vows to them, and performing tawaf around them. In Islam, however, Allah made fasting a type of worship like prayer, zakat, Hajj, and other acts. This is why Allah singled out fasting as being for Him, and He rewards those who fast without measure, because for His sake they gave up food, drink, and desires, and fasting, unlike other acts of worship, cannot be tainted by showing off.His saying, "and fasting is a shield" (junnah, with the jim pronounced with damma) means a covering and protection from sins in this world and from the Fire in the Hereafter.His saying, "so let him not engage in rafath" (with the fa pronounced with either damma or kasra). What is meant by rafath is obscene speech, and the term is also applied to sexual intercourse and to what leads up to it.His saying, "and let him not sakhab" and in Muslim's wording "and let him not sakhab" with a sin instead of a plain sad, carrying the same meaning. Sakhab means quarreling and shouting.His saying, "than the khuluf of the mouth of the fasting person." Khuluf (with the kha pronounced with damma and the lam following) refers to the change in the odor of the fasting person's mouth caused by fasting.