On Wed, Aug 11, 2004 at 12:39:36PM +0100, Richard Jones wrote:
> On Wed, Aug 11, 2004 at 01:26:14PM +0200, Bardur Arantsson wrote:
> > Another issue is that of deltas: In the real world, the
> > deltas +1d and +86400s are actually NOT
> > the same because of things like leap seconds, but the
> > GregorianDate module presents them as being the same. Do
> > you see what I mean?
> The period between the sun coming up one day and the sun coming up the
> next day is what I'm talking about. Doesn't matter if that is 86,400
> seconds, or 86,401 seconds, or if the earth has a dramatic change in
> its rotation period.
Ok, fair enough. Looking over the interface I can now see
that you commented out all the delta_XX functions which
had anything to do with hours, seconds, etc. As long as
there is no way of actually running into issues like the
86400 second vs. 1 day one, then I'd say the module is
pretty sound (and since date and business week type things
do crop up quite a lot in "business" apps, I wouldn't
think it's too much of a stretch to include it in ExtLib).
> Representing times is considerably more difficult -
> something I don't really want to get into.
Neither do I. :) I just generally think that if one is
going to do something like this, then it better be Done
> However, I'm pretty sure that representing times as
> floats is also naive.
<AOL>Me too</AOL>. I should think a 128bit fixed-point
number with nanosecond precision would be better. They
doesn't have scaling and precision issues like floats do
and provide plenty of room for future dates/times.
Those issues aside, you basically just need an unambiguous
representation which "(fractional) seconds since the epoch
in UTC" is. However, I shouldn't like to be the one
implementing all the timezone conversion, leap second,
leap year, ... stuff.
Anyway, if nobody is interested in writing the code it's
all rather moot anyway...
>  Well, actually that's not strictly true - there are a few
> inessential functions which deal with hours, but they are a hangover
> from Date::Calc, and should be removed.
- Bite my shiny metal ass.
- It doesn't look so shiny to me.
- Shinier than yours, meatbag.
Bender and Fry | Futurama