On Thu, Mar 15, 2012 at 04:43:32PM -0500, David McMath wrote: > A while back, I needed to some routines to parse timestamps so I > started using DateTime::Format::Strptime. The times were uniformly > formatted like "2012-03-13T07:43:07-07:00". That /almost/ matched > the pattern "%FT%T%z" but I couldn't figure out how to force the > match. So I ended up taking a shortcut and removing the final ":" > before processing. > > Now I want to recycle the code and handle a few more formats and I'd > /really/ like it to be the case that I don't have to do any > manipulations of the strings before parsing; I'd much rather just > have the caller specify what the proper format is and go from there.
You might take a look at DateTime::Format::Builder. -kolibrie
signature.asc
Description: Digital signature
