in reply to Date String Parsing

Your requirement of "no laundry list" is a ridiculous requirement and should be dropped, thus allowing DateTime as the proper solution.

My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Replies are listed 'Best First'.
Re^2: Date String Parsing
by Corion (Patriarch) on Nov 27, 2007 at 16:36 UTC

    DateTime itself has no sensible parser. There is DateTime::Format::strptime, but after looking at its code, I'm not sure anymore that that's a sensible solution :-)

Re^2: Date String Parsing
by Limbic~Region (Chancellor) on Nov 27, 2007 at 16:47 UTC
    dragonchild,
    You may think it is a ridiculous requirement but I disagree. I am not going to defend the position but instead set it aside to see how well DateTime fits the other criterion. Since DateTime doesn't even have a parsing method that I can see, let's assume you meant DateTime::Format::DateParse which isn't part of the DateTime bundle.
    • Written in pure perl - pass
    • Is not part of a bundle of other un-wanted modules - pass since the bundle is quite small
    • Well documented - fail
    • Provides the ability to control behavior when multiple dates are possible - fail from my perspective (strptime)

    So it fails 2 of the remaining requirements, the same as Date::Manip, but also doesn't satisfy my ridiculous requirement.

    Cheers - L~R

    Swapped "dependencies" with "bundle" requirement