Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def lapsed (secs)
- ret = case seconds
- when 0..59 then seconds.to_s + " seconds"
- when 60..3600 then (seconds / 60).to_s + " minutes"
- when 3601..216000 then (seconds / 3600).to_s + " hours"
- when 216001..1512000 then (seconds / 216000).to_s + "days"
- else (seconds / 1512000).to_s + " weeks"
- end
- return ret
- end
Add Comment
Please, Sign In to add comment