The rule is that we do not mourn on the Sabbath. Therefore, even if Tish’a B’Av falls out on Shabbat, we postpone the fast until Sunday, and on that Shabbat one may eat meat, drink wine, and serve a meal fit for a king. We also sing Shabbat songs as usual, because there is no mourning on the Sabbath. Obviously, this law also applies when Tish’a B’Av falls out on Sunday; meaning, we treat the Sabbath [immediately] preceding the fast like any other Shabbat.
However, there is an intermediate time between Shabbat and the fast, during which Shabbat has not yet ended but the prohibitions of the fast have already begun. This happens because we are unsure when one day ends and the next day begins – at sunset or when the stars emerge. Therefore, the period between sunset and the emergence of the stars is ambiguous, being possibly day and possibly night. It is called “bein hashmashot” (twilight). And since there is a mitzvah to add [time] onto Shabbat, the holy day continues until a few minutes after the stars emerge. Consequently, the time between sunset and shortly after the emergence of the stars is both Shabbat and [Tish’a B’Av]. During that time, it is forbidden to do anything that would appear like a custom of mourning, because we do not mourn on the Sabbath. On the other hand, after sunset, we avoid doing anything that is not necessary for the sake of Shabbat, like eating, drinking, washing, and anointing.
Therefore, we eat the third Sabbath meal (seudah shlishit) like we do on any other Shabbat, including the singing of Sabbath songs. However, we stop eating and drinking before sunset, because there is no obligation – from a Shabbat perspective – to continue eating seudah shlishit after sunset (Sh.A. 552:10, see M.B. 23). It is also fitting not to sing joyous songs after sunset, and doing so does not constitute an expression of mourning, for people do not generally sing happy songs every moment of Shabbat. We also refrain from washing and anointing ourselves after sunset; after all, we do not bathe [or anoint ourselves] on Shabbat anyway. However, one who relieves himself during bein hashmashot should wash his hands normally, for if he [washes as is required on the fast], he is, in effect, mourning on the Sabbath.
We remain in our Sabbath clothing, keep our shoes on, and continue to sit on chairs and greet each other until a few minutes after three, mid-sized stars appear in the sky. Then, we say Baruch ha’mavdil bein kodesh le’chol (Blessed is He Who separates between the holy and the mundane), by which we take leave of the Sabbath. Afterwards, we remove our shoes, take off our Sabbath garments, and change into weekday clothes. One should wear clothing that was already worn the previous week, because one may not wear freshly laundered clothing on Tish’a B’Av.
[Many communities have a] custom to delay Ma’ariv until around fifteen minutes after Shabbat ends, in order to give everyone time to take leave of the Sabbath at home, remove their shoes, change their clothes, and come to the synagogue for Ma’ariv and the reading of Eichah in weekday clothes.
. Some people have a custom to remove their shoes at sunset, provided that they do so without letting others know that it is for the sake of mourning. Nonetheless, the prevalent custom is to remove one’s shoes only after Shabbat has ended. See [Hilchot Chag BeChag], chap. 8, notes 2 and 7, where R. Karp explains, based on [the words of] the Gra, that one may not afflict oneself on Shabbat; therefore, it is permissible to wash and anoint oneself until Shabbat ends. According to the accepted custom, however, one should refrain from doing anything that is not recognizable as an act of mourning or self-affliction. Therefore, one should not, le’chatchilah, wash or anoint oneself [during bein hashmashot], but one should wash his hands normally after using the bathroom. That is, one should wash his entire hand, and not just his fingers, as one washes on Tish’a B’Av.