[Machine] Thawban, the freed slave of the Messenger of Allah ﷺ, narrated: I went out with the Messenger of Allah ﷺ for eighteen nights in the month of Ramadan, and then we came across a man getting his hair shaved in Al-Baqi'. So the Messenger of Allah ﷺ said, "The one who gets his hair shaved and the one who gets his hair trimmed have broken their fast." And likewise...
حَدَّثَنِي ثَوْبَانُ مَوْلَى رَسُولِ اللهِ ﷺ قَالَ خَرَجْتُ مَعَ رَسُولِ اللهِ ﷺ فِي ثَمَانِ عَشْرَةَ لَيْلَةً خَلَتْ مِنْ رَمَضَانَ فَإِذَا رَجُلٌ يَحْتَجِمُ بِالْبَقِيعِ فَقَالَ رَسُولُ اللهِ ﷺ أَفْطَرَ الْحَاجِمُ وَالْمَحْجُومُ وَكَذَلِكَ