Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

How to compare two date strings??

by dani_cv_74 (Novice)
on Jun 15, 2006 at 14:30 UTC ( [id://555505]=perlquestion: print w/replies, xml ) Need Help??

dani_cv_74 has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: How to compare two date strings??
by prasadbabu (Prior) on Jun 15, 2006 at 14:35 UTC
Re: How to compare two date strings??
by davorg (Chancellor) on Jun 15, 2006 at 14:42 UTC

    What do you mean by "compare"? Do you just want to find which is the earliest? Or the latest?

    The easiest way is probably to convert them into DateTime objects. DateTime::Format::Strptime can be useful for that.

    --
    <http://dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg

Re: How to compare two date strings??
by jdtoronto (Prior) on Jun 15, 2006 at 14:41 UTC
    Date::Calc

    Updated At the very sensible suggestion of davorg I have removed Date::Manip - that module is excellent, but with newer things around it should only be used in exceptional circumstances.

      If you look in CPAN, you'll find that there are a number of Date and Time packages. Is Date::Manip the one you should be using? In my opinion, the answer is no most of the time.

      That's the author of Date::Manip writing in the documentation. I wish people would stop recommending Date::Manip. The DateTime family of modules is more powerful and (most importantly) has a consistant API.

      --
      <http://dave.org.uk>

      "The first rule of Perl club is you do not talk about Perl club."
      -- Chip Salzenberg

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://555505]
Approved by Joost
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2024-04-25 05:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found