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.2 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, REPLYTO_WITHOUT_TO_CC,URI_HEX autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,6b85fea93f20b683 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-28 17:00:40 PST Path: archiver1.google.com!news2.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!oleane.net!oleane!freenix!enst!enst.fr!not-for-mail From: "Robert C. Leif" Newsgroups: comp.lang.ada Subject: RE: Timetype Date: Fri, 28 Jun 2002 16:51:44 -0700 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: avanie.enst.fr 1025308382 21864 137.194.161.2 (28 Jun 2002 23:53:02 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Fri, 28 Jun 2002 23:53:02 +0000 (UTC) Return-Path: X-Envelope-From: rleif@rleif.com X-Envelope-To: X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.3416 In-Reply-To: <3D1BF397.CC974E8E@attbi.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:26782 Date: 2002-06-28T16:51:44-07:00 From: Bob Leif To: Mark Biggar et al. XML data types includes the Gregorian Calendar. A package XML_IO.Calendar might be a solution.=20 XML Schema Part 2: Datatypes W3C Recommendation 02 May 2001 http://www.w3.org/TR/xmlschema-2/ 3.2 Primitive datatypes 3.2.1 string=20 3.2.2 boolean=20 3.2.3 decimal=20 3.2.4 float=20 3.2.5 double=20 3.2.6 duration=20 3.2.7 dateTime=20 3.2.8 time=20 3.2.9 date=20 3.2.10 gYearMonth=20 3.2.11 gYear=20 3.2.12 gMonthDay=20 3.2.13 gDay=20 3.2.14 gMonth=20 3.2.15 hexBinary=20 3.2.16 base64Binary=20 3.2.17 anyURI=20 3.2.18 QName=20 3.2.19 NOTATION The Sun DEVELOPER CONNECTION page shows Sun[tm] XML Datatypes Library in JAVA=20 Product Version: Preview Version 2.1 Release Date: April, 2002 System Requirements: JDK 1.3 Developer Name: Kohsuke Kawaguchi File Name: xsdlib.20020414.zip Size: 529K http://wwws.sun.com/software/xml/developers/xsdlib2/ I have not looked at this because I have no interest in JAVA. However. I am curious on how the XML enumerated types were mapped to JAVA. -----Original Message----- From: comp.lang.ada-admin@ada.eu.org [mailto:comp.lang.ada-admin@ada.eu.org] On Behalf Of Mark Biggar Sent: Thursday, June 27, 2002 10:26 PM To: comp.lang.ada@ada.eu.org Subject: Re: Timetype Bj=F6rn Lundin wrote: >=20 > Hello1 > Can anyone explain this to me? >=20 > cut from a-calend.ads > -- Declarations representing limits of allowed local time values. Note that > -- these do NOT constrain the possible stored values of time which may well > -- permit a larger range of times (this is explicitly allowed in Ada 95). >=20 > subtype Year_Number is Integer range 1901 .. 2099; >=20 > Does it mean that i can write an application dealing with historical dates > using the time_type? >=20 > It seems to me that a date like 05-Jun-1712 would cause > constraint_error. >=20 > Does anyone know the reason for this small range of years in > the timetype? Yes, this range allows using the expression (year mod 4 =3D 0) to test test for leap years. BTW taking your example date, which one do you mean? There is a 11 day difference between 05-jun-1712 in England and=20 its colonies and that date in most of Europe. England didn't convert to the Gregorian calendar until 1752, while most of Catholic europe converted in the 1500's. Russia didn't convert until the 1920's, so even Ada's year range can cause problems with historical dates. The standard writers didn't want to deal with the mess that the calendar=20 is in. -- Mark Biggar mark.a.biggar@attbi.com