comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Inspiration for a better calendar package?
Date: Wed, 17 Dec 2008 09:29:37 +0100
Date: 2008-12-17T09:29:34+01:00	[thread overview]
Message-ID: <1ev3f68cc0o42$.q4urn4fmkzhq.dlg@40tude.net> (raw)
In-Reply-To: 6qrjqgFebi5uU1@mid.individual.net

On Wed, 17 Dec 2008 07:16:48 +0100, Wilhelm Spickermann wrote:

> Dmitry A. Kazakov wrote:
> 
>> On Tue, 16 Dec 2008 06:50:40 +0100, Wilhelm Spickermann wrote:
>> 
>>> We need it, because someone in some plant has to specify a
>>> report to be printed on the 1-jul-2009 00:00 UTC. You cannot
>>> tell him, that he should wait a month from now until the IERS
>>> has published it's decision about leap second insertion at the
>>> end of next June.
>> 
>> No we don't. You cannot show a code that neither:
>> 
>> 1. Waits a fixed amount of time (delay until)
>> 
>> 2. Periodically polls actual time (delay delta, look at the
>> time).
>> 
>> There is simply no other way to determine if the report has to
>> be printed. In either case you don't need another "time."
>> 
>> It can be shown even simpler, printing is an action in real
>> time. You cannot present any physical action that happens in
>> political time.
>> 
>> Political fictions are incomputable. (:-))
> 
> Hmmm, now some secretary is trying to type in the dates of her
> next summer holiday and the computer tells her "Cannot do it,
> it's just a political fiction"? :-)
> 
> The program would first wait for about 3 months and then try to
> convert the "wall time" into a "time". If it is still impossible
> then, because the leap second second tables weren't updated, the
> program should give a warning and perhaps rescedule the check. 

You don't need wall time for this. That is the case no.2, I mentioned
above, programmed as follows:

delay 60.0 * 60.0 * 24.0 * 30.0 * 3; -- three physical months
if Month (Clock) = ... and Day (Clock) = ... then
   -- do things
else
   -- give warning
end if;

Where is any problem? Except that the algorithm is not good. It should be
(still the case 2):

   delay 60.0 * 60.0 * 24.0 * 25.0 * 3; -- come close enough to judge
   delay until Time_Of (Year =>..., Month =>..., Day =>...);
   -- do things
exception
   when Time_Error =>  -- watch your fingers lady!

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2008-12-17  8:29 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
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 [this message]
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