Thanks to visit codestin.com
Credit goes to github.com

Skip to content

sosedoff/flexyear

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flexyear

Flexible years! Parse decades, ranges, and etc into low & high values.

Examples:

FlexYear.new("1980s").year_low == 1980
FlexYear.new("1980s").year_high == 1989

FlexYear.new("mid-80s").year_low == 1983
FlexYear.new("mid-80s").year_high == 1986

It's pretty flexible in the kinds of things it takes. For more examples, see the spec.

Installation

Add this line to your application's Gemfile:

gem 'flexyear'

And then execute:

$ bundle

Or install it yourself as:

$ gem install flexyear

Contributing

  1. Fork it
  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 new Pull Request

About

Simple natural language year range parsing (mid-80s, 1970s, 75-76)

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Ruby 100.0%