Skip to content

Commit

Permalink
Sigd moves to Thursday if it would fall on Shabbat (fix #518)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjradwin committed Jan 15, 2025
1 parent 770fa2b commit 951b787
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/staticHolidays.ts
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,7 @@ export const staticModernHolidays: ModernHoliday[] = [
desc: SIGD,
chul: true,
suppressEmoji: true,
friSatMovetoThu: true,
},
{firstYear: 5777, mm: Nisan, dd: 10, desc: YOM_HAALIYAH, chul: true},
{firstYear: 5777, mm: Cheshvan, dd: 7, desc: YOM_HAALIYAH_SCHOOL_OBSERVANCE},
Expand Down
9 changes: 8 additions & 1 deletion test/getHolidaysForYear.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ test('getHolidaysForYearArray-5771-diaspora', () => {
{date: '2010-10-01', desc: 'Simchat Torah'},
{date: '2010-10-08', desc: 'Rosh Chodesh Cheshvan'},
{date: '2010-10-09', desc: 'Rosh Chodesh Cheshvan'},
{date: '2010-11-04', desc: 'Sigd'},
{date: '2010-11-04', desc: 'Yom Kippur Katan Kislev'},
{date: '2010-11-06', desc: 'Sigd'},
{date: '2010-11-07', desc: 'Rosh Chodesh Kislev'},
{date: '2010-11-08', desc: 'Rosh Chodesh Kislev'},
{date: '2010-12-01', desc: 'Chanukah: 1 Candle'},
Expand Down Expand Up @@ -278,3 +278,10 @@ test('getHolidaysForYear-throw', () => {
getHolidaysForYear_(-1);
}).toThrow('Hebrew year -1 out of range 1-32658');
});

test('Sigd Shabbat moves to Thursday', () => {
const events = getHolidaysForYearArray(5785, true);
const ev = events.find((ev) => ev.getDesc() === 'Sigd');
const date = isoDateString(ev.getDate().greg());
expect(date).toBe('2024-11-28');
});

0 comments on commit 951b787

Please sign in to comment.