1,316. A Mourner Who is Out of Town
204:5 If a person lost a close relative in a different place and he was informed of the passing in the place where he was, he starts counting his mourning period from the time he was informed. Even if he then goes to the deceased's place and joins the rest of the mourners who started their mourning period earlier, he doesn't shorten his mourning period to align with theirs. Similarly, even if he was not informed of the passing until he arrived among the other mourners, and those mourners are neither in the place where the deceased died nor in the place of the burial, then this person still counts from the time he was informed.
204:6 If the person in question was not informed of the passing until he joined the other mourners, and they happen to be where the deceased died or was buried, then if he was nearby at the time of the burial - "nearby" meaning not more than ten parsaos (about 25-28 miles), which is one day's journey - then he is considered as if he had been there at the time of burial and he counts the mourning period with the other mourners. Even if he arrives among the other mourners on the last day of shiva before they leave shul, since he observed some mourning, he counts shiva and shloshim with them. This is only when the head of the household is among them and they all follow his lead. If the head of the household is not there, the person under discussion counts for himself. Similarly, if he came from a distant place (i.e., more than ten parsaos), even though the head of the household is there, he nevertheless counts for himself.