The Mishna Berura (Rav Yisrael Meir Kagan of Radin, 1839-1933) addresses (331) the case of "Mila She’lo Bi’zmanah" – a circumcision that was not performed on the infant’s eighth day, such as if it was delayed due to a medical condition. The Rashbetz (Rav Shimon Ben Semah Duran of Algiers, 1361-1444), as the Mishna Berura cites, ruled that in such a case, the infant should not be circumcised on Thursday, as this might necessitate Shabbat violation for the sake of caring for the infant on Shabbat. Once the Berit in any event was delayed past the eighth day, the Rashbetz maintained, it should not be performed so close to Shabbat, such that Shabbat will likely need to be violated in order to tend to the ailing infant who is still recovering from the procedure. This view is followed by the Taz (Rav David Ha’levi Segal, 1586-1667), who clarifies that the Berit should likewise not be performed on Friday, for the same reason. Performing the Berit on Thursday or Friday is likely to result in the need to violate Shabbat, and so in the case of a "Mila She’lo Bi’zmanah," where the Berit has already been delayed past the optimum time, the Berit should not be performed on Thursday or Friday.
The Shach (Rav Shabtai Ha’kohen, 1621-1662), however, disagreed with the Rashbetz’s ruling. He noted that the only law enacted by the Sages forbidding something on Thursday because it will likely necessitate Shabbat desecration is embarking on a sea voyage, and Halacha explicitly permits embarking on a voyage on Thursday if one needs to travel for the sake of a Misva. As such, the Shach argued, it is certainly permissible to perform a Berit Mila – which is, of course, among the greatest Misvot – on Thursday, despite the possibility of it necessitating Shabbat desecration. The Mishna Berura cites several other Poskim who concur with the Shach’s ruling, including the Magen Abraham and the Eliyahu Rabba.
By contrast, several leading Sephardic authorities, including the Hida (Rav Haim Yosef David Azulai, 1724-1806), in Birkeh Yosef (262), as well as Rav Yaakob Haim Sofer (Baghdad-Israel, 1870-1939) in Kaf Ha’haim (249), follow the position of the Rashbetz. This is the ruling of Hacham Ovadia Yosef, in Yabia Omer (vol. 5, Yoreh De’a 23:7), and of Rav Eliezer Waldenberg (Jerusalem, 1915-2006), in Sitz Eliezer. Therefore, if a child was not, for whatever reason, circumcised on the eighth day, he should not be circumcised on Thursday or Friday, and it goes without saying that he is not circumcised on Shabbat. The Berit must be performed on one of the other four days of the week.
There is, however, one exception to this rule. It is the case of a child born on late Wednesday afternoon, during "Ben Ha’shemashot," the 13.5-minute period immediately after sundown. As we are uncertain whether "Ben Ha’shemashot" is to be treated as daytime or nighttime, it cannot be determined in this case whether the child is considered to have been born on Wednesday or on Thursday. Therefore, the Berit is performed on Thursday the following week. In such a case, we do not delay the Berit until after Shabbat, given the possibility that Thursday is the infant’s eighth day. The potential fulfillment of the great Misva of "Mila Bi’zmanah" – circumcising an infant on his eighth day – outweighs the possibility that this is a "Mila She’lo Bi’zmanah" which should not be performed on Thursday.
Summary: If a child was not circumcised on his eighth day, the Berit should not be performed on Thursday, Friday or Shabbat, and must instead be performed on one of the other four days of the week. However, if a child was born within the 13.5-minute period after sundown on Wednesday afternoon, the Berit is performed the following week on Thursday.