zmanim 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/CHANGELOG.md +12 -0
- data/lib/zmanim/hebrew_calendar/hebrew_date_formatter.rb +6 -8
- data/lib/zmanim/hebrew_calendar/jewish_calendar.rb +15 -3
- data/lib/zmanim/hebrew_calendar/jewish_date.rb +45 -0
- data/lib/zmanim/limudim/calculators/daf_hashavua_bavli.rb +23 -0
- data/lib/zmanim/limudim/calculators/mishna_yomis.rb +1 -1
- data/lib/zmanim/limudim/calculators/parsha.rb +31 -31
- data/lib/zmanim/limudim/cycle.rb +0 -4
- data/lib/zmanim/limudim/limud.rb +4 -0
- data/lib/zmanim/limudim/limud_calculator.rb +1 -1
- data/lib/zmanim/limudim/limudim_formatter.rb +2 -1
- data/lib/zmanim/version.rb +1 -1
- data/lib/zmanim/zmanim_calendar.rb +1 -1
- metadata +7 -7
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 | 
            -
             | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 2 | 
            +
            SHA256:
         | 
| 3 | 
            +
              metadata.gz: 60f1ce1f598d2bb45067fadbb609dca84e62e94da2144d6815c04a14083eeeb9
         | 
| 4 | 
            +
              data.tar.gz: e83e26224f23d21216258f3e31ad65bafc18af91f250c09ab9e0a5941061aa34
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: '0868fb13463bc643a818c5faa9aad148659ea8597eceadbafbc4a544d8cc88f7b8ec069361939f860eb6c76c4c07b70f7e0100ab3b4e4ff2e19a73fb2dec9908'
         | 
| 7 | 
            +
              data.tar.gz: 946ccd345d2fcb4612ff4b2b2782de1c78a822e97fd70b12b4c48569c51d98907aeb05dd9b97894fa0cc4a9397167e5af75e53492e625c9b2f425282ae9d8e08
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    | @@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file. | |
| 4 4 | 
             
            The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
         | 
| 5 5 | 
             
            and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
         | 
| 6 6 |  | 
| 7 | 
            +
            ## [0.4.0] - 2020-10-13
         | 
| 8 | 
            +
            ### Added
         | 
| 9 | 
            +
            - `JewishCalendar#end_of_week` returns Shabbos for this week
         | 
| 10 | 
            +
            - Parshas Hashavua modifier to return blank Limud if the standard Parsha is not read this Shabbos
         | 
| 11 | 
            +
            - Daf Hashavua calculator
         | 
| 12 | 
            +
            ### Changed
         | 
| 13 | 
            +
            - Refactor kviah calculation logic to JewishDate
         | 
| 14 | 
            +
            - Remove formatter dependency for Parsha calculator
         | 
| 15 | 
            +
            ### Fixed
         | 
| 16 | 
            +
            - Added Lag B'Omer as significant day / yom tov
         | 
| 17 | 
            +
            - Fixed Lag B'Omer spelling for english formatted omer
         | 
| 18 | 
            +
             | 
| 7 19 | 
             
            ## [0.3.0] - 2018-09-17
         | 
| 8 20 | 
             
            ### Added
         | 
| 9 21 | 
             
            - Elevations used in shaos zmanios calculations if use_elevation property is set
         | 
| @@ -46,7 +46,7 @@ module Zmanim::HebrewCalendar | |
| 46 46 | 
             
                    transliterated: Zmanim::HebrewCalendar::JewishCalendar::SIGNIFICANT_DAYS.each_with_object({}){|d, h|
         | 
| 47 47 | 
             
                      h[d] = titleize(d)
         | 
| 48 48 | 
             
                    }.merge(tzom_gedalyah: 'Fast of Gedalyah', tenth_of_teves: 'Tenth of Teves', tu_beshvat: "Tu B'Shvat",
         | 
| 49 | 
            -
                            taanis_esther: 'Fast of Esther', seventeen_of_tammuz: 'Seventeenth of Tammuz',
         | 
| 49 | 
            +
                            taanis_esther: 'Fast of Esther', lag_baomer: "Lag B'Omer", seventeen_of_tammuz: 'Seventeenth of Tammuz',
         | 
| 50 50 | 
             
                            tisha_beav: "Tisha B'Av", tu_beav: "Tu B'Av", yom_hashoah: 'Yom HaShoah', yom_haatzmaut: "Yom Ha'atzmaut"),
         | 
| 51 51 | 
             
                    hebrew: {
         | 
| 52 52 | 
             
                        erev_rosh_hashana:   'ערב ראש השנה',
         | 
| @@ -72,6 +72,7 @@ module Zmanim::HebrewCalendar | |
| 72 72 | 
             
                        pesach:              'פסח',
         | 
| 73 73 | 
             
                        chol_hamoed_pesach:  'חול המועד פסח',
         | 
| 74 74 | 
             
                        pesach_sheni:        'פסח שני',
         | 
| 75 | 
            +
                        lag_baomer:          'ל״ג בעומר',
         | 
| 75 76 | 
             
                        erev_shavuos:        'ערב שבועות',
         | 
| 76 77 | 
             
                        shavuos:             'שבועות',
         | 
| 77 78 | 
             
                        seventeen_of_tammuz: 'שבעה עשר בתמוז',
         | 
| @@ -179,18 +180,15 @@ module Zmanim::HebrewCalendar | |
| 179 180 | 
             
                  if hebrew_format
         | 
| 180 181 | 
             
                    format_hebrew_number(number) + ' ' + hebrew_omer_prefix + 'עומר'
         | 
| 181 182 | 
             
                  else
         | 
| 182 | 
            -
                    number == 33 ?  | 
| 183 | 
            +
                    number == 33 ? "Lag B'Omer" : "Omer #{number}"
         | 
| 183 184 | 
             
                  end
         | 
| 184 185 | 
             
                end
         | 
| 185 186 |  | 
| 186 187 | 
             
                def format_kviah(year)
         | 
| 187 188 | 
             
                  date = year.is_a?(Numeric) ? Zmanim::HebrewCalendar::JewishDate.new(year, 7, 1) : year
         | 
| 188 | 
            -
                   | 
| 189 | 
            -
                   | 
| 190 | 
            -
                   | 
| 191 | 
            -
                  date.jewish_month = 1
         | 
| 192 | 
            -
                  pesach_day = date.day_of_week
         | 
| 193 | 
            -
                  "#{format_hebrew_number(rosh_hashana_day)}#{kviah_glyph}#{format_hebrew_number(pesach_day)}".delete(GERESH)
         | 
| 189 | 
            +
                  kviah_values = date.kviah
         | 
| 190 | 
            +
                  kviah_glyph = {chaseirim: 'ח', kesidran: 'כ', shelaimim: 'ש'}[kviah_values[:kviah]]
         | 
| 191 | 
            +
                  "#{format_hebrew_number(kviah_values[:rosh_hashana])}#{kviah_glyph}#{format_hebrew_number(kviah_values[:pesach])}".delete(GERESH)
         | 
| 194 192 | 
             
                end
         | 
| 195 193 |  | 
| 196 194 | 
             
                def format_tefilah_additions(calendar, customs={walled_city: false, nusach: :ashkenaz})
         | 
| @@ -8,7 +8,7 @@ module Zmanim::HebrewCalendar | |
| 8 8 | 
             
                                      erev_succos succos chol_hamoed_succos hoshana_rabbah shemini_atzeres simchas_torah
         | 
| 9 9 | 
             
                                      chanukah tenth_of_teves tu_beshvat
         | 
| 10 10 | 
             
                                      taanis_esther purim shushan_purim purim_katan shushan_purim_katan
         | 
| 11 | 
            -
                                      erev_pesach pesach chol_hamoed_pesach pesach_sheni erev_shavuos shavuos
         | 
| 11 | 
            +
                                      erev_pesach pesach chol_hamoed_pesach pesach_sheni lag_baomer erev_shavuos shavuos
         | 
| 12 12 | 
             
                                      seventeen_of_tammuz tisha_beav tu_beav
         | 
| 13 13 | 
             
                                      yom_hashoah yom_hazikaron yom_haatzmaut yom_yerushalayim)
         | 
| 14 14 |  | 
| @@ -153,6 +153,10 @@ module Zmanim::HebrewCalendar | |
| 153 153 | 
             
                  molad_as_datetime + 15
         | 
| 154 154 | 
             
                end
         | 
| 155 155 |  | 
| 156 | 
            +
                def end_of_week
         | 
| 157 | 
            +
                  self + (7 - day_of_week)
         | 
| 158 | 
            +
                end
         | 
| 159 | 
            +
             | 
| 156 160 | 
             
                def daf_yomi_bavli
         | 
| 157 161 | 
             
                  Zmanim::Limudim::Calculators::DafYomiBavli.new.limud(self)
         | 
| 158 162 | 
             
                end
         | 
| @@ -161,8 +165,14 @@ module Zmanim::HebrewCalendar | |
| 161 165 | 
             
                  Zmanim::Limudim::Calculators::DafYomiYerushalmi.new.limud(self)
         | 
| 162 166 | 
             
                end
         | 
| 163 167 |  | 
| 164 | 
            -
                def  | 
| 165 | 
            -
                  Zmanim::Limudim::Calculators:: | 
| 168 | 
            +
                def daf_hashavua_bavli
         | 
| 169 | 
            +
                  Zmanim::Limudim::Calculators::DafHashavuaBavli.new.limud(self)
         | 
| 170 | 
            +
                end
         | 
| 171 | 
            +
             | 
| 172 | 
            +
                def parshas_hashavua(current_week_only: false)
         | 
| 173 | 
            +
                  limud = Zmanim::Limudim::Calculators::Parsha.new(in_israel: in_israel).limud(self)
         | 
| 174 | 
            +
                  limud.clear! if current_week_only && limud.interval.end_date > end_of_week
         | 
| 175 | 
            +
                  limud
         | 
| 166 176 | 
             
                end
         | 
| 167 177 |  | 
| 168 178 | 
             
                def tehillim_portion
         | 
| @@ -303,6 +313,8 @@ module Zmanim::HebrewCalendar | |
| 303 313 | 
             
                def iyar_significant_day
         | 
| 304 314 | 
             
                  if jewish_day == 14
         | 
| 305 315 | 
             
                    :pesach_sheni
         | 
| 316 | 
            +
                  elsif jewish_day == 18
         | 
| 317 | 
            +
                    :lag_baomer
         | 
| 306 318 | 
             
                  elsif use_modern_holidays
         | 
| 307 319 | 
             
                    # Note that this logic follows the current rules, which were last revised in 5764.
         | 
| 308 320 | 
             
                    # The calculations for years prior may not reflect the actual dates observed at that time.
         | 
| @@ -157,6 +157,40 @@ module Zmanim::HebrewCalendar | |
| 157 157 | 
             
                  end
         | 
| 158 158 | 
             
                end
         | 
| 159 159 |  | 
| 160 | 
            +
                def succ
         | 
| 161 | 
            +
                  self + 1
         | 
| 162 | 
            +
                end
         | 
| 163 | 
            +
             | 
| 164 | 
            +
                def step(limit, step=1, &block)
         | 
| 165 | 
            +
                  if step < 0
         | 
| 166 | 
            +
                    downto(limit, -step, &block)
         | 
| 167 | 
            +
                  else
         | 
| 168 | 
            +
                    upto(limit, step, &block)
         | 
| 169 | 
            +
                  end
         | 
| 170 | 
            +
                end
         | 
| 171 | 
            +
             | 
| 172 | 
            +
                def downto(limit, step=1)
         | 
| 173 | 
            +
                  raise ArgumentError, 'step argument must be greater than 0' if step <= 0
         | 
| 174 | 
            +
                  return to_enum(__method__, limit, step) unless block_given?
         | 
| 175 | 
            +
                  c = self
         | 
| 176 | 
            +
                  while c >= limit
         | 
| 177 | 
            +
                    yield c
         | 
| 178 | 
            +
                    c -= step
         | 
| 179 | 
            +
                  end
         | 
| 180 | 
            +
                  self
         | 
| 181 | 
            +
                end
         | 
| 182 | 
            +
             | 
| 183 | 
            +
                def upto(limit, step=1)
         | 
| 184 | 
            +
                  raise ArgumentError, 'step argument must be greater than 0' if step <= 0
         | 
| 185 | 
            +
                  return to_enum(__method__, limit, step) unless block_given?
         | 
| 186 | 
            +
                  c = self
         | 
| 187 | 
            +
                  while c <= limit
         | 
| 188 | 
            +
                    yield c
         | 
| 189 | 
            +
                    c += step
         | 
| 190 | 
            +
                  end
         | 
| 191 | 
            +
                  self
         | 
| 192 | 
            +
                end
         | 
| 193 | 
            +
             | 
| 160 194 | 
             
                def gregorian_year=(year)
         | 
| 161 195 | 
             
                  set_gregorian_date(year, gregorian_month, gregorian_day)
         | 
| 162 196 | 
             
                end
         | 
| @@ -275,6 +309,17 @@ module Zmanim::HebrewCalendar | |
| 275 309 | 
             
                  CHESHVAN_KISLEV_KEVIAH[(days_in_jewish_year(year) % 10) - 3]
         | 
| 276 310 | 
             
                end
         | 
| 277 311 |  | 
| 312 | 
            +
                def kviah(year=jewish_year)
         | 
| 313 | 
            +
                  date = year.is_a?(Numeric) ? Zmanim::HebrewCalendar::JewishDate.new(year, 7, 1) : year
         | 
| 314 | 
            +
                  kviah = date.cheshvan_kislev_kviah
         | 
| 315 | 
            +
                  rosh_hashana_day = date.day_of_week
         | 
| 316 | 
            +
                  date.jewish_month = 1
         | 
| 317 | 
            +
                  pesach_day = date.day_of_week
         | 
| 318 | 
            +
                  {rosh_hashana: rosh_hashana_day,
         | 
| 319 | 
            +
                   kviah: kviah,
         | 
| 320 | 
            +
                   pesach: pesach_day}
         | 
| 321 | 
            +
                end
         | 
| 322 | 
            +
             | 
| 278 323 | 
             
                # Returns a new JewishDate as the molad for given month
         | 
| 279 324 | 
             
                def molad(month=jewish_month, year=jewish_year)
         | 
| 280 325 | 
             
                  self.class.from_molad(chalakim_since_molad_tohu(year, month))
         | 
| @@ -0,0 +1,23 @@ | |
| 1 | 
            +
            require 'zmanim/limudim/calculators/daf_yomi_bavli'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            module Zmanim::Limudim::Calculators
         | 
| 4 | 
            +
              class DafHashavuaBavli < DafYomiBavli
         | 
| 5 | 
            +
                def initial_cycle_date
         | 
| 6 | 
            +
                  jewish_date(Date.parse('2005-03-02'))
         | 
| 7 | 
            +
                end
         | 
| 8 | 
            +
             | 
| 9 | 
            +
                def cycle_end_calculation
         | 
| 10 | 
            +
                  ->(start_date, iteration){ start_date + ((2711*7) - start_date.day_of_week) }  # 2711 pages except first week * 7 days
         | 
| 11 | 
            +
                end
         | 
| 12 | 
            +
             | 
| 13 | 
            +
                def interval_end_calculation
         | 
| 14 | 
            +
                  ->(cycle, start_date){ start_date + (7 - start_date.day_of_week) }
         | 
| 15 | 
            +
                end
         | 
| 16 | 
            +
             | 
| 17 | 
            +
                def cycle_units_calculation
         | 
| 18 | 
            +
                  ->(cycle){ default_units }
         | 
| 19 | 
            +
                end
         | 
| 20 | 
            +
              end
         | 
| 21 | 
            +
            end
         | 
| 22 | 
            +
             | 
| 23 | 
            +
             | 
| @@ -40,7 +40,7 @@ module Zmanim::Limudim::Calculators | |
| 40 40 | 
             
                        meilah: [4,9,8,6,5,6], tamid: [4,5,9,3,6,4,3], midos: [9,6,8,7,4], kinnim: [4,5,6],
         | 
| 41 41 | 
             
                        keilim: [9,8,8,4,11,4,6,11,8,8,9,8,8,8,6,8,17,9,10,7,3,10,5,17,9,9,12,10,8,4], ohalos: [8,7,7,3,7,7,6,6,16,7,9,8,6,7,10,5,5,10],
         | 
| 42 42 | 
             
                        negaim: [6,5,8,11,5,8,5,10,3,10,12,7,12,13], parah: [4,5,11,4,9,5,12,11,9,6,9,11], taharos: [9,8,8,13,9,10,9,9,9,8],
         | 
| 43 | 
            -
                        mikvaos: [8,10,4,5,6,11,7,5,7,8], niddah: [7,7,7,7,9,14,5,4,11,8],  | 
| 43 | 
            +
                        mikvaos: [8,10,4,5,6,11,7,5,7,8], niddah: [7,7,7,7,9,14,5,4,11,8], machshirin: [6,11,8,10,11,8], zavim: [6,4,3,7,12],
         | 
| 44 44 | 
             
                        tevul_yom: [5,8,6,7], yadayim: [5,4,5,8], uktzin: [6,10,12]
         | 
| 45 45 | 
             
                      }.map{|k, v| [k, Hash[v.map.with_index{|m, p| [p+1, m]}]]}]
         | 
| 46 46 | 
             
                end
         | 
| @@ -47,40 +47,40 @@ module Zmanim::Limudim::Calculators | |
| 47 47 |  | 
| 48 48 | 
             
                def cycle_units_calculation
         | 
| 49 49 | 
             
                  ->(cycle) do
         | 
| 50 | 
            -
                     | 
| 50 | 
            +
                    kviah_values = cycle.start_date.kviah.values
         | 
| 51 51 | 
             
                    modifications = in_israel ?
         | 
| 52 52 | 
             
                                     {
         | 
| 53 | 
            -
                                          | 
| 54 | 
            -
                                          | 
| 55 | 
            -
                                          | 
| 56 | 
            -
                                          | 
| 57 | 
            -
                                          | 
| 58 | 
            -
                                          | 
| 59 | 
            -
                                          | 
| 60 | 
            -
                                          | 
| 61 | 
            -
                                          | 
| 62 | 
            -
                                          | 
| 63 | 
            -
                                          | 
| 64 | 
            -
                                          | 
| 65 | 
            -
                                          | 
| 66 | 
            -
                                          | 
| 67 | 
            -
                                     }[ | 
| 53 | 
            +
                                         [2,:chaseirim,5] => [%i(matos masei), %i(nitzavim vayeilech)],
         | 
| 54 | 
            +
                                         [2,:shelaimim,7] => [],
         | 
| 55 | 
            +
                                         [3,:kesidran,7] => [],
         | 
| 56 | 
            +
                                         [5,:chaseirim,1] => [],
         | 
| 57 | 
            +
                                         [5,:shelaimim,3] => [%i(nitzavim vayeilech)],
         | 
| 58 | 
            +
                                         [7,:chaseirim,3] => [%i(matos masei), %i(nitzavim vayeilech)],
         | 
| 59 | 
            +
                                         [7,:shelaimim,5] => [%i(matos masei), %i(nitzavim vayeilech)],
         | 
| 60 | 
            +
                                         [2,:chaseirim,3] => [%i(vayakheil pikudei), %i(tazria metzora), %i(acharei kedoshim), %i(behar bechukosai), %i(matos masei), %i(nitzavim vayeilech)],
         | 
| 61 | 
            +
                                         [2,:shelaimim,5] => [%i(vayakheil pikudei), %i(tazria metzora), %i(acharei kedoshim), %i(behar bechukosai), %i(matos masei), %i(nitzavim vayeilech)],
         | 
| 62 | 
            +
                                         [3,:kesidran,5] => [%i(vayakheil pikudei), %i(tazria metzora), %i(acharei kedoshim), %i(behar bechukosai), %i(matos masei), %i(nitzavim vayeilech)],
         | 
| 63 | 
            +
                                         [5,:kesidran,7] => [%i(vayakheil pikudei), %i(tazria metzora), %i(acharei kedoshim), %i(matos masei)],
         | 
| 64 | 
            +
                                         [5,:shelaimim,1] => [%i(tazria metzora), %i(acharei kedoshim), %i(behar bechukosai), %i(matos masei)],
         | 
| 65 | 
            +
                                         [7,:chaseirim,1] => [%i(vayakheil pikudei), %i(tazria metzora), %i(acharei kedoshim), %i(behar bechukosai), %i(matos masei)],
         | 
| 66 | 
            +
                                         [7,:shelaimim,3] => [%i(vayakheil pikudei), %i(tazria metzora), %i(acharei kedoshim), %i(behar bechukosai), %i(matos masei)],
         | 
| 67 | 
            +
                                     }[kviah_values] :
         | 
| 68 68 | 
             
                                     {
         | 
| 69 | 
            -
                                          | 
| 70 | 
            -
                                          | 
| 71 | 
            -
                                          | 
| 72 | 
            -
                                          | 
| 73 | 
            -
                                          | 
| 74 | 
            -
                                          | 
| 75 | 
            -
                                          | 
| 76 | 
            -
                                          | 
| 77 | 
            -
                                          | 
| 78 | 
            -
                                          | 
| 79 | 
            -
                                          | 
| 80 | 
            -
                                          | 
| 81 | 
            -
                                          | 
| 82 | 
            -
                                          | 
| 83 | 
            -
                                     }[ | 
| 69 | 
            +
                                         [2,:chaseirim,5] => [%i(chukas balak), %i(matos masei), %i(nitzavim vayeilech)],
         | 
| 70 | 
            +
                                         [2,:shelaimim,7] => [%i(matos masei)],
         | 
| 71 | 
            +
                                         [3,:kesidran,7] => [%i(matos masei)],
         | 
| 72 | 
            +
                                         [5,:chaseirim,1] => [],
         | 
| 73 | 
            +
                                         [5,:shelaimim,3] => [%i(nitzavim vayeilech)],
         | 
| 74 | 
            +
                                         [7,:chaseirim,3] => [%i(matos masei), %i(nitzavim vayeilech)],
         | 
| 75 | 
            +
                                         [7,:shelaimim,5] => [%i(chukas balak), %i(matos masei), %i(nitzavim vayeilech)],
         | 
| 76 | 
            +
                                         [2,:chaseirim,3] => [%i(vayakheil pikudei), %i(tazria metzora), %i(acharei kedoshim), %i(behar bechukosai), %i(matos masei), %i(nitzavim vayeilech)],
         | 
| 77 | 
            +
                                         [2,:shelaimim,5] => [%i(vayakheil pikudei), %i(tazria metzora), %i(acharei kedoshim), %i(behar bechukosai), %i(chukas balak), %i(matos masei), %i(nitzavim vayeilech)],
         | 
| 78 | 
            +
                                         [3,:kesidran,5] => [%i(vayakheil pikudei), %i(tazria metzora), %i(acharei kedoshim), %i(behar bechukosai), %i(chukas balak), %i(matos masei), %i(nitzavim vayeilech)],
         | 
| 79 | 
            +
                                         [5,:kesidran,7] => [%i(vayakheil pikudei), %i(tazria metzora), %i(acharei kedoshim), %i(behar bechukosai), %i(matos masei)],
         | 
| 80 | 
            +
                                         [5,:shelaimim,1] => [%i(tazria metzora), %i(acharei kedoshim), %i(behar bechukosai), %i(matos masei)],
         | 
| 81 | 
            +
                                         [7,:chaseirim,1] => [%i(vayakheil pikudei), %i(tazria metzora), %i(acharei kedoshim), %i(behar bechukosai), %i(matos masei)],
         | 
| 82 | 
            +
                                         [7,:shelaimim,3] => [%i(vayakheil pikudei), %i(tazria metzora), %i(acharei kedoshim), %i(behar bechukosai), %i(matos masei), %i(nitzavim vayeilech)],
         | 
| 83 | 
            +
                                     }[kviah_values]
         | 
| 84 84 | 
             
                    modifications.inject(default_units) do |transitioned_units, parsha_pair|
         | 
| 85 85 | 
             
                      index = transitioned_units.index(parsha_pair.first)
         | 
| 86 86 | 
             
                      transitioned_units[0...index] + [parsha_pair] + transitioned_units[(index + 2)..-1]
         | 
    
        data/lib/zmanim/limudim/cycle.rb
    CHANGED
    
    | @@ -32,9 +32,5 @@ module Zmanim::Limudim | |
| 32 32 | 
             
                  new_end_date = cycle_end_calculation.(new_start_date, new_iteration)
         | 
| 33 33 | 
             
                  Cycle.new(new_start_date, new_end_date, new_iteration)
         | 
| 34 34 | 
             
                end
         | 
| 35 | 
            -
             | 
| 36 | 
            -
                def first_interval(interval_end_calculation)
         | 
| 37 | 
            -
                  Interval.first_for_cycle(self, interval_end_calculation)
         | 
| 38 | 
            -
                end
         | 
| 39 35 | 
             
              end
         | 
| 40 36 | 
             
            end
         | 
    
        data/lib/zmanim/limudim/limud.rb
    CHANGED
    
    
| @@ -7,7 +7,7 @@ module Zmanim::Limudim | |
| 7 7 | 
             
                  cycle = find_cycle(jewish_date)
         | 
| 8 8 | 
             
                  return nil unless cycle && cycle.end_date >= date
         | 
| 9 9 | 
             
                  units = cycle_units_calculation.(cycle)
         | 
| 10 | 
            -
                  interval =  | 
| 10 | 
            +
                  interval = Interval.first_for_cycle(cycle, interval_end_calculation)
         | 
| 11 11 | 
             
                  while !jewish_date.between?(interval.start_date, interval.end_date) do
         | 
| 12 12 | 
             
                    interval = if skip_interval?(interval)
         | 
| 13 13 | 
             
                                 interval.skip(interval_end_calculation)
         | 
| @@ -124,7 +124,7 @@ module Zmanim::Limudim | |
| 124 124 | 
             
                    taharos: 'טהרות',
         | 
| 125 125 | 
             
                    mikvaos: 'מקואות',
         | 
| 126 126 | 
             
                    niddah: 'נדה',
         | 
| 127 | 
            -
                     | 
| 127 | 
            +
                    machshirin: 'מכשירין',
         | 
| 128 128 | 
             
                    zavim: 'זבים',
         | 
| 129 129 | 
             
                    tevul_yom: 'טבול יום',
         | 
| 130 130 | 
             
                    yadayim: 'ידים',
         | 
| @@ -138,6 +138,7 @@ module Zmanim::Limudim | |
| 138 138 | 
             
                end
         | 
| 139 139 |  | 
| 140 140 | 
             
                def format_parsha(limud)
         | 
| 141 | 
            +
                  return '' unless limud && limud.unit
         | 
| 141 142 | 
             
                  prefix = hebrew_format ? 'פרשת ' : 'Parshas '
         | 
| 142 143 | 
             
                  prefix + limud.unit.render do |parsha|
         | 
| 143 144 | 
             
                    hebrew_format ? PARSHIYOS[parsha] : titleize(parsha)
         | 
    
        data/lib/zmanim/version.rb
    CHANGED
    
    
| @@ -142,7 +142,7 @@ module Zmanim | |
| 142 142 |  | 
| 143 143 | 
             
                def offset_by_minutes_zmanis(time, minutes)
         | 
| 144 144 | 
             
                  return unless time
         | 
| 145 | 
            -
                  shaah_zmanis_skew =  | 
| 145 | 
            +
                  shaah_zmanis_skew = shaah_zmanis_gra / HOUR_MILLIS
         | 
| 146 146 | 
             
                  time + (minutes * shaah_zmanis_skew / (60 * 24).to_f)
         | 
| 147 147 | 
             
                end
         | 
| 148 148 | 
             
              end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: zmanim
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0. | 
| 4 | 
            +
              version: 0.4.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Pinny Markowitz
         | 
| 8 | 
            -
            autorequire: | 
| 8 | 
            +
            autorequire:
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2020-10-14 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: tzinfo
         | 
| @@ -105,6 +105,7 @@ files: | |
| 105 105 | 
             
            - lib/zmanim/limudim/anchor/day_of_month_anchor.rb
         | 
| 106 106 | 
             
            - lib/zmanim/limudim/anchor/day_of_week_anchor.rb
         | 
| 107 107 | 
             
            - lib/zmanim/limudim/anchor/day_of_year_anchor.rb
         | 
| 108 | 
            +
            - lib/zmanim/limudim/calculators/daf_hashavua_bavli.rb
         | 
| 108 109 | 
             
            - lib/zmanim/limudim/calculators/daf_yomi_bavli.rb
         | 
| 109 110 | 
             
            - lib/zmanim/limudim/calculators/daf_yomi_yerushalmi.rb
         | 
| 110 111 | 
             
            - lib/zmanim/limudim/calculators/mishna_yomis.rb
         | 
| @@ -132,7 +133,7 @@ homepage: https://github.com/pinnymz/ruby-zmanim | |
| 132 133 | 
             
            licenses: []
         | 
| 133 134 | 
             
            metadata:
         | 
| 134 135 | 
             
              allowed_push_host: https://rubygems.org
         | 
| 135 | 
            -
            post_install_message: | 
| 136 | 
            +
            post_install_message:
         | 
| 136 137 | 
             
            rdoc_options: []
         | 
| 137 138 | 
             
            require_paths:
         | 
| 138 139 | 
             
            - lib
         | 
| @@ -147,9 +148,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 147 148 | 
             
                - !ruby/object:Gem::Version
         | 
| 148 149 | 
             
                  version: '0'
         | 
| 149 150 | 
             
            requirements: []
         | 
| 150 | 
            -
             | 
| 151 | 
            -
             | 
| 152 | 
            -
            signing_key: 
         | 
| 151 | 
            +
            rubygems_version: 3.1.4
         | 
| 152 | 
            +
            signing_key:
         | 
| 153 153 | 
             
            specification_version: 4
         | 
| 154 154 | 
             
            summary: A Zmanim library for Ruby
         | 
| 155 155 | 
             
            test_files: []
         |