The estimation of the year of Jesus' birth depends on the estimation of the year of Herod's death. The information to date the latter event is provided by Flavius Josephus in his Antiquities of the Jews, book 17 [1].
In 17.6.4, when narrating events leading to Herod's last times, he notes an event involving the high priest Matthias ben Theophilus:
Now it happened, that during the time of the high priesthood of this
Matthias, there was another person made high priest for a single day,
that very day which the Jews observed as a fast. The occasion was
this: This Matthias the high priest, on the night before that day when
the fast was to be celebrated, seemed, in a dream, (7) to have
conversation with his wife; and because he could not officiate himself
on that account, Joseph, the son of Ellemus, his kinsman, assisted him
in that sacred office. But Herod deprived this Matthias of the high
priesthood, and burnt the other Matthias, who had raised the sedition,
with his companions, alive. And that very night there was an eclipse
of the moon. (8)
Two important notes regarding this passage.
First, that "very day which the Jews observed as a fast" was specifically Yom Kippur according to rabbinic tradition. Quoting Jewish Encyclopedia:
On the eve of a Day of Atonement—for the priest the most important
time in the year—he had become ritually unclean, and consequently was
unable to perform the duties of his office, which were discharged
instead by his kinsman Joseph ben Ellem ("Ant." xvii. 6, § 4). This
occurrence is mentioned in the Talmud (Tosef., Yoma, i. 4; Yoma 12b;
Yer. Yoma 38d), although the name of Matthias ben Theophilus is
omitted. [2]
Tractate Yoma in the Tosefta and the Talmuds is all about Yom Kippur services. Quoting Yoma 12b of the Babylonian Talmud:
It happened to Joseph b. Elam of Sepphoris that after a disqualifying
accident had happened to the high priest, he was appointed in the
former's place [3].
Second, the "very night" when "there was an eclipse of the moon" does not refer to "the night before that day when the fast was to be celebrated", or even necessarily to the night immediately following that, but to the night when "Herod deprived this Matthias of the high priesthood, and burnt the other Matthias, who had raised the sedition, with his companions, alive", which could have happened a few days after the day observed as a fast.
In 17.6.5, when describing Herod's final illness, Josephus notes that Herod "went beyond the river Jordan, and bathed himself in the warm baths that were at Callirrhoe," until "having no longer the least hopes of recovering".
In 17.9.3, when narrating events shortly after Herod's death, Josephus notes "the approach of that feast of unleavened bread, which the law of their fathers had appointed for the Jews at this time, which feast is called the Passover".
Even while the only fast day associated with important priestly duties was Yom Kippur, and moreover, that according to rabbinic tradition the event of a high priest becoming unable to perform his duties and being substituted by a "Joseph, the son of Ellemus" was specifically in Yom Kippur, I will list all Jewish fast days at that time, which were "the fasts of the fourth, fifth, seventh and tenth months" in Zechariah 8:19 plus the Fast of Esther on Purim eve, 13 Adar, instituted after the time of prophet Zechariah (Esther 9:31).
Month No, month name: Fast day, reason.
4, Tammuz: 9 Tammuz, breach of the walls of Jerusalem (2 Kings 25:3-4; Jer 39:2, 52:6–7).
5, Av: 7/10 Av, destruction of the First Temple (2 Kings 25:8-10; Jer 52:12-14).
7, Tishrei: 10 Tishrei, Atonement Day (Yom Kippur) (Lev 16:29-31 and 23:26-28).
10, Tevet: 10 Tevet, beginning of the siege of Jerusalem (2 Kings 25:1-2).
12/13, Adar/Adar II: 13 Adar/Adar II, the Fast of Esther on Purim eve.
Considering all candidate lunar eclipses, we have:
AJ 17.6.4 - Eclipse -- Moon phase - Eclipse date - AJ 17.9.3 -- Jesus' - Jesus'
lunar ---- type and - on day of -- in Hebrew ---- Passover --- birth -- death
eclipse --- midtime -- eclipse ---- calendar ----- (Nisan 15) - years -- year
[4] ------- [5] ------ [6] -------- [6] ---------- [6]
a. Mar 23, 5 BC - T - 20:21 - Full - 15 Nisan --- Mar 24, 5 BC
b. Sep 15, 5 BC - T - 22:12 - Full - 13 Tishrei - Apr 12, 4 BC - 7-6 BC - 30 AD
c. Mar 13, 4 BC - P - 02:41 - Full - 14 Adar II - Apr 12, 4 BC
d. Jan 10, 1 BC - T - 01:09 - Full - 13 Tevet --- Apr 09, 1 BC - 4-3 BC - 33 AD
e. Dec 29, 1 BC - P - 16:32 - Full - 13 Tevet --- Mar 30, 1 AD
Day 1 of months in the Hebrew Calendar are determined through these 2 steps:
Find the date and time of the previous new moon, NM_date & NM_time [11].
If NM_time < 12:00
then Month.1 = since (NM_date + 1) sunset to (NM_date + 2) sunset
If NM_time > 12:00
then Month.1 = since (NM_date + 2) sunset to (NM_date + 3) sunset
a. 5 BC
New Moon = Mar 8 04:45
Nisan 1 = since Mar 9 sunset to Mar 10 sunset
+14 +14
Nisan 15 = since Mar 23 sunset to Mar 24 sunset. Eclipse at Mar 23 20:21.
Since the eclipse was at the beginning of the day of Passover, it is directly excluded. Even if the previous lunisolar year had been embolismic and the month that started on Mar 9 - Mar 10 had been Adar II, this eclipse would be excluded since an interval of 29 days is too short for all the events narrated by Josephus between the eclipse and the Passover after Herod's death.
b. 5 BC
New Moon = Sep 1 18:10
Tishrei 1 = since Sep 3 sunset to Sep 4 sunset
+12 +12
Tishrei 13 = since Sep 15 sunset to Sep 16 sunset. Eclipse at Sep 15 22:12.
This is consistent with the "very night" when "there was an eclipse of the moon" not referring to the night immediately following the fast of 10 Tishrei but to the night when "Herod deprived this Matthias of the high priesthood, and burnt the other Matthias, who had raised the sedition, with his companions, alive", with this event happening 3 days after 10 Tishrei.
c. 4 BC (has Adar II)
New Moon = Feb 25 18:33
Adar II 1 = since Feb 27 sunset to Feb 28 sunset
+13 +13
Adar II 14 = since Mar 12 sunset to Mar 13 sunset. Eclipse at Mar 13 02:41.
New Moon = Mar 27 03:59
Nisan 1 = since Mar 28 sunset to Mar 29 sunset
+14 +14
Nisan 15 = since Apr 11 sunset to Apr 12 sunset
Just as it would have been the case with the 23 Mar 5 BC eclipse if the previous lunisolar year had been embolismic, this eclipse is excluded since an interval of 30 days is too short for all the events narrated by Josephus between the eclipse and the Passover after Herod's death. Additionally, this eclipse was partial and occurred way too late in the night to be likely to be noted and remembered.
d. 2 BC (has Adar II)
New Moon = Dec 26 15:58
Tevet 1 = since Dec 28 sunset to Dec 29 sunset
+12 +12
Tevet 13 = since Jan 9 sunset to Jan 10 sunset. Eclipse at Jan 10 01:09.
1 BC
New Moon = Mar 24 11:48
Nisan 1 = since Mar 25 sunset to Mar 26 sunset
+14 +14
Nisan 15 = since Apr 8 sunset to Apr 9 sunset
This is consistent with the "very night" when "there was an eclipse of the moon" not referring to the night immediately following the fast of 10 Tevet but to the night when "Herod deprived this Matthias of the high priesthood, and burnt the other Matthias, who had raised the sedition, with his companions, alive", with this event happening 3 days after 10 Tevet.
e. 1 BC
New Moon = Dec 14 15:11
Tevet 1 = since Dec 16 sunset to Dec 17 sunset
+12 +12
Tevet 13 = since Dec 28 sunset to Dec 29 sunset. Eclipse at Dec 29 16:32.
1 AD
New Moon = Mar 13 20:49
Nisan 1 = since Mar 15 sunset to Mar 16 sunset
+14 +14
Nisan 15 = since Mar 29 sunset to Mar 30 sunset
This eclipse is directly excluded because, first, it did not occur at night, and second but more important, it occurred below the horizon and could not be seen from Jerusalem [5]!
Conclusion: Whereas in principle both scenarios b and d are possible, from the facts that the only fast day associated with important priestly duties was Yom Kippur and that according to rabbinic tradition the event of a high priest becoming unable to perform his duties and being substituted by a "Joseph, the son of Ellemus" was specifically on Yom Kippur, it is clear that the most probable scenario is b, the eclipse before Herod's final illness being on Sep 15, 5 BC and the Passover after Herod's death being on Apr 12, 4 BC.
Since Herod met the Magi in Jerusalem (Mt 2:1,3), the meeting had to be before he left the city some time after Sep 15, 5 BC. Assuming that the meeting occurred within the 1-year interval Sep 6 BC - Sep 5 BC, and that Herod's subsequent order to execute all babies in the area "two years old and under" reflected his own uncertainty about Jesus' date of birth "in accordance with the time (of the star's appearance) he had ascertained from the magi" (Mt 2:7,16), Jesus could have been born between 2 years before the start and 6 months before the end of that interval, i.e. between Sep 8 BC - March 5 BC.
References
[1] Antiquities of the Jews - Book XVII
[2] Jewish Encyclopedia
[3] Babylonian Talmud, Tractate Yoma
[4] NASA. "Catalog of Lunar Eclipses: -0099 to 0000 (100 BCE to 1 BCE)". Online at: NASA Eclipse Web Site
(On that page, 1 bC = 0000, 2 bC = -0001, and 4 bC = -0003.)
[5] NASA's Javascript Lunar Eclipse Explorer for Asia and Asia Minor, at NASA Eclipse Web Site
[6] Phases of the Moon: -0099 to 0000 (0100 to 0001 BCE)
Phases of the Moon: 0001 to 0100
[7] Calendar Converter
[8] Historical solstices and equinoxes
[9] Hebrew calendar
[10] LEAP YEAR - Jewish Virtual Library