From 3e4b6bc8a8e572ca4ab69acbaf0f8e498791f9d6 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Tue, 27 Jul 2010 20:01:36 +0300 Subject: [PATCH] updated readme --- README.md | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 570c31d..54bd7d1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,32 @@ -# time_ext +# Ruby Time Extensions + +This gem extends the abilities of Ruby's built-in Time class by building on top of what [ActiveSupport][as] already adds. Hence I must also warn that using this gem will load all of ActiveSupport at this time. + + +## Installation + + gem install time_ext + + +## Basic Usage + + require "time/ext" + Time.now.round(:week) + #=> Beginning of this week, or next week depending on which date is closest + + +## Notable Methods + +The `round`, `floor`, and `ceil` methods were the main reason I created this gem. Each of them takes a unit argument, which can be one of the following: `:sec`, `:min`, `:hour`, `:day`, `:week`, `:month`, `:quarter`, and `:year`. + +For more, please refer to the source code or the spec tests for now. + + +## To-Do + +* Improve ReadMe file. +* Improve documentation. -Description goes here. ## Note on Patches/Pull Requests @@ -12,6 +38,7 @@ Description goes here. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull) * Send me a pull request. Bonus points for topic branches. + ## Copyright (The MIT License) @@ -36,3 +63,7 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + +[as]: http://as.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Time/Calculations.html \ No newline at end of file