comp.lang.ada
 help / color / mirror / Atom feed
From: Wilhelm Spickermann <jwos.20.unbenutzbar@spamgourmet.com>
Subject: Re: Inspiration for a better calendar package?
Date: Mon, 15 Dec 2008 08:45:17 +0100
Date: 2008-12-15T08:45:17+01:00	[thread overview]
Message-ID: <6qmg8dFd8kd2U1@mid.individual.net> (raw)
In-Reply-To: 12gqldae49yoe$.1sf2zlz1fthvh.dlg@40tude.net

Dmitry A. Kazakov wrote:

> We just do not need political time otherwise than for
> formatted text output. It was silly for Ada 2005 to define time
> arithmetic in terms of political time. Especially because there
>  simply is no way to define such arithmetic. Since political
> time increment "+" is not a function of its arguments!

I'd propose using two kinds of time each with an own
arithmetic -- both of them being not political. 

The first one is a somehow physical time, which just counts every
second occuring in reality. The arithmetic for this one is
obvious and it should have a fine granularity. 

The second one is a wall clock time with the smallest unit being
a minute on the wall clock (thus having 59, 60 or 61 seconds
length). We can define an arithmetic here and it is used to
specify times related to human activities. This time is used to
store dates like "second monday after easter 2014 at 10:00 UTC"
or "every day at 12:00 UTC".

They should not allow mixed arithmetic and conversions bewteen
them are only possible as far as our knowledge of leap seconds
allows. (The leap second information of traditional Unix time
zone tables is unusable here, since they have no way of
specifying "unknown leap second".)

Additionally we should have time zone tables (without leap second
information) for political time (also needing the ability to
specify "unknown") to do conversions between "political text
representations of time" and "wall clock" time. It also contains
the completely predefined time zone "UTC".

Wilhelm
(wsp at-character spickermann-d.de)

PS: I've done this in Ada and it's working but it's yet
unpublished as I wanted to add a "clock source" to the time
stamps to handle synchronization problems -- but the years went
by...

PPS: wsp at-character spickermann-d.de for anyone interested
in the doc and source (GMGPL). 
(I'm just now moving to a different town - patience
required :-) )




  parent reply	other threads:[~2008-12-15  7:45 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-09  9:48 Inspiration for a better calendar package? Jacob Sparre Andersen
2008-12-09 10:15 ` Martin
2008-12-09 11:15   ` Dmitry A. Kazakov
2008-12-09 12:23     ` Martin
2008-12-09 15:16     ` JDECS
2008-12-09 15:44       ` Dmitry A. Kazakov
2008-12-09 17:04         ` JDECS
2008-12-15  7:45     ` Wilhelm Spickermann [this message]
2008-12-15  9:00       ` Dmitry A. Kazakov
2008-12-15 12:14         ` m.collado
2008-12-15 13:35           ` Dmitry A. Kazakov
2008-12-15 12:59         ` Wilhelm Spickermann
2008-12-15 13:46           ` Dmitry A. Kazakov
2008-12-16  0:47             ` sjw
2008-12-16  8:41               ` Dmitry A. Kazakov
2008-12-16 12:08                 ` Georg Bauhaus
2008-12-16  5:50             ` Wilhelm Spickermann
2008-12-16  8:50               ` Dmitry A. Kazakov
2008-12-16 12:23                 ` Georg Bauhaus
2008-12-17  6:16                 ` Wilhelm Spickermann
2008-12-17  8:29                   ` Dmitry A. Kazakov
2008-12-18 21:48                     ` Wilhelm Spickermann
2008-12-19  8:38                       ` Dmitry A. Kazakov
     [not found]           ` <9ImdneCohuZCNdvUnZ2dnUVZ_s3inZ2d@earthlink.com>
2008-12-16  5:13             ` Wilhelm Spickermann
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox