Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- daily = []
- weekly = []
- annually = []
- times = checkins.map { |i| i.created }
- times.each do |time|
- daily << (0..23).to_a.map { |i| if(time.hour == i) then 1 else 0 end }
- weekly << (0..6).to_a.map { |i| if(time.wday == i) then 1 else 0 end }
- annually << (0..365).to_a.map { |i| if(time.yday == i) then 1 else 0 end }
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement