Menahot, Chapter Eleven, Mishnah Nine
This mishnah deals with when the two loaves for Shavuot and the showbread were baked and when they were eaten.
1) The two loaves were eaten never earlier than on the second day and never later than on the third day.
a) How so? [Normally] they were baked on the day before the festival and eaten on the festival, that is, on the second day.
b) If the festival fell on the day after Shabbat, they would be eaten on the third day.
2) The showbread was eaten never earlier than on the ninth day and never later than on the eleventh day.
a) How so? [Normally] it was baked on the day before Shabbat and eaten on Shabbat [of the following week], that is on the ninth day.
b) If a festival fell on the day before Shabbat, it would be eaten on the tenth day.
c) If the two days of Rosh Hashanah [fell before Shabbat], it would then be eaten on the eleventh day.
3) [Baking] overrides neither Shabbat nor the festival.
4) Rabban Shimon ben Gamaliel says in the name of Rabbi Shimon, son of the deputy [high priest]: it overrides the festival but not the fast day (Yom Kippur).
Section one: The two loaves for Shavuot were always baked the day before Shavuot, unless Shavuot fell on a Sunday, in which case they were baked on Friday. Therefore, the two loaves were always eaten either on the second day, or at the latest on the third day.
Section two: Normally, the showbread would have been baked the day before Shabbat, and eaten the following Shabbat, on the ninth day. If a festival came before Shabbat, then it would have been baked on Thursday and eaten on Shabbat, the tenth day, and if Rosh Hashanah, which was always two days, came before Shabbat, it would have been baked on Wednesday and eaten on Shabbat, the eleventh day.
Section three: The mishnah explains that the baking of these loaves never overrides Shabbat or the festival. Thus sometimes they will have to be baked earlier.
Rabban Shimon ben Gamaliel disagrees and holds that baking the bread could override the festival, but not Yom Kippur. For instance, if the first day of Sukkot falls on Friday, the showbread could be baked on Friday, but if Yom Kippur fell on Friday, the showbread would have to be baked on Thursday.