[mplspm]: A project for MPM
Stephen R. Wilcoxon
wilcoxon at bridge.com
Tue Nov 12 15:52:41 CST 2002
On Tue 2002/10/29 22:51:41 CST, Dave Rolsky <autarch at urth.org> writes:
> If there's any takers for #1, here's a reasonably complete list of
> "interesting" Perl date/time modules along with my comments about them:
>
> - Time::Piece (and Time::Seconds) - nice interface, nice simply date math,
> but only handles epoch times, which is a drag. See also my
> Time::Piece::MySQL module, which adds some mysql-specific bits. Similar
> modules for other DBs/external resources can be added just as easily.
Never used this one.
> - Class::Date & Date::Handler - kind of like Time::Piece on steroids, but
> I don't see why they can't all be integrated.
Never used these either.
> - Date::Manip - ridiculously large amount of code. crapulous interface.
> freaking brilliant parsing code that handles things like "2nd day after
> next Tuesday" or "the first day of the last week of the next month". Also
> has some internationalization bits for parsing, which is doubly slick. If
> this thing could return a Time::Piece object (and T::P handled times
> outside of the epoch), I'd be in heaven.
IME, it's by far the most complete and most versatile Date module.
Unfortunately, it has one drawback - it's SLOW.
> - Date::Calc - lots of nice date math functions. Stupid interface
> (Function_Names_Like_This). Written in C so presumably its fast.
Interface is easy to get used to. I wrote an extension to Date::Calc for
handling holiday data obtained from a database (instead of files), plus
handling other things we needed. I evaluated Date::Calc, Date::Manip, and
at least one other (can't remember) and went with Date::Calc because we
needed the speed (it's MUCH faster than Date::Manip).
> -- Date::Calc::Object - OO interface over Date::Calc. Interesting. Also
> has Date delta objects. Cool! Works with Date::Calc functions, which
> have stupid names, but making a wrapper for that wouldn't be too hard.
Looked at it some. I haven't used it as it didn't fit anything I needed
any better than Date::Calc.
> -- Date::Calendar - seems quite useful
Yep. Date::Calendar::Profiles is very nice as well (but missing alot of
data). By the way, does anybody know of a programmatic way of calculating
the equinoxes and/or chinese new year?
> - Date::Parse - lightweight so it's a good choice if you know that you'll
> never exceed its limitations. But those limitations are pretty big cause
> it doesn't do much.
Haven't used.
> - Date::Format - basically strftime in Perl. Time::Piece provides the
> same thing.
Nice for what it does.
[snip]
Haven't used any of the other specific ones Dave listed.
--------------------------------------------------
Minneapolis Perl Mongers mailing list
To unsubscribe, send mail to majordomo at pm.org
with "unsubscribe mpls" in the body of the message.
More information about the Mpls-pm
mailing list