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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7dadb26e573572d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-08 11:22:42 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news-out.visi.com!petbe.visi.com!news.tele.dk!news.tele.dk!small.news.tele.dk!fr.ip.ndsoftware.net!teaser.fr!wanadoo.fr!not-for-mail From: Pascal Obry Newsgroups: comp.lang.ada Subject: Re: ada calendar Date: 08 Dec 2003 20:22:38 +0100 Organization: Home - http://perso.wanadoo.fr/pascal.obry Message-ID: References: <4948f537.0312060753.6b03e2ef@posting.google.com> NNTP-Posting-Host: avelizy-103-1-6-157.w81-48.abo.wanadoo.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news-reader1.wanadoo.fr 1070911361 30811 81.48.101.157 (8 Dec 2003 19:22:41 GMT) X-Complaints-To: abuse@wanadoo.fr NNTP-Posting-Date: 8 Dec 2003 19:22:41 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.95 Xref: archiver1.google.com comp.lang.ada:3233 Date: 2003-12-08T19:22:41+00:00 List-Id: Marius Amado Alves writes: > You can do it with Ada.Calendar: > > Your_Function (Time_Of > (Year_Number'Value (S (7 .. 10)), > Month_Number'Value (S (4 .. 5)), > Day_Number'Value (S (1 .. 2)))); > > where S is your string containing "27/06/2003" or similar. There is no guarantee that S start to 1. It should be using S'First as offset to compute all slices. Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://perso.wanadoo.fr/pascal.obry --| "The best way to travel is by means of imagination" --| --| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595