Boost logo

Boost :

From: George A. Heintzelman (georgeh_at_[hidden])
Date: 2002-04-17 14:44:57

> > >
> > > The civil calendar (in particular local time) is governed by the rules
> > > of legislators not physics.
> >
> > What Ross was proposing was a different way to partition the model behind
> > the library. As the core of such a model he proposes the purely physical
> > aspects which are *not* governed by legislators. This would deal with
> > things like points in time and distances (durations) between them. This is
> > Physics.

> > The calendar/time system does not provide the rules for physical
> > calculations. The distance between two physical points in time does not
> > depend on the calendar used. It depends somewhat on one's relative motion
> > and location, but I think we can ignore relativistic effects... :-)
> Well it does in GDTL. Think of the calendar and time systems as a set of policies that govern
> things like the mapping of the year-month-day and calculations. It's easy to implement if you have
> a time system that is based on 'physics' with no discontinuities, but this is not the reality for
> some.

I think Jeff is right here. I've imagined things like, having an
'instant' and an 'interval', both opaque types, and both of which can
be represented differently in different systems. 'Instant' isn't much
of a problem, I think. But interval is. For example, suppose you're in
the financial world. Even putting aside the issue of business days, if
I add 1 year to a particular instant, I want to get an instant which
represents the same wall-clock time on the same date next year. But
that interval, while a logical constant, is not a fixed number of
seconds, because of leap days and leap seconds. So I would not be able
to specify the desired interval as a generic opaque interval here. On
the other hand, if I do the same thing in an astronomical application,
I may want to add 365.25... days exactly, not caring about wall clock
time. Going back to the business world for another example, corporate
bonds accrue interest based on a 360-day year in which each month has
30 days. (In real terms, what that means is that if you buy a bond on
March 1st, you pay the seller 60 days interest even though it's only
been held (in non-leap-years) 59 days.) This wreaks havoc with figuring
the interval between two dates, for a computer (though it makes life
easier for typical humans ;).

In summary, these things are quite complicated outside the simple realm
of physics (okay, physics time is only simple in Newton-land, but I

Disclaimer: I haven't yet reviewed the GDTL myself. I want to do so,
since I work in the financial world and I want to make sure that this
library really does have the hooks I will need to get real business
calendar work done with it. Hopefully I will soon.

George Heintzelman

Boost list run by bdawes at, gregod at, cpdaniel at, john at