that is encouraged and yields the greatest reward for those who fast, such that those who observe these fasts are likened to someone who fasts every day.
The answer is: Merely drawing a comparison with a hypothetical act does not imply that it is permissible, let alone recommended, although it does imply equivalence in reward if that act were recommended. The evidence lies in the hadith itself: it equates fasting three days of every month with fasting every day, because a good deed is rewarded tenfold. This means that the person receives the reward of someone who fasts three hundred and sixty days, even though such fasting is unquestionably forbidden. Thus, what is meant is receiving that reward on the supposition that fasting three hundred and sixty days were prescribed.
Likewise, he said concerning fasting six days of Shawwāl: “Together with fasting (1) Ramadan, it is equivalent to fasting the whole year.” Then he recited:
“Whoever comes with a good deed will receive ten times as much.” [al-An‘ām: 160]
Thus, fasting thirty-six days is equivalent to fasting three hundred and sixty days, although the latter is impermissible by consensus. Indeed, such comparisons may concern an act that cannot ordinarily be performed, or is even impossible. The person who performs the act is compared to someone performing the other act on the supposition that it were possible. For example, he said to someone who asked him about a deed equivalent to jihad: “Can you, when the fighter sets out, stand in prayer without letting up and fast without breaking your fast?” (2) It is well known that this is ordinarily impossible, just as fasting three hundred and sixty days is forbidden by religious law. Yet a virtuous deed has been compared to each of them.
This becomes still clearer from the fact that the night prayer most beloved to Allah is the night prayer of David, which is better than praying throughout the entire night, as explicitly stated in the authentic Sunnah (3). He also likened someone who performs the late evening (4) prayer