chronic

https://github.com/mojombo/chronic

Ruby

Chronic is a pure Ruby natural language date parser.

Chronic.parse

Parses a string containing a natural language date or time.

If the parser can find a date or time, either a Time or Chronic::Span
will be returned (depending on the value of `:guess`). If no
date or time can be found, `nil` will be returned.

text - The String text to parse.
opts - An optional Hash of configuration options passed to Parser::new.

Source | Google | Stack overflow

Edit

git clone [email protected]:mojombo/chronic.git

cd chronic

open lib/chronic.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Chronic-parse-for-pr


# Commit to git

git add lib/chronic.rbgit commit -m "better docs for Chronic.parse"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Chronic-parse-for-pr

hub pull-request


# Celebrate!