Module: HebCal::PassoverHelper
- Defined in:
- lib/hebcal/passoverHelper.rb
Class Method Summary collapse
Class Method Details
.CalculateMolad(yearH) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/hebcal/passoverHelper.rb', line 13 def PassoverHelper.CalculateMolad yearH _HPD = PassoverConstants::HALAKIM_PER_DAY _LC = PassoverConstants::LUNAR_CYCLE year_in_julian_cycle = yearH % 4 drift_since_epoch = (_LC + PassoverConstants::EPOCH_TEKUFAH + (_LC - PassoverConstants::ANNUAL_DRIFT) * (yearH % 19) - _HPD) % _LC _LC + _HPD + PassoverConstants::MOLAD_ZAQEN + drift_since_epoch + (year_in_julian_cycle * PassoverConstants::JULIAN_ANNUAL_CALENDAR_DRIFT) - (PassoverConstants::JULIAN_ERROR_PER_19_YEAR_CYCLE * (yearH / 19).floor) end |
.IsLeapYear(year) ⇒ Object
5 6 7 |
# File 'lib/hebcal/passoverHelper.rb', line 5 def PassoverHelper.IsLeapYear year [3,6,8,11,14,17,19].include? (year % 19) end |
.PrecedesLeapYear(year) ⇒ Object
9 10 11 |
# File 'lib/hebcal/passoverHelper.rb', line 9 def PassoverHelper.PrecedesLeapYear year IsLeapYear(year+1) end |