Skip to content

Commit

Permalink
Fix Haftara for Sephardim on doubled parshiot such as Matot-Masei
Browse files Browse the repository at this point in the history
  • Loading branch information
mjradwin committed Mar 7, 2024
1 parent f95db1a commit aea34e0
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hebcal/leyning",
"version": "8.1.6",
"version": "8.1.7",
"author": "Michael J. Radwin (https://github.com/mjradwin)",
"keywords": [
"hebcal",
Expand Down
16 changes: 16 additions & 0 deletions src/getLeyningForParsha.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,22 @@ test('getLeyningForParsha-2', (t) => {
e: '3:4',
v: 1,
}],
seph: [
{
b: '2:4',
e: '2:28',
k: 'Jeremiah',
v: 25,
},
{
b: '4:1',
e: '4:2',
k: 'Jeremiah',
v: 2,
},
],
sephardic: 'Jeremiah 2:4-28, 4:1-2',
sephardicNumV: 27,
haftara: 'Jeremiah 2:4-28, 3:4',
haftaraNumV: 26,
weekday: {
Expand Down
5 changes: 3 additions & 2 deletions src/leyning.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,9 @@ function getLeyningForParshaShabbatOnly(parsha) {
result.haftara = makeSummaryFromParts(haft);
result.haftaraNumV = sumVerses(haft);
}
if (raw.seph) {
const seph = result.seph = cloneHaftara(raw.seph);
const seph0 = parshiyotObj[hkey].seph;
if (seph0) {
const seph = result.seph = cloneHaftara(seph0);
result.sephardic = makeSummaryFromParts(seph);
result.sephardicNumV = sumVerses(seph);
}
Expand Down

0 comments on commit aea34e0

Please sign in to comment.