The Shulchan Aruch · Orach Chayim
אורח חיים תקמ״חOrach Chayim 548
Siman 548 of 697 in Orach Chayim — 20 se'ifim
הלכות חול המועדLaws of Chol HaMoed· siman 548
Se’if 1א׳
הַקּוֹבֵר אֶת מֵתוֹ בְּתוֹךְ הָרֶגֶל לֹא חָל עָלָיו אֲבֵלוּת בָּרֶגֶל, אֶלָּא לְאַחַר הָרֶגֶל מַתְחִיל לִמְנוֹת ז' וְנוֹהֵג בָּהֶם אֲבֵלוּת; וּמוֹנֶה שִׁלֹשִׁים מִיּוֹם הַקְּבוּרָה וְנוֹהֵג בִּשְׁאָר הַשְּׁלֹשִׁים כְּכָל גְּזֵרוֹת שְׁלֹשִׁים.
1. The Laws of Mourning on Chol Hamoed, 20 Seifim: One who buries a dead [relative] on a holiday does not have the obligations of mourning during the holiday. After the holiday, he observes shiva and mourns accordingly. He counts thirty days from the burial and observes the mourning practices for the remainder of the thirty days [that are after the holiday].
Se’if 2ב׳
בִּמְקוֹמוֹת שֶׁעוֹשִׂין שְׁנֵי יוֹם טוֹב מוֹנֶה הַשִּׁבְעָה מִיּוֹם טוֹב שֵׁנִי הָאַחֲרוֹן, אַף עַל פִּי שֶׁאֵינוֹ נוֹהֵג בּוֹ אֲבֵלוּת, הוֹאִיל וּמִדִּבְרֵיהֶם הוּא עוֹלֶה לוֹ מִן הַמִּנְיָן; וּמוֹנֶה מֵאַחֲרָיו שִׁשָּׁה יָמִים בִּלְבַד. (אִם יוֹם שֵׁנִי שֶׁל רֹאשׁ הַשָּׁנָה עוֹלָה לְמִנְיַן ז' עַיֵּן בְּיוֹרֵה דֵּעָה סִימָן שצ"ט סי"ג בַּהַגָּהוֹת)
2. In places where they observe two days of Yom Tov, the shiva begins on the second day of the end of the festival, even if no mourning is observed then; because this day is only rabbinic, it counts towards the shiva, and one only counts six days following it. Rem"a: Regarding whether the second day of Rosh Hashanah counts towards the shiva, see glosses on Yoreh Deah 399:13.
Se’if 3ג׳
הַקּוֹבֵר אֶת מֵתוֹ בְּיוֹם טוֹב שֵׁנִי שֶׁל גָּלֻיּוֹת שֶׁהוּא יוֹם טוֹב הָאַחֲרוֹן, אוֹ בְּיוֹם טוֹב שֵׁנִי שֶׁל עֲצֶרֶת, נוֹהֵג בּוֹ אֲבֵלוּת אִם הָיָה אוֹתוֹ הַיּוֹם יוֹם מִיתָה וּקְבוּרָה, הוֹאִיל וְיוֹם טוֹב שֵׁנִי מִדִּבְרֵיהֶם וַאֲבֵלוּת יוֹם רִאשׁוֹן שֶׁל תּוֹרָה, יִדָּחֶה עֲשֵׂה שֶׁל דִּבְרֵיהֶם מִפְּנֵי עֲשֵׂה שֶׁל תּוֹרָה; אֲבָל אִם קָבְרוּ אוֹתוֹ בְּיוֹם טוֹב שֵׁנִי שֶׁל רֹאשׁ הַשָּׁנָה, אֵינוֹ נוֹהֵג בּוֹ אֲבֵלוּת, שֶׁשְּׁנֵיהֶם כְּיוֹם אָרֹךְ. הַגָּה: וְיֵשׁ חוֹלְקִים דִּסְבִירָא לְהוּ דְּאֵין נוֹהֵג אֲבֵלוּת בְּשׁוּם יוֹם טוֹב שֵׁנִי, וְכֵן מִנְהָג פָּשׁוּט וְאֵין לְשַׁנּוֹת. (ר"ת וְהָרֹא"שׁ).
3. One who buries his dead [relative] on the second day of yontif in the Diaspora that is the last day of the festival or the second day of Shavuot should observe mourning practices if that day is both the day of death and the day of burial. Because the second day of yontif is a rabbinic obligation and the first day of mourning is a Torah obligation, a rabbinic commandment can be superseded by a Torah commanded. However, if he was buried on the second day of Rosh Hashanah, we do not observe mourning practices because the two days are considered one long day. Rem"a: There are those who disagree and hold that one should not observe any mourning practices on the second day of yontif, and this is the widespread practice that should not be changed (Rabbeinu Hananel and the Rosh).
Shulchan Aruch, Orach Chayim — Torat Emet 363 edition, via Sefaria — public domain
English: Sefaria Community Translation — CC0