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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: A few questions Date: Sat, 31 Oct 2015 17:25:18 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Injection-Date: Sun, 1 Nov 2015 00:23:08 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="caa759af2a9c666aec02942f6fe5abd6"; logging-data="25708"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18qtSUzQaep/1B10n2YWgncX+Ikd4RwMj0=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 In-Reply-To: X-Mozilla-News-Host: news://freenews.netfront.net Cancel-Lock: sha1:xRzQRgFMTLvMCL78adhAceasqDo= Xref: news.eternal-september.org comp.lang.ada:28154 Date: 2015-10-31T17:25:18-07:00 List-Id: On 10/31/2015 01:29 PM, Laurent wrote: > > I need a range of Dates. > > So is there an existing package which generates a range of Dates from .. to > ? > > PS: need this range of dates because the log files I want to read and extract > informations from are all named like this: vba-yyyymmdd.log where obviously > yyyymmdd is the date. The program generates a new file every date an stores > the communication it treated in it. > > I want to read this files and extract the messages which passed. Is more an > exercise than actually a need to do it. I'm not aware of any such pkg. On the other hand, I'm not sure you need it. Do you really need to store all the dates in the range? You could process the file for date D, then the file for date D + 1, ..., until you have processed all the desired files. Conceptually the idea of an operation function "+" (Left : in Dates.Object; Right : in Integer) return Dates.Object; makes sense; without knowing the details of the implementation of Dates.Object I have no idea how easy it would be. For Ada.Calendar.Time, one would simply add Right * Ada.Calendar.Day_Duration'Last. -- Jeff Carter "Monsieur Arthur King, who has the brain of a duck, you know." Monty Python & the Holy Grail 09