Skip to content

Commit

Permalink
Update README.rdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
FRickReich committed Feb 16, 2012
1 parent 20c9922 commit 7cdebad
Showing 1 changed file with 26 additions and 30 deletions.
56 changes: 26 additions & 30 deletions README.rdoc
@@ -1,31 +1,27 @@
= timeago = timeago


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


==== Example 1 ==== Example 1


> require 'timeago' > require 'timeago'
> > time = Time.now - 60
> time = Time.now - 60 > Timeago.readable(time)
>
> Timeago.readable(time) and it should output

> one minute ago
and it should output
> one minute ago ==== Example 2


==== Example 2 > require 'timeago'

> time = Time.now - 13250
> require 'timeago' > Timeago.readable(time)
>
> time = Time.now - 13250 this should output
> > 3 hours ago
> Timeago.readable(time)

this can go up to 5 years ago, after that it will change to the exact date.
this should output
> 3 hours ago


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



Copyright (c) 2012 Frederik Reich. Copyright (c) 2012 Frederik Reich.

0 comments on commit 7cdebad

Please sign in to comment.