סימן רכ סעיף ח
נָהַג שָׁעָה אַחַת (לָאו דַּוְקָא שָׁעָה אֶלָּא אֲפִלּוּ פָחוֹת) לִפְנֵי פֶסַח, אוֹתָהּ שָׁעָה חֲשׁוּבָה כְּמוֹ שִׁבְעָה, וּשְׁמוֹנָה יְמֵי פֶסַח (בְּחוּץ לָאָרֶץ) הֲרֵי לוֹ חֲמִשָּׁה עָשָׂר יוֹם, וּמַשְׁלִים עוֹד חֲמִשָּׁה עָשָׂר לְמִנְיַן שְׁלֹשִׁים. נָהַג שָׁעָה אַחַת לִפְנֵי שָׁבוּעוֹת, אוֹתָה שָׁעָה הִיא כְּמוֹ שִׁבְעָה, וְיוֹם הָרִאשׁוֹן שֶׁל שָׁבוּעוֹת נֶחְשָׁב גַּם כֵּן שִׁבְעָה יָמִים (כֵּיוָן שֶׁקָּרְבְּנוֹתָיו יֵש לָהֶם תַּשְׁלוּמִין כָּל שִׁבְעָה). וְיוֹם שֵׁנִי שֶׁל שָׁבוּעוֹת הוּא לוֹ יוֹם חֲמִשָּׁה עָשָׂר, וּמַשְׁלִים אַחַר כָּךְ גַּם כֵּן עוֹד חֲמִשָּׁה עָשָׂר יוֹם. נָהַג שָׁעָה אַחַת לִפְנֵי חַג הַסֻכּוֹת, הֲרֵי שִׁבְעָה. וְשִׁבְעָה יְמֵי סֻכּוֹת, הֲרֵי אַרְבָּעָה עָשָׂר יוֹם. וּשְׁמִינִי עֲצֶרֶת נֶחְשָׁב גַּם כֵּן לְשִׁבְעָה (שֶׁהוּא רֶגֶל בִּפְנֵי עַצְמוֹ, וְיֵשׁ לְקָרְבְּנוֹתָיו תַּשְׁלוּמִין) הֲרֵי עֶשְׂרִים וְאֶחָד יוֹם. וְיוֹם שִׂמְחַת תּוֹרָה, יוֹם הָעֶשְׂרִים וּשְׁנַיִם, וּמַשְׁלִים עוֹד שְׁמוֹנָה יָמִים.
If one had observed mourning for one hour, (not exactly, but even less than an hour) before Pesach, that hour is considered like seven days, which together with the eight days of Pesach, make a total of fifteen days, to which he must add another fifteen days to complete the thirty-day mourning period. If he observed mourning for one hour before Shavuos, that hour is regarded as seven days, and the first day of Shavuos is also regarded as seven days (since its sacred offerings can be brought on any of the following seven days,) and the second day of Shavuos is counted as his fifteenth day, after which he must add another fifteen days. If he observed mourning for one hour before the Festival of Sukkos, it is counted as seven days, which together with the seven days of Sukkos make a total of fourteen days. The Festival of Shemini Atzeress is also counted as seven days (for it is a Festival in its own right, and amends9Amends actually cannot be made for its sacrifices, but since all the Festivals are compared to one another, Shemini Atzeress, too, counts as seven days. Mishnah Berurah 548:46. can be made for its sacrifices), making it a total of twenty-one days. The day of Simchas Torah counts as the twenty-second day, and he must add another eight days.
תנא דבי אליהו כל השונה הלכות בכל יום מובטח לו שהוא בן העולם הבא שנאמר הליכות עולם לו אל תקרי הליכות אלא הלכות (נדה ע"ג.)