Class: Zmanim::Limudim::Calculators::DafYomiYerushalmi

Inherits:
Object
  • Object
show all
Includes:
LimudCalculator
Defined in:
lib/zmanim/limudim/calculators/daf_yomi_yerushalmi.rb

Instance Method Summary collapse

Methods included from LimudCalculator

#cycle_units_calculation, #default_starting_page, #find_cycle, #find_offset_units, #fractional_units, #interval_end_calculation, #limud, #perpetual_cycle_anchor, #starting_page, #tiered_units?, #tiered_units_for_interval, #unit_for_interval, #unit_step

Instance Method Details

#cycle_end_calculationObject



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/zmanim/limudim/calculators/daf_yomi_yerushalmi.rb', line 19

def cycle_end_calculation
  ->(start_date, iteration) do
    end_date = start_date + (1554 - 1)
    found_skips_between = ->(a, b) do
      (a.jewish_year..b.jewish_year).sum do |year|
        skip_days.count do |m, d|
          Zmanim::HebrewCalendar::JewishDate.new(year, m, d).between?(a,b)
        end
      end
    end
    while (found_days = found_skips_between.(start_date, end_date)) > 0 do
      start_date, end_date = end_date + 1, end_date + found_days
    end
    end_date
  end
end

#default_unitsObject



11
12
13
14
15
16
17
# File 'lib/zmanim/limudim/calculators/daf_yomi_yerushalmi.rb', line 11

def default_units
  { berachos: 68, peah: 37, demai: 34, kilayim: 44, shviis: 31, terumos: 59, maasros: 26, maaser_sheni: 33,
    chalah: 28, orlah: 20, bikurim: 13, shabbos: 92, eruvin: 65, pesachim: 71, beitzah: 22, rosh_hashanah: 22,
    yoma: 42, sukkah: 26, taanis: 26, shekalim: 33, megilah: 34, chagigah: 22, moed_katan: 19, yevamos: 85,
    kesubos: 72, sotah: 47, nedarim: 40, nazir: 47, gitin: 54, kiddushin: 48, bava_kama: 44, bava_metzia: 37,
    bava_basra: 34, sanhedrin: 44, makos: 9, shevuos: 57, avodah_zarah: 37, horayos: 19, niddah: 13 }
end

#initial_cycle_dateObject



7
8
9
# File 'lib/zmanim/limudim/calculators/daf_yomi_yerushalmi.rb', line 7

def initial_cycle_date
  jewish_date(Date.parse('1980-02-02'))
end

#skip_interval?(interval) ⇒ Boolean

Returns:

  • (Boolean)


40
41
42
# File 'lib/zmanim/limudim/calculators/daf_yomi_yerushalmi.rb', line 40

def skip_interval?(interval)
  matches_skip_day?(interval.start_date)
end

#skip_unitObject



36
37
38
# File 'lib/zmanim/limudim/calculators/daf_yomi_yerushalmi.rb', line 36

def skip_unit
  Zmanim::Limudim::Unit.new('no_daf_today')
end