Here is an article which discusses the reason why some fasts can occur right up till Shabbat...
http://www.israelnationalnews.com/Articles/Article.aspx/11080The Tenth of TevetIf the 10th of Tevet falls on Friday (as it did last year), then we fast on Friday: we enter Shabbat fasting, and do not eat until after Kiddush, in contrast to other fasts. Why?
From Daniel Pinner “Thus said HaShem, Lord of Legions: The fast of the fourth [month, i.e. 17th of Tammuz]; and the fast of the fifth [month, i.e. 9th of Av]; and the fast of the seventh [month, i.e. Tzom Gedaliah, 3rd of Tishrei], and the fast of the tenth [month, i.e. 10th of Tevet] will turn into rejoicing and gladness and festivities for the House of Judah. So love truth and peace” (Zechariah 8:19).As I write these words, the Beit ha-Mikdash, the Holy Temple, has not yet been rebuilt, the Temple Mount is still desolate under the gold-plated desecration of foreign worship, and mashiach has not yet come; so the 17th of Tammuz, the 9th of Av, the 3rd of Tishrei, and the 10th of Tevet have not yet turned into rejoicing and gladness and festivities. Only if this would have changed before Thursday would we be feasting rather than fasting from dawn until nightfall (Rambam, Laws of Fasts 5:19).
The 10th of Tevet commemorates the day, 2,436 years ago, that Nebuchadnezzar, king of Babylon, began the siege of Jerusalem, which would last a year and a half until he would conquer the city and destroy the Holy Temple:
“And it happened in the ninth year of [Zedekiah’s] reign, in the tenth month [i.e. Tevet], on the tenth of the month, that Nebuchadnezzar king of Babylon came – he and all his army – against Jerusalem, besieged it and built a siege-tower around it. And the city remained besieged until the eleventh year of King Zedekiah. In the fourth month [Av], on the ninth of the month, when the famine in the city strengthened, and there was not [even] bread for the nation of the land, the city was breached, and all the men of war fled, leaving the city by night” (Jeremiah 52:4; almost identical in 2 Kings 25:1-4).Additionally to these four fasts (the 17th of Tammuz, the 9th of Av, the 3rd of Tishrei, and the 10th of Tevet) a fifth fast was added, the Fast of Esther (Rambam, Laws of Fasts 5:5; compare the wording of Aruch ha-Shulchan, Orach Chaim 686:3). Of these five fasts, the 9th of Av is the most severe: it is the only one on which showering, anointing with oil (in modern usage, body lotion or hand-cream), wearing leather shoes, and marital relations are also forbidden (Shulchan Aruch, Orach Chaim 550:2).
Of these five fasts, the only one whose date can never fall on Shabbat, the Sabbath, is the 10th of Tevet. This, of course, applies to the fixed calendar as calculated by Hillel II (Hillel ben Yehudah, Nasi or head of the Sanhedrin) and adopted in 4119 (359 C.E.); before that, when Rosh Chodesh was determined by witnesses sighting the moon, the 10th of Tevet could have fallen on Shabbat.
The only fast which overrides Shabbat is, of course, Yom Kippur, the only fast which is commanded in the Torah; other than Yom Kippur, it is forbidden to fast on Shabbat. Hence if any of these fasts fall on Shabbat, they are postponed to Sunday, “because we do not hasten [the commemoration of] disasters” (Prishah, commentary on Aruch ha-Shulchan, Orach Chaim 550, paraphrasing a rule cited in Tractate Soferim 17:4).
This, then, applies to 17th Tammuz, 9th of Av, and Tzom Gedaliah; Ta’anit Esther, by contrast, which does not commemorate a disaster, is instead advanced to the previous Thursday. The Mishnah Berurah explains why Ta’anit Esther is advanced two days to Thursday, and not just one day to Friday: “A priori, we do not set fasts for Erev Shabbat, out of respect for Shabbat, because on fasts we are accustomed to saying selichot [penitential prayers] and tachanunim [pleas for forgiveness from sins]; but we would not do this on erev Shabbat, because it would interfere with respect for Shabbat” (Mishnah Berurah 686:3). Or, as others have expressed it, “we do not want to enter Shabbat fasting” (Mishnah Berurah 249. s.v. tzarich le-hit’anot; Novellae of the Ritv”a on Tractate Eiruvin 41b, s.v. Halacha mit’aneh u-mashlim; Shulchan Aruch ha-Rav, Orach Chaim, Laws of Shabbat 249; Aruch ha-Shulchan, Orach Chaim, Laws of Megillah 686:3).
Indeed, so central is this principle that the Talmud (Eiruvin 41a; Yerushalmi Ta’anit 2:14) cites Rabbi Yuda’s opinion that “if the 9th of Av falls on a Friday [which can never happen with our fixed calendar], then an egg’s bulk of food is brought for him and he eats, in order not to enter Shabbat fasting”. That is to say, according to this opinion, the principle of not entering Shabbat fasting is so important, that it even supersedes the fast of Tish’a be’Av!
But the exception to this rule is the 10th of Tevet: if it falls on Friday (as it did last year), then we fast on Friday: we enter Shabbat fasting, and do not eat until after Kiddush. And there is more: the Beit Yosef cites the Abudraham (Rabbi David ben Yosef Abudraham, 14th century Spain): “Rabbi David Abudraham wrote in Laws of Fasts (page 254) that the 10th of Tevet is different from the other fasts, in that if it falls on Shabbat, then we cannot postpone it to another day, because it is written as happening ‘on this very day’ [Ezekiel 24:2], the same words as describe Yom Kippur [three times in Leviticus 23:28-30]” (Beit Yosef, Orach Chaim 550).
The Aruch ha-Shulchan, Orach Chaim 549:3 says similarly: “We find in the name of that the earliest authorities that if the 10th of Tevet would have fallen on Shabbat, then [the fast] would overrule Shabbat…even though we do not follow this ruling”.
So though this ruling is disputed, what is undisputed practical halakhah is that if the 10th of Tevet falls on Friday, then the fast continues until nightfall – that is, into Shabbat.
Clearly, the 10th of Tevet has such fundamental import that it overrides other principles, in ways which even the 9th of Av cannot. And this is so startling that it demands an explanation.
As we have seen, the 10th of Tevet was the day when Nebuchadnezzar began the siege of Jerusalem. The disaster would culminate a year and a half later with the destruction of the Holy Temple; but the Jewish perspective identifies the beginning of the process as the most critical juncture. This is why we mourn the destruction of the Holy Temple on the 9th of Av, even though the main destruction occurred on the 10th: the Babylonians (1st Temple) and the Romans (2nd Temple) ignited the fires on the 9th, so we commemorate the disaster on the day it began.
The 10th of Tevet marks the beginning of the end of Jewish independence; Nebuchadnezzar’s siege was G-d’s final warning, the final period of grace that He granted His nation to repent.
The Midrash gives a moving and graphic account: “When that evil man came with other kings to Jerusalem, it appeared to them that it would take them only a short time to capture it; but G-d strengthened the people of Jerusalem until the third year – perhaps they would repent – and there were heroes beyond number in Jerusalem who were fighting against the Chaldeans [i.e. Babylonians], bringing down many of them as war dead. There was a hero there called Avika ben Gavtari who, when the enemy soldiers would launch boulders to destroy the city wall, would catch them in his hands and throw them back at the soldiers, killing many of them. By the time that he began to catch those boulders with his feet and return them to the enemy soldiers, the [Jews’] sins caused a wind to come which blew him off the fortified wall, and he was smashed up and died. That was the time when Jerusalem was breached, and the Chaldeans [i.e. Babylonians] entered” (Yalkut Shimoni, Eichah 909).
During that year and a half, from the ninth to the eleventh year of King Zedekiah’s reign, the nation had its last chance to avert disaster. The sentence was only executed on the 17th of Tammuz and the 9th of Av – but the judgement had begun on the 10th of Tevet. That was the origin of all the subsequent disasters; that was the day when the countdown began.
The final sentence could have been delayed, or even averted altogether, if only the nation had repented. But the date of the beginning of judgement could no longer be altered.
And this is why the 10th of Tevet overrides Shabbat in a way that even the 9th of Av cannot. For sure, the 10th of Tevet is halakhically more lenient than the 9th of Av, in terms of what hardships and what medical conditions justify breaking the fast, also in terms of what activities are prohibited (as we saw above, showering, anointing with oil, wearing leather shoes, and marital relations are forbidden on the 9th of Av but permitted on the 10th of Tevet), and also in terms of time (the 9th of Av lasts 25 hours, the 10th of Tevet only dawn till dusk). But in terms of when the fast occurs, the 10th of Tevet has a stringency which is matched only by Yom Kippur itself.
Let us learn from this: even after G-d’s judgement has begun, He always gives us warning, always allows us time and opportunity to repent and avert the disaster. Even if the sentencing cannot be delayed, it is yet within our power to stay the execution.
And the fast of the 10th of Tevet will yet turn into rejoicing and gladness and festivities for the House of Judah.