chronic
https://github.com/mojombo/chronic
Ruby
Chronic is a pure Ruby natural language date parser.
Chronic::Tag.scan_for
Internal: Scan for specified items and create respective Tag class.
token - Token to match against.
klass - Tag class to create.
items - Item(s) to match. It can be Hash, String, Symbol or Regexp.
Hash keys can be String, Symbol or Regexp, but values much be Symbol.
options - Options as hash to pass to Tag class.
Returns an instance of specified Tag klass or nil if item(s) didn't match.Edit
git clone [email protected]:mojombo/chronic.git
cd chronic
open lib/chronic/tag.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Chronic--Tag-scan_for-for-pr
# Commit to gitgit add lib/chronic/tag.rbgit commit -m "better docs for Chronic::Tag.scan_for"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Chronic--Tag-scan_for-for-pr
hub pull-request
# Celebrate!