Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

RE: Date::Calc

by cwest (Friar)
on Sep 11, 2000 at 23:55 UTC ( [id://31962]=note: print w/replies, xml ) Need Help??


in reply to Date::Calc

And it's huge and clunky, 'nuff said.

but seriously, you may be better off just rolling your own for a few conversions that loading that monolithic date hacking machine.

--
Casey

Replies are listed 'Best First'.
RE: RE: Date::Calc
by lhoward (Vicar) on Sep 12, 2000 at 00:11 UTC
    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.

      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 sb@engelschall.com
RE: RE: Date::Calc
by Anonymous Monk on Oct 28, 2000 at 00:06 UTC
    Actually, there are people who reported to me that they prefer to use Date::Calc instead of Date::Manip, because Date::Calc is more compact, takes less time to load and is faster (because it is written in C, internally) than Date::Manip, even though Date::Manip is more powerful for instance in parsing dates (natural language constructs are possible) and in calculations involving business days. -- Steffen Beyer sb@engelschall.com
Re: RE: Date::Calc
by Graham (Deacon) on Jun 13, 2001 at 15:58 UTC
    On the contary, it is huge and clunky because it is so fully featured.

    We use it extensively within our applications because of this and positively welcome and would willingly assist with future enhancements.

RE: RE: Date::Calc
by Maclir (Curate) on Sep 12, 2000 at 02:15 UTC
    I believe you only need to "use" the particular conversions relevant to your needs.
Re^2: Date::Calc
by ostbey (Initiate) on Oct 09, 2009 at 06:07 UTC
    Date/Manip.pm v5.54: 240908 Bytes
    Date/Pcalc.pm v6.0: 98112 Bytes
    Date/Calc.so v6.0: 125005 Bytes
    
    All under FreeBSD 7.2-STABLE AMD64 with Perl compile-time
    options (among others) USE_64_BIT_ALL and USE_64_BIT_INT.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (6)
As of 2024-03-28 10:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found