The decision to use that module or not depends mostly on performance, as pointed out by davorg in his book. We pay a high price when we have a high number of dates to scan and convert.
My personal choice is to use a regex if I only have a small script with just one spot dealing with simple dates.
However, when dealing with databases, I use Date::Manip, even if I have only one occurrence in the script. The reason is that in this way, I have a consistent management of dates in all my database scripts.


We should compare efficiency vs. ease of coding. I mostly use Perl for database maintenance and data migration (with DBI, of course!) Especially for the latter, Date::Manip is wonderful. I can get dates from the most exotic formats and throw them at the database. We might say that, having a million records to migrate, it can take five minutes more than using a simple regex. True, but if our simple regex was too simple and not smart enough to deal with different date formats, then we might end up coding for hours trying to get it right, while Date::Manip will relieve us of such burden.

Every situation is different. We should make some accurate measurement if we want to include Date::Manip for web usage. But for administration, AFAIAC, it's a godsend.
_ _ _ _ (_|| | |(_|>< _|

In reply to Re: Re: Re: Coverting Date Formats by gmax
in thread Coverting Date Formats by tomazos

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.