Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

RE: RE: Date::Calc

by lhoward (Vicar)
on Sep 12, 2000 at 00:11 UTC ( #31968=note: print w/replies, xml ) Need Help??

in reply to RE: Date::Calc
in thread Date::Calc

I must disagree. Many people feel that Date::Calc is big and clunky. It is large, but the job it is performing it complicated and intricate. If performance is of maximal importance then I agree that you would be better off rolling a high-performance date routine that is custom-tailored to your needs (but if performance is your #1 concern, you probably shouldn't be using Perl either).

However, if reliability and correctness of your code is important, then you should use Date::Calc. If you have spent any time doing serious date logic, you will understand the benefits of using a well-tested, full-featured library of date routines such as Date::Calc. Why re-invent the wheel, especially if you don't have to. Date arithmetic is particularly nasty (if you want to know just how nasty, check out Calenderical Calculations by Dershowitz and Reingold) and very easy to get wrong or introduce subtle errors. Heed my advice and always try Date::Calc (or another well-written and properly tested date module) before falling-back and writing your own.

Replies are listed 'Best First'.
RE: RE: RE: Date::Calc
by Anonymous Monk on Oct 28, 2000 at 00:09 UTC
    I must disagree with lhoward, who disagreed :-). Since Date::Calc is internally written in C, it is probably much faster than anything you could roll yourself, in Perl. -- Steffen Beyer

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://31968]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2018-06-25 02:39 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.