Closed PupaRebbe closed 3 months ago
Not sure which class should implement this, probably HebrewCalendar. Here is the code:
function eruvTavshilin(dt, il){ if(dt.getDay() <3 || dt.getDay() >4) return false; const today = new HDate(dt); const friday = today.after(5), tomorrow = today.next(); if(!isChag(friday, il) || isChag(today, il) || !isChag(tomorrow, il)) return false; return true; } function isChag(dt, il){ const options = { start: dt, end: dt, mask: flags.CHAG, il: il }; const events = HebrewCalendar.calendar(options); return Boolean(events.length); }
Added to 5.4.0
boolean
Eruv Tavshilin
Kind: static method of HebrewCalendar
HebrewCalendar
Date
HDate
Not sure which class should implement this, probably HebrewCalendar. Here is the code: