Guest User

Untitled

a guest
Feb 20th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. def lapsed (secs)
  2. ret = case seconds
  3. when 0..59 then seconds.to_s + " seconds"
  4. when 60..3600 then (seconds / 60).to_s + " minutes"
  5. when 3601..216000 then (seconds / 3600).to_s + " hours"
  6. when 216001..1512000 then (seconds / 216000).to_s + "days"
  7. else (seconds / 1512000).to_s + " weeks"
  8. end
  9. return ret
  10. end
Add Comment
Please, Sign In to add comment