Re: Date::Parse and strange dates

2014-07-25 Thread Rob Dixon
On 25/07/2014 17:54, Chris Knipe wrote: Hi All, I have the odd (very rare) case where I am given a date in an incorrect format. I already use Date::Parse to convert the dates to a unix timestamp, and it’s working incredibly well. However, on the rare case that I get incorrect dates, Date::Pars

Re: Date::Parse and strange dates

2014-07-25 Thread Jim Gibson
On Jul 25, 2014, at 9:54 AM, Chris Knipe wrote: > Hi All, > > I have the odd (very rare) case where I am given a date in an incorrect > format. I already use Date::Parse to convert the dates to a unix timestamp, > and it’s working incredibly well. However, on the rare case that I get > inc

Re: Date::Parse and strange dates

2014-07-25 Thread Brian Fraser
On Fri, Jul 25, 2014 at 6:54 PM, Chris Knipe wrote: > Hi All, > > > > I have the odd (very rare) case where I am given a date in an incorrect > format. I already use Date::Parse to convert the dates to a unix timestamp, > and it’s working incredibly well. However, on the rare case that I get > i

Re: Date::Parse and strange dates

2014-07-25 Thread Chris Knipe
On Fri, Jul 25, 2014 at 7:12 PM, Andy Bach wrote: > > On Fri, Jul 25, 2014 at 11:54 AM, Chris Knipe wrote: >> >> Thu, 23 Oct 2008 12:06:48+0400 >> >> >> >> Note the lack of a space between the seconds and the timezone. > > > Well, depending upon the consistency of your one bad case (presuming the

Re: Date::Parse and strange dates

2014-07-25 Thread Andy Bach
On Fri, Jul 25, 2014 at 11:54 AM, Chris Knipe wrote: > Thu, 23 Oct 2008 12:06:48+0400 > > > > Note the lack of a space between the seconds and the timezone. > Well, depending upon the consistency of your one bad case (presuming the date string is in $_ for the moment): if ( s/(\w+, \s+ \d+ \s+ \

Re: Date::Parse and strange dates

2014-07-25 Thread Shawn H Corey
On Fri, 25 Jul 2014 18:54:25 +0200 Chris Knipe wrote: > Is there a simple quick way to fix that by means of a regex? Have you checked Regexp::Common ? It has a whole bunch of date regexps. -- Don't stop where the ink does. Shawn -- To unsubscribe, e-mail: beginners-unsubscr...@perl.

Date::Parse and strange dates

2014-07-25 Thread Chris Knipe
Hi All, I have the odd (very rare) case where I am given a date in an incorrect format. I already use Date::Parse to convert the dates to a unix timestamp, and it's working incredibly well. However, on the rare case that I get incorrect dates, Date::Parse does not like them either and errors