From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ee78aab9bfd2fe2a X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news4.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Wilhelm Spickermann Newsgroups: comp.lang.ada Subject: Re: Inspiration for a better calendar package? Date: Mon, 15 Dec 2008 08:45:17 +0100 Message-ID: <6qmg8dFd8kd2U1@mid.individual.net> References: <873agxd6i1.fsf@nbi.dk> <12gqldae49yoe$.1sf2zlz1fthvh.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8Bit X-Trace: individual.net GVN+ahM5EEydZLCAiHzryQNGckqyMfZObjVTw9wO9rGzKdupRK Cancel-Lock: sha1:elDj23bMpzS8+zTpO1k96v8xO+k= Xref: g2news1.google.com comp.lang.ada:2987 Date: 2008-12-15T08:45:17+01:00 List-Id: 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 :-) )