On Tue, 28 Jan 2003, Eugene van der Pijll wrote:

> On the other hand, I would like to be able to specify a date with a
> precision of less than a day. For example, the date "1815", or
> "july 1974". But I'll write my own module around DateTime that can
> handle these dates, if necessary.

You'll probably need to write your own module around DateTime.pm.  For
example, how do you handle adding 3 days to july 1974?  How about 31 days?

> I don't think time arithmetic (adding a couple of seconds to a certain
> time) should be done with floating point arithmetic. And calendar
> independence sounds like a good idea, but most applications will work
> with only one or two calendars, mostly the Gregorian one. An internal
> format based on the Gregorian calendar will prevent many conversions.

The internal format is Rata Die days, which can be converted to quite a
number of calendars using known algorithms.

> I do agree that calendaring shouldn't be the only purpose of DateTime. I
> don't think people who need attosecond would bother with a module that
> knows about time zones and Julian calendars. They would just use scalar
> values as seconds.

That's what I was thinking too.

> (Yes, I know Rich said microseconds. But I can imagine that kind of
> precisions being important. But you have to draw the line somewhere.)

I'll implement whatever is agreed upon (or better yet, apply patches),
since I for one can't think of anything I'm working on that needs
sub-second precision.


-dave

/*=======================
House Absolute Consulting
www.houseabsolute.com
=======================*/

Reply via email to