node package manager


A (terrible) way to use Chronic in Node.

Crutch is a (terrible) way to use Chronic in NodeJS applications.

In a nutshell

var parse = require('crutch').parse
parse( 'next tuesday at 2pm', function( err, date, str ){
  if (err) throw err;
  console.log( 'Javascript date object: ', date );
  console.log( 'Chronic actually said: ', str );

Getting Crutch

Install via npm, thusly:

npm install crutch

Honestly, because missing Chronic is keeping me from building shit in Node.

I didn't find one I considered "robust enough" when I looked.

"Crutch" is exactly that: something to lean on until it's no longer useful. I hope that's soon.

I might, but you probably wouldn't want to.

It spawns a ruby process, then uses JSON-RPC's ugly cousin to coax magic of Chronic#parse.

Send your hate-mail to: Kieran Huggins, partner at Refactory in Toronto, Canada.