Closed rosenbergj closed 1 month ago
It appears to me that this code is doing exactly what it should be doing, setting the leining to vezos haberacha between YK and ST. This requires an exception because, unlike the the other parshiyos, Vezos Haberacha is associated with a yom tov rather than Shabbos. This is it's own special case and should remain as is. It appears to me the issue is not having a separate special case for when Haazinu falls on Shabbos Shuva. It appears that the period between RH and YK is treated like any other week, where the method is to look for the next regular shabbos leining. Because Vezos Haberacha is not associated with a Shabbos, in years when Haazinu is in Shabbos Shuva, the next regular leining is Bereishis. This would explain the error in the spreadsheet. This error does not arise in years when Vayelech is on Shabbos Shuva since in that case, the next regular weekly reading is indeed Haazinu, so there is no issue. If RH starts on Monday, Tuesday, or Shabbos, then Shabbos Shuva will be Vayelech, while Haazinu will be read on the Shabbos in Between YK and Sukkos, thus avoiding this error, whereas when RH starts on Thursday, there will be no Shabbos between YK and Sukkos (as YK falls on Shabbos in such years), and so Shabbos Shuva will be Haazinu, giving this error.
Thanks. This is fixed now.
@MaxBGreenberg, we think we already have the Shabbat Shuva special cases correct for both Ha'azinu and Vayeilech
https://github.com/hebcal/hebcal-leyning/blob/main/src/holiday-readings.json#L529-L536
@mjradwin I meant add a special case for determining the weekday reading for between RH and YK based upon what parsha is read on Shabbos Shuva. If Vayelech is read on Shabbos Shuva, you can determine the leining for weekdays Between RH and YK just like any other Parsha. It's only when Haazinu is read on Shabbos Shuva that you need to have a special rule like for between YK and ST. The comment on the fix you implemented says "If Vayeilech or Ha'azinu occurs between RH and YK..." But that's not really an "if". One of those is always read. What matters is which of them it is. Which is what I meant by having a special rule, i.e. a special rule for determining weekday readings between RH and YK separate from the special case between YK and ST.
Got it. My comment is indeed incorrect but I believe the implementation is correct. If it's a Mon/Thu weekday reading and the immediately upcoming Shabbat is a regular parsha (Vayeilech or Ha'azinu, or during the rest of the year really any regular parsha) and not a holiday reading, the block of code immediately above will have already returned the correct parsha.
I believe the special case for Vezot Habracha on Mon/Thu weekday readings during Tishrei 3 through 22 works correctly because the other cases (e.g. Chag or Chol haMoed Sukkot) are also handled elsewhere.
At https://www.hebcal.com/sedrot/#download, in the "Leyning spreadsheet downloads" section, in years when Rosh Hashanah is Thursday-Friday (such as 5785), the csv for weekday reading incorrectly says that the reading for Monday 5 Tishrei and Thursday 8 Tishrei is Bereshit, when it should be Vezot Haberakhah. (The csv is correct that Monday 12 Tishrei is Vezot Haberakhah.)
I suspect the needed fix is at https://github.com/hebcal/hebcal-leyning/blob/bac80c79471eff00eda7115f8269224a4bc3c967/src/getLeyningOnDate.ts#L18-L29 . (However, reading that code, I can't figure out why the csv is correct in years with Rosh Hashanah on Monday-Tuesday (such as 5783) regarding the reading on Thursday 11 Tishrei, so I don't think I'll be submitting a patch...)