סימן רכ סעיף ט
רֹאשׁ הַשָׁנָה וְיוֹם הַכִּפּוּרִים, נֶחְשָׁבִים גַּם כֵּן כִּרְגָלִים לְעִנְיַן בִּטּוּל שִׁבְעָה וּשְׁלשִׁים. נָהַג שָׁעָה אַחַת לִפְנֵי רֹאשׁ הַשָּׁנָה, בִּטֵּל רֹאשׁ הַשָּׁנָה גְּזֵרַת שִׁבְעָה, וְיוֹם הַכִּפּוּרִים מְבַטֵּל גְּזֵרַת שְׁלֹשִׁים. נָהַג שָׁעָה אַחַת לִפְנֵי יוֹם הַכִּפּוּרִים, בִּטֵּל יוֹם הַכִּפּוּרִים שִׁבְעָה, וְחַג הַסֻּכּוֹת מְבַטֵּל שְׁלֹשִׁים.
Rosh Hashanah and Yom Kippur are also considered Festivals with regard to canceling the seven and thirty-day mourning periods. Thus, if one observed mourning for one hour before Rosh Hashanah, Rosh Hashanah cancels the seven day period, and Yom Kippur cancels the thirty-day period. If he observed mourning for one hour before Yom Kippur, Yom Kippur cancels the seven day period,10If the burial took place the day before Yom Kippur, he is permitted to wash in warm water that very day, because immersion in a mikvah on the day before Yom Kippur is a mitzvah. He is permitted to do so even though he usually does not do so on the day before a Festival. Since he must immerse in the mikveh the day before Yom Kippur, he is also permitted to bathe to remove any interposition. See Mishnah Berurah 606:23–27. The Mogein Avraham maintains in this case he should not bathe more than an hour or two before nightfall. If it is the last day of the seven days of mourning, he may bathe earlier (in the afternoon) Mishnah Berurah 548:24. and Sukkos cancels the thirty-day period.
תנא דבי אליהו כל השונה הלכות בכל יום מובטח לו שהוא בן העולם הבא שנאמר הליכות עולם לו אל תקרי הליכות אלא הלכות (נדה ע"ג.)