Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Fussy Date::Parse...

Reply
Thread Tools

Fussy Date::Parse...

 
 
DJ Stunks
Guest
Posts: n/a
 
      02-27-2007
All,

I love Date:arse but it's struggling parsing what I consider to be a
pretty unambiguous date time that Date::Manip handles just fine...

C:\>perl -MDate:arse \
-e "print str2time('2/26/2007 14:38:13 PM') ? 'y' : 'n'"
n

C:\>perl -MDate::Manip \
-e "print UnixDate('2/26/2007 14:38:13 PM','%s') ? 'y' : 'n'"
y

C:\>perl -MDate::Manip \
-e "print UnixDate('2/26/2007 14:38:13 PM','%m/%d/%Y %T')"
02/26/2007 14:38:13

I don't really have a question because Date::Manip is ok, but I needed
epoch time.

-jp

 
Reply With Quote
 
 
 
 
Gunnar Hjalmarsson
Guest
Posts: n/a
 
      02-27-2007
DJ Stunks wrote:
> I love Date:arse but it's struggling parsing what I consider to be a
> pretty unambiguous date time that Date::Manip handles just fine...
>
> C:\>perl -MDate:arse \
> -e "print str2time('2/26/2007 14:38:13 PM') ? 'y' : 'n'"

--------------------------------^^-------^^

Shouldn't that be 2:38:13 PM or just 14:38:13?

To it seems like Date:arse is doing the right thing, unlike Date::Manip.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Least 'fussy' DVD +/- RW dual layer rewriter? SS Computer Support 4 06-08-2006 04:26 PM
Fussy Firefox IRC Monkey Firefox 23 09-27-2005 06:18 PM
Comcast Broadband Fussy Maskman Computer Support 7 09-25-2004 11:43 PM
Phoenix bios update 14 how fussy? dsr@Florence.edu Computer Information 2 12-04-2003 05:40 PM



Advertisments