Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

An online date/time parsing service, based on the 'chronic' ruby gem.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 views
Octocat-spinner-32 .gems
Octocat-spinner-32 README
Octocat-spinner-32 config.ru
Octocat-spinner-32 local.rb
Octocat-spinner-32 timeapi.rb
README
timeapi
========

An online date/time parsing service, based on the 'chronic' ruby gem.



Overview
---------

Chronic [ http://chronic.rubyforge.org/ ] is a natural language date/time parser 
written in pure Ruby. TimeAPI just adds an RESTful service around chronic.



Usage
------

From a browser visit http://chronic.heroku.com/ and fill the textbox with a 
string containing a natural language date. Examples: 'tomorrow', 'in two hours' etc.

API (just one method) is available on URL http://chronic.heroku.com/pdt/{your_string}
For example:

  http://chronic.heroku.com/pdt/in+two+hours

You can also add a format string based on Ruby Time strftime, replacing % with \
For example:

  http://chronic.heroku.com/pdt/in+two+hours?\a \b \d \I:\M:\S \Z \Y

See http://corelib.rubyonrails.org/classes/Time.html#M000264 for more info.
Something went wrong with that request. Please try again.