Islam has days for voluntary fasting, e.g., Mondays and Thursdays, and Muhammad was known to fast on these days (e.g. Aishah narrated: "The Prophet used to try to fast on Mondays and Thursdays." sunnah.com) and others ("He observed Sawm on many days of the year..." Al-Islam). I'm wondering if, during times of battle, Muhammad continued these voluntary fasts, given that it might impair his ability to fight.
Question: Did the Prophet Muhammad fast voluntarily during times of battle?
I found one pertinent sahih hadith:
Narrated Abu al-Darda: We went out along with the Messenger of Allah (ﷺ) for some battle in intense heat, so much so that one of us placed his hand on his head, or placed his palm on his head, due to intense heat, No one of us fasted except the Messenger of Allah (ﷺ) and 'Abd Allah b. Rawahah. -- Sunan Abi Dawud 2409 [grade: sahih] (sunnah.com)
This implies he fasted despite battle, but it doesn't clarify if this was a voluntary or obligatory fast. I also found one weak hadith, which I'm not sure if I should take seriously:
Ma'mar bin Abi Huyaiyah narrated that: he asked Ibn Al-Musaiyab about fasting on a journey, so he narrated to him that Umar bin Al-Khattab said: "We fought in two battles along with the Messenger of Allah during Ramadan; the Day of Badr, and the Conquest (of Makkah), so we broke our fast during them." -- Jami` at-Tirmidhi 714 [grade: da'if] (sunnah.com)