ifd_tools 0.1.0 → 0.1.1
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.
| @@ -79,8 +79,8 @@ module IfdTools | |
| 79 79 |  | 
| 80 80 | 
             
                      # Depending on how many records exist, want to narrow that down a good bit
         | 
| 81 81 | 
             
                      distribution = @events.count
         | 
| 82 | 
            -
                      first_date = distribution.keys.first.to_date
         | 
| 83 | 
            -
                      last_date = distribution.keys.last.to_date
         | 
| 82 | 
            +
                      first_date = distribution.keys.first.to_date rescue Date.today
         | 
| 83 | 
            +
                      last_date = distribution.keys.last.to_date rescue Date.today
         | 
| 84 84 | 
             
                      num_days_in_time_span = (first_date..last_date).count rescue 0
         | 
| 85 85 |  | 
| 86 86 | 
             
                      grouping = :days
         | 
| @@ -103,8 +103,8 @@ module IfdTools | |
| 103 103 | 
             
                      end
         | 
| 104 104 |  | 
| 105 105 | 
             
                      # Start/end dates might have changed
         | 
| 106 | 
            -
                      first_date = @events.keys.first.to_date
         | 
| 107 | 
            -
                      last_date = @events.keys.last.to_date
         | 
| 106 | 
            +
                      first_date = @events.keys.first.to_date rescue nil
         | 
| 107 | 
            +
                      last_date = @events.keys.last.to_date rescue nil
         | 
| 108 108 |  | 
| 109 109 | 
             
                      date_step =
         | 
| 110 110 | 
             
                       case grouping
         | 
    
        data/lib/ifd_tools/version.rb
    CHANGED