Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
a gem to change time to human readable format.
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
.DS_Store
.document
.gitignore
LICENSE.txt
README.rdoc
VERSION
timeago-0.0.4.gem
timeago.gemspec

README.rdoc

timeago

to use this gem, just require and run it, like this:

Example 1

require 'timeago'  
time = Time.now - 60    
TimeAgo.readable(time)

and it should output

one minute ago

Example 2

require 'timeago'   
time = Time.now - 13250  
TimeAgo.readable(time)

this should output

3 hours ago

this can go up to 5 years ago, after that it will change to the exact date.

Todo

  • build ability to change max - time

  • add seconds

  • add language options?

Copyright © 2012 Frederik Reich.

Something went wrong with that request. Please try again.