-
Notifications
You must be signed in to change notification settings - Fork 3
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
aea025e
commit 03940e0
Showing
1 changed file
with
26 additions
and
14 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,19 +1,31 @@ | ||
= timeago | ||
== timeago | ||
|
||
Description goes here. | ||
to use this gem, just require and run it, like this: | ||
|
||
== Contributing to timeago | ||
|
||
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet. | ||
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it. | ||
* Fork the project. | ||
* Start a feature/bugfix branch. | ||
* Commit and push until you are happy with your contribution. | ||
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally. | ||
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it. | ||
= Example 1 | ||
|
||
== Copyright | ||
> 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) | ||
|
||
Copyright (c) 2012 Frederik Reich. See LICENSE.txt for | ||
further details. | ||
this should output | ||
> 3 hours ago | ||
|
||
this can go up to 5 years ago, after that it will change to the exact date. | ||
|
||
== Copyright | ||
|
||
Copyright (c) 2012 Frederik Reich. |