And know that laughter is also like a bit of joy and is not actual joy, and it is not prohibited except within the seven days. For this reason, the Rambam wrote at the end of the fifth chapter, which deals with the laws of the seven days, and this is his wording: If greeting with peace is prohibited to a mourner, it is a fortiori that he is prohibited from speaking excessively and from laughter, as it is said: "Be silent." And he should not hold a child in his hand so that he does not bring him to laughter, etc. Thus far his words. And laughter is the opposite of weeping, as Kohelet said: "A time to weep and a time to laugh." Therefore, during the seven days when weeping is common—he is prohibited from laughter, but not during the entire thirty days. And the Tur and Shulchan Aruch also wrote thus, but their wording requires explanation, and this is their wording in section 1: A mourner is prohibited from joy. Therefore, he shall not take a child in his lap all seven days, lest he come to laughter. Thus far his words. And what is the meaning of the word "therefore"? For behold, joy is prohibited all thirty days, and this prohibition is only during the seven days. And it must be said that this is what he means: Therefore, meaning since joy is prohibited all thirty days, therefore even though laughter is not joy, nevertheless all seven days laughter is also prohibited, since joy is prohibited for thirty days, and laughter is a small part of joy. (And also the wording of the Tur can be settled according to our words. And the Beit Yosef raised a difficulty against him, and the Bach struggled with this, see there. And according to our words it works out well. Examine it and you will find it simple.)
ודע דשחוק הוא גם כן כקצת שמחה ואינה כשמחה ממש, ואין לאסרה רק בתוך שבעה. ולזה כתב הרמב"ם סוף פרק חמישי (רמב"ם הלכות אבל ה) דמיירי בדין שבעה, וזה לשונו: אם בשאלת שלום נאסר באבל, קל וחומר שהוא אסור להרבות דברים ולשחוק, שנאמר: "דום". ולא יאחוז תינוק בידו שלא יביאנו לידי שחוק וכו' עד כאן לשונו. והשחוק הוא היפך הבכייה, כמו שאמר קהלת: "עת לבכות [ועת] (מעת) לשחוק". ולכן בשבעה שהבכי מצוי – אסור בשחוק, ולא בכל שלושים. וגם הטור ושולחן ערוך כתבו כן, אלא שלשונם צריך ביאור, וזה לשונם בסעיף א (שולחן ערוך יורה דעה שצא, א): אבל אסור בשמחה. לפיכך לא יקח תינוק בחיקו כל שבעה, שמא יבוא לידי שחוק. עד כאן לשונו. ומאי הוא לשון "לפיכך"? והרי שמחה אסור כל שלושים יום, וזה איסורו רק בשבעה. וצריך לומר דהכי קאמר: לפיכך, כלומר כיון דשמחה אסורה כל שלושים, ולכן אף דשחוק לא הוי שמחה מכל מקום כל שבעה אסורה גם השחוק, כיון דשמחה אסורה שלושים, ושחוק הוא חלק קצת משמחה. (וגם לשון הטור יש ליישב לפי דברינו. והבית יוסף הקשה עליו, והב"ח נדחק בזה, עיין שם. ולדברינו אתי שפיר. ודייק ותמצא קל.)