Skip to content

Instantly share code, notes, and snippets.

View rutvij-pandya's full-sized avatar

Rutvij Pandya rutvij-pandya

View GitHub Profile
@rutvij-pandya
rutvij-pandya / age.rb
Created February 24, 2014 11:55 — forked from emad-elsaid/age.rb
require 'time'
Date_of_birth = '1988-8-31'
# Credit to : http://stackoverflow.com/questions/4136248/how-to-generate-a-human-readable-time-range-using-ruby-on-rails
# and modified a little bit
def humanize secs
[
[60, :seconds],
[60, :minutes],