In perl.datetime, you wrote:
>IMHO, Date:: modules should predominantly deal with dates, i.e.,
>years, months, days, weeks, days of week, all that stuff.
>Time:: modules should predominantly deal with time, i.e.,
>hours, minutes and seconds.
>Of course there are border cases, for instance modules that
>deal with seconds since the epoch for date calculations.
>Maybe there should be a "DateTime::" namespace for modules
>that deal with both.

Nooooooo!

I think that would cause more confusion.

The confusion between Date/Time stems from the overlap space... so why
not just say that "anything that deals with units of a day or greater
goes in Date, anything that NEVER deals with days or greater goes in
Time" ... and define "deals with" as "accepts parameters, or returns
values, which represent those units" (the black box approach -- doesn't
matter what the module does internally).

Hence a module with a method which accepted seconds-since-epoch and 
returned a Frobnitzian calendar day would go into Date.  On the other 
hand, a module which accepted seconds-since-Unix-epoch and returned
seconds-since-VMS-epoch would go into Time.

K.

-- 
Kirrily 'Skud' Robert - [EMAIL PROTECTED] - http://infotrope.net/
"Ultimately thread drift is limited by how far you can drift from the topic
of sex.  Every thread ends up there eventually, more so in here than many
other places."  -- Joe Thompson in a.s.r

Reply via email to