Stories
Slash Boxes
Comments

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

miyagawa (1653)

miyagawa
  (email not shown publicly)
http://bulknews.vox.com/
AOL IM: bulknews (Add Buddy, Send Message)

Journal of miyagawa (1653)

Sunday October 22, 2006
12:34 AM

chronic - narural date/time parser for Ruby

[ #31378 ]

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.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Also, I like the date parser embedded in CVS, it parses some natural dates easily. Other programs have reused it (e.g. RPM).
    • 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 is now on CPAN. The POD says it's inspired by chronic :)
    http://search.cpan.org/~schubiger/DateTime-Natural-Parse-0.01/ [cpan.org]
    • 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!"

      • 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 :)
    • 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.