Skip to content

FRickReich/timeago

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

a gem to change time to human readable format.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages