[DB-SIG] Standardized Date-Time class

Mike Meyer mwm@contessa.phone.net
Wed, 10 Dec 1997 19:49:05 PST


> From: Hannu Krosing <hannu@trust.ee>
> If you calculate loan interest for a loan with annual interest of 12 percent, using
> the 30/360 or 30/365 day year then  the difference between jan.31 and mar.31 is 60
> days , when under some other circumstances it can be something completely different.

If you're saying they ignore the passage of actual time in favor of
some financial fiction, I think the favor should be returned, and the
built-in date/time type should ignore them. Jan 31 + 60 days should be
Mar 31. or April 1, depending on whether or not there's a February
29th. Or do we need a "financial" calendar system as well?

Hmm - we've got inheritance. Possibly this kind of thing can be done
in a subclass?

> >  > >  6. Handle all dates in the Gregorian calendar.  (e.g. there should
> > > >     not be problems storing dates from the 18th or 21st centuries.)
> > >         As I said above, supporting non-Gregorian calendars may be made =
> > > optional, but the Gregorian module should be loaded with the TimeModule, =
> > > and therefore support of arbitrary Gregorian dates should be feasible.
> >
> > Is it going to be Gregorian all the way back, or is it going to
> > convert to Julian at some point in the past? That conversion is recent
> > enough to effect events of historical interest, not having happened
> > until this century in some countries.
> 
> Are'nt the two actually the same until the Gregorian split?

No. Days were added to the calendar to adjust them at the time of the
split. So we see George Washington's date of birth reported as "Feb.
22 [Feb. 11, old style], 1732". Further, different countries changed
over on different days, from Roman Catholic states in 1582 to Greece
in 1932.

	<mike



_______________
DB-SIG  - SIG on Tabular Databases in Python

send messages to: db-sig@python.org
administrivia to: db-sig-request@python.org
_______________