The Book on Jana''iz (Funerals)
كتاب الجنائز عن رسول الله صلى الله عليه وسلم
Read the English translation first, with the original Arabic directly underneath.
What Has Been Related About It Being Disliked To Pray The Funeral Salat While The Sun Is Rising And While It Is Setting
Jabir bin Abdullah narrated:
"The Prophet (ﷺ) took Abdur-Rahman bin Awf by the hand and went with him to his son Ibrahim. He found him in his last breaths, so he took him and put him on his lap and cried. Abdur-Rahman said to him: 'You cry? Didn't you prohibit (your followers) from crying?' He said: 'No. But I prohibited two foolish immoral voices: A voice during a calamity while clawing at one's face and tearing one's clothes, and Shaitan's scream.'" And there is more that is stated in the Hadith.
لاَ وَلَكِنْ نَهَيْتُ عَنْ صَوْتَيْنِ أَحْمَقَيْنِ فَاجِرَيْنِ صَوْتٍ عِنْدَ مُصِيبَةٍ خَمْشِ وُجُوهٍ وَشَقِّ جُيُوبٍ وَرَنَّةِ شَيْطَانٍ