Fussy Date::Parse...

D

DJ Stunks

All,

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

C:\>perl -MDate::parse \
-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
 
G

Gunnar Hjalmarsson

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

C:\>perl -MDate::parse \
-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::parse is doing the right thing, unlike Date::Manip.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,738
Latest member
JinaMacvit

Latest Threads

Top