comp.lang.ada
 help / color / mirror / Atom feed
From: Thomas Wolf <t_wolf@angelfire.com>
Subject: Re: ada calendar
Date: Wed, 10 Dec 2003 13:27:24 +0100
Date: 2003-12-10T13:27:24+01:00	[thread overview]
Message-ID: <MPG.1a412f88b61dac9c989681@news.ip-plus.ch> (raw)
In-Reply-To: NOWdnT6JV8DAS0uiRVn-iw@comcast.com

rieachus@comcast.net wrote:
> The latest version of the proposed additions for Ada 0Y can be found at:
> http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AIs/AI-00351.TXT?rev=1.2>

I see that this proposal includes some functionality for dealing with
leap seconds. It proposes (among other things)

procedure Difference (Left, Right : Time;
                      Days : out Day_Count;
                      Seconds : out Duration;
		      Leap_Seconds : out Leap_Seconds_Count);
    Returns the difference between Left and Right.
    Days is the number of days of difference, Seconds is the
    remainder seconds of difference, and Leap_Seconds is the number
    of leap seconds.
    If Left < Right, then Seconds <= 0.0, Days <= 0, and
    Leap_Seconds <= 0.
    Otherwise, all values are non-negative.

How is this supposed to work if Left or both Left and Right are in
the future? You cannot predict when the next leap second will be
inserted -- it depends on the irregularities of Earth's rotation,
and IERS inserts a leap second whenever necessary (well, at the end
of June or December) to keep the difference between UT1 und UTC <
0.9 sec.

Also implementing this for past dates needs a look-up table.

So, what is the number of leap seconds between 2004-01-01, 00:00:00
and 2105-01-01 00:00:00? Executing the proposed subprogram now would
probably return Leap_Seconds = 0, but executing it in 20 years, it
would probably have to return a non-zero value. (Because by then,
IERS will most probably have inserted at least one additional leap
second.)

-- 
-----------------------------------------------------------------
Thomas Wolf                          e-mail: t_wolf@angelfire.com




  reply	other threads:[~2003-12-10 12:27 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-05 21:00 ada calendar shoko
2003-12-05 22:34 ` Stephen Leake
2003-12-06  0:11   ` Nick Roberts
2003-12-08  7:49     ` Reinert Korsnes
2003-12-09  7:40       ` tmoran
2003-12-09 15:59         ` Nick Roberts
2003-12-10  8:16           ` Robert I. Eachus
2003-12-10 12:27             ` Thomas Wolf [this message]
2003-12-18 19:03               ` Randy Brukardt
2003-12-05 22:55 ` tmoran
2003-12-06  0:01   ` Marius Amado Alves
2003-12-06  0:21     ` tmoran
2003-12-06 15:08       ` Marius Amado Alves
2003-12-06 16:10 ` David C. Hoos
  -- strict thread matches above, loose matches on Subject: below --
2003-12-06 15:53 shoko
2003-12-06 17:01 ` Marius Amado Alves
2003-12-08 19:22   ` Pascal Obry
2003-12-09  4:48     ` Nick Roberts
2003-12-09 13:23       ` Wes Groleau
2003-12-07  2:49 ` Jeffrey Carter
2003-12-07 12:36   ` Duncan Sands
replies disabled

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