chronic - narural date/time parser for Ruby

miyagawa on 2006-10-22T05:34:33

chronic is a new natural date/time parser for Ruby. By "natural" I mean something like "tomorrow 5pm".

I talked with Jesse (obra) that we need something close to this in Perl as a standalone module as well. By standalone we mean something not Date::Manip, which code and APIs make me very sad. I haven't looked at the chronic code yet but I believe this has an MIT/X11 license and would not be that hard to port to Perl.


CVS

rafael on 2006-10-22T12:25:11

Also, I like the date parser embedded in CVS, it parses some natural dates easily. Other programs have reused it (e.g. RPM).

Re: CVS

slanning on 2006-10-24T11:26:43

I guess that it is getdate.y (both CVS and RPM source code have this in common - looks like it used to be for emacs, though I don't see it in the emacs source now).

DateTime::Natural::Parse

miyagawa on 2006-10-23T04:56:00

DateTime::Natural::Parse is now on CPAN. The POD says it's inspired by chronic :)
http://search.cpan.org/user/schubiger/DateTime-Natural-Parse-0.01/

Re: DateTime::Natural::Parse

slanning on 2006-10-24T07:47:51

I'd rather see the ParseDate function factored out from Date::Manip. Date::Manip has been around for a long time, so it's mature. It's localized for English, French, Swedish, etc...

This new module has the feel of "Ooh, I better get something on CPAN before someone else does!"

Re: DateTime::Natural::Parse

miyagawa on 2006-10-24T07:52:27

I'd rather see the ParseDate function factored out from Date::Manip. Date::Manip has been around for a long time, so it's mature. It's localized for English, French, Swedish, etc...

Please do. I had a look at the code and ended up with a headache :)

Re:DateTime::Natural::Parse

2shortplanks on 2006-10-24T08:57:17

This is cool.

I'd feel better if there was a test suite attached to it to check the examples in the documentation. I'd also like to be able to have a natural string relative to another date (opposed to just now.) Actually, thinking about it, the latter is a prerequisite for the former.