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!fu-berlin.de!uni-berlin.de!not-for-mail From: "Nick Roberts" Newsgroups: comp.lang.ada Subject: Re: ADA.CALENDAR and midnight Date: Thu, 05 Aug 2004 12:19:20 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: news.uni-berlin.de YVhRVhz2rQibyc2YRmpbZAyfSnKrB5ycyjcqL6dLtb0wG3b8E= User-Agent: Opera M2/7.51 (Win32, build 3798) Xref: g2news1.google.com comp.lang.ada:2572 Date: 2004-08-05T12:19:20+01:00 List-Id: On Thu, 05 Aug 2004 20:00:52 +1000, Brian May wrote: > 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)? RM95 (TC1) 9.6 (25) states: If Time_Of is called with a seconds value of 86_400.0, the value returned is equal to the value of Time_Of for the next day with a seconds value of 0.0. The value returned by the function Seconds or through the Seconds parameter of the procedure Split is always less than 86_400.0. So I would say that an implementation which returns 86_400.0 is faulty. -- Nick Roberts