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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,3c620ebecf1e16d4 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!t-online.de!inka.de!rz.uni-karlsruhe.de!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail From: Frank Piron Newsgroups: comp.lang.ada Subject: Re: ADA.CALENDAR and midnight Date: Thu, 05 Aug 2004 13:06:15 +0200 Organization: 1&1 Internet AG Message-ID: References: NNTP-Posting-Host: p508b5809.dip0.t-ipconnect.de Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=iso-8859-15 Content-Transfer-Encoding: 8bit X-Trace: online.de 1091703989 20960 80.139.88.9 (5 Aug 2004 11:06:29 GMT) X-Complaints-To: abuse@einsundeins.com NNTP-Posting-Date: Thu, 5 Aug 2004 11:06:29 +0000 (UTC) User-Agent: Opera7.23/Win32 M2 build 3227 Xref: g2news1.google.com comp.lang.ada:2571 Date: 2004-08-05T13:06:15+02:00 List-Id: Hi, Thu, 05 Aug 2004 20:00:52 +1000 Brian May wrote: > Hello, > > According to documentation I have: > > subtype DAY_DURATION is DURATION range 0.0 .. 86_400.0; > > How is midnight meant to be represented? > > I would have assumed it would be 0.0, the next day, but preliminary > tests, unless I am confused, seem to show it is represented as > 86_400.0 (using gnat compiler for Windows)? The following quote from > the documentation would seem to imply I am correct; "SECONDS > indicating the number of seconds past midnight", but I am getting > behaviour which suggests otherwise. > > Why are both 0.0 and 86_400.0 defined to be legal values? Aren't they > both the same thing (but one day apart)? Any instance of type DAY_DURATION represents a timespan. "midnight" means a point in time (more precisely a discrite, infinite subset of all points in time). If you would take away 86_400.0 from DAY_DURATION then you would have a unique representation for every point in time p as: p = midnight + dd (dd a DAY_DURATION instance) on the one hand. But on the other hand the timespan of a full day could not be represented by an instance of DAY_DURATION. -- Crisis? What Crisis? ---------------------------------------------------- f_r_a_n_k_a_t_k_o_n_a_d_d_o_t_n_e_t