Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
20c9922
commit 7cdebad
Showing
1 changed file
with
26 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,27 @@ | ||
= 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. | ||
|
||
|
||
|
||
= 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. | ||
|
||
|
||
|
||
Copyright (c) 2012 Frederik Reich. |