Sha256: 93870eaffb1c9cc5f96d98dd1c388044dac898abaac6c35c33476c3488ebf97d
Contents?: true
Size: 1.18 KB
Versions: 4
Compression:
Stored size: 1.18 KB
Contents
# InterpretDate [![Build status](https://travis-ci.org/sqm/interpret_date.svg?branch=master)](https://travis-ci.org/sqm/interpret_date) Module to provide helper methods for interpreting American formatted date strings. ## Installation Add this line to your application's Gemfile: gem 'interpret_date' And then execute: $ bundle Or install it yourself as: $ gem install interpret_date ## Usage To utilize `interpret_date`, mix in the `InterpretDate` module into a class that needs to interpret American formatted dates into ruby Date objects and pass the date string into the `interpret_date` or `interpret_dob_date`. Example (setting attributes for an example `ActiveRecord` model): ```ruby class Parcel < ActiveRecord::Base include InterpretDate def shipping_date=(value) super(interpret_date(value)) end def birthdate=(value) super(interpret_dob_date(value)) end end ``` ## Contributing 1. Fork it ( https://github.com/sqm/interpret_date/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create a new Pull Request
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
interpret_date-1.1.1 | README.md |
interpret_date-1.1.0 | README.md |
interpret_date-1.0.1 | README.md |
interpret_date-1.0.0 | README.md |