No description, website, or topics provided.
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
best_time.rb
chart.html

README.md

Best Time

  1. Time of week
  2. Time of day
now = Time.now
conversions = [
  now,
  now + 3600,
  now + 7200
]

bt = BestTime.new(conversions, :week)
puts bt.best_time
puts bt.buckets
bt.graph

Weighted values

conversions = [
  {:time => now, :value => 2},
  {:time => now + 86400, :value => 1}
]