def add(ts, word_count)
      # Ruby 1.8 doesn't have DateTime#to_date, so we check that here
      begin
        k = ts.to_date
      rescue NoMethodError
        k = Date.parse(ts.to_s)
      end
      if @history[:archive][k].nil?
        @history[:archive][k] = { min: word_count, max: word_count, start: word_count, end: word_count, ctr: 1 }
      else
        @history[:archive][k][:min] = word_count if @history[:archive][k][:min] > word_count
        @history[:archive][k][:max] = word_count if @history[:archive][k][:max] < word_count
        @history[:archive][k][:end] = word_count
        @history[:archive][k][:ctr] += 1
      end
    end
def add(ts, word_count)
      # Ruby 1.8 doesn't have DateTime#to_date, so we check that here
      begin
        k = ts.to_date
      rescue NoMethodError
        k = Date.parse(ts.to_s)
      end
      if @history[:archive][k].nil?
        @history[:archive][k] = { min: word_count, max: word_count, start: word_count, end: word_count, ctr: 1 }
      else
        @history[:archive][k][:min] = word_count if @history[:archive][k][:min] > word_count
        @history[:archive][k][:max] = word_count if @history[:archive][k][:max] < word_count
        @history[:archive][k][:end] = word_count
        @history[:archive][k][:ctr] += 1
      end
    end
Add to the history