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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top