(33) باب الصَّوْمِ فِي السَّفَرِ وَالإِفْطَارِ
Narrated `Aisha:
(the wife of the Prophet) Hamza bin `Amr Al-Aslami asked the Prophet, "Should I fast while traveling?" The Prophet (ﷺ) replied, "You may fast if you wish, and you may not fast if you wish."
Reference: Sahih al-Bukhari 1943
In-book reference: Book 30, Hadith 50
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 3, Book 31, Hadith 164