Shiv'a and Shloshim: Ended by Jewish Festivals

Shiv'a ends if a Jewish festival, Rosh Hashana, or Yom Kippur intervenes.
Shloshim ends if a Jewish festival, Rosh Hashana, or Yom Kippur intervenes.
If two of those holidays occur within the first seven days after burial, the first one will break shiv'a and the second one will break shloshim.
Shimini Atseret does not constitute a second day for breaking shiv'a or shloshim (it is considered to be part of Sukkot for this purpose).