Front page | perl.datetime |
Postings from January 2003
Re: Picking up the ball
January 10, 2003 09:26
Re: Picking up the ball
Message ID: firstname.lastname@example.org
My thoughts about Dave Rolsky's mail (Thu, 9 Jan 2003 16:04:04 -0600 (CST))
I am interested in calendars. I have written Date::Convert::French_Rev
as a subclass of Mordechai Abzug's Date::Convert. My .profile executes a
script that uses all date modules: Maya, Roman, Discordian, Hebraic, Hobbit
and of course French_Rev
>2. Use the DateTime:: namespace. The email@example.com cabal doesn't
>like it? That's nice. Their buy-in is nice, but lack thereof does
>not prevent success. And in my experience, when presented with
>working code that's being used by a bunch of people, they may accept a
>namespace previously deemed unacceptable.
>Why a new top-level namespace? Well, what's the difference between
>Date:: and Time::? Not much, in most cases. It seems like the
>authors of these modules mostly picked one at random. There are a few
>exceptions, like Time::HiRes, but other than that, it's ridiculous.
>Moreover, the DateTime:: space is empty except for one module, and so
>it won't be cluttered by a million overlapping older modules. So it
>provides a nice psychological benefit of dropping the baggage.
There *is* a difference between Date:: and Time:: namespaces. Date::
modules do not consider durations less than one day. I did not choose
at random between Date:: and Time:: for my module, neither did Rich
Bowen (Discordian), Abigail (Maya), Leo Cacciari (Roman), Mordechai
Abzug (Julian and Hebraic) and Tom Braun (Date::Tolkien::Shire).
Also, there are significant differences for the underlying algorithms
between time calculations and date calculations. Date calculations
are much harder than time calculations: variable length months,
1-based numbers, etc.
>- DateTime::Algorithm - aka Rich's proposed Date::Algorithm. Includes
>- DateTime::Calendar - other calendars
>-- Must be interoperable with base datetime object! This means that we
>can convert back and forth between the two on demand.
Why not simply Calendar::Chinese and Calendar::Discordian? and by the way,
why not also Calendar::Leapyear and Calendar::Passover?
I would not mind renaming my module Calendar::French_Rev, but I think
the DateTime:: namespace is very inapproriate. Hours, minutes and
seconds are not taken in account in my module. Using the DateTime::
would induce users to think hhmmss are taken into account.
WYGIWYGAINGW = "What You Get Is What You're Given And It's
No Good Whining."
Archichancelier Mustrum Ridcully
(cité par Terry Prachett dans The Science of Discworld)