in reply to Re: Capturing Date/Time
in thread Capturing Date/Time

Don't personally like the split alternative as much. Neither approach here really do much to verify the data, but the regex is at least a bit more strict. So the regex fails to match for a string like "foo bar, baz" but the split passes it along as a valid date.

Obviously if verification of valid dates is required to prevent something like "Feb 99, 0000" for instance, then a module of some sort would probably be the best approach. (Although I can't suggest a particular module off the top of my head)

Replies are listed 'Best First'.
Re^3: Capturing Date/Time
by FunkyMonk (Bishop) on Aug 16, 2007 at 23:35 UTC
    Validation of the data was not one of my goals, as per the OP. If it had been, I'd have used one of the (far too1) many date modules available.
    1 A personal beef of mine. Don't worry about it.