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,6ea0a5c35bbeef5e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-03-13 18:08:04 PST Path: supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.maxwell.syr.edu!sjc-peer.news.verio.net!news.verio.net!iad-read.news.verio.net.POSTED!not-for-mail Message-ID: <3AAED192.1479@li.net> From: Vincent Marciante X-Mailer: Mozilla 3.0 (OS/2; I) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: calander package References: <98jo6d$vu4$1@slb3.atl.mindspring.net> <98lis0$56j$1@nh.pace.co.uk> <%%tr6.2979$54.3285@www.newsranger.com> <98ltmj$90q$1@nh.pace.co.uk> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Tue, 13 Mar 2001 21:04:02 -0500 NNTP-Posting-Host: 168.191.118.137 X-Complaints-To: abuse@verio.net X-Trace: iad-read.news.verio.net 984535616 168.191.118.137 (Wed, 14 Mar 2001 02:06:56 GMT) NNTP-Posting-Date: Wed, 14 Mar 2001 02:06:56 GMT Organization: Verio Xref: supernews.google.com comp.lang.ada:5705 Date: 2001-03-13T21:04:02-05:00 List-Id: Randy Brukardt wrote: > > > I was thinking about proposing something on this line to the ARG for > standardization, but it unclear that the ARG is interested in > (semi-)standardizing these sorts of packages. (It seems to run about > 50-50 within the membership as to whether time should be spent on it. > The objections mostly are that there are more important things to work > on.) > > Randy Brukardt. The original Booch.Calendar_Utilities could be considered. http://www.adapower.com/original_booch/ Its spec follows. Vinny -- Original Booch Components (Ada 95 elaboration version) -- Copyright (C) 2000 Grady Booch, provided WITHOUT ANY WARRANTY. -- Further license details should appear at the end of this file. with Calendar; package Booch.Calendar_Utilities is pragma Elaborate_Body; type Year is new Calendar.Year_Number; type Month is range 1 .. 12; type Day is range 1 .. 31; type Hour is range 0 .. 23; type Minute is range 0 .. 59; type Second is range 0 .. 59; type Millisecond is range 0 .. 999; type Time is record The_Year : Year; The_Month : Month; The_Day : Day; The_Hour : Hour; The_Minute : Minute; The_Second : Second; The_Millisecond : Millisecond; end record; type Interval is record Elapsed_Days : Natural; Elapsed_Hours : Hour; Elapsed_Minutes : Minute; Elapsed_Seconds : Second; Elapsed_Milliseconds : Millisecond; end record; type Year_Day is range 1 .. 366; type Month_Name is (January, February, March, April, May, June, July, August, September, October, November, December); type Day_Name is (Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday); type Period is (Am, Pm); type Time_Format is (Full, -- 01:21:06:30 PM Military); -- 13:21:06:30 type Date_Format is (Full, -- FEBRUARY 27, 1955 Month_Day_Year); -- 02/27/55 function Is_Leap_Year (The_Year : in Year) return Boolean; function Days_In (The_Year : in Year) return Year_Day; function Days_In (The_Month : in Month; The_Year : in Year) return Day; function Month_Of (The_Month : in Month) return Month_Name; function Month_Of (The_Month : in Month_Name) return Month; function Day_Of (The_Year : in Year; The_Day : in Year_Day) return Day_Name; function Day_Of (The_Time : in Time) return Year_Day; function Time_Of (The_Year : in Year; The_Day : in Year_Day) return Time; function Period_Of (The_Time : in Time) return Period; function Time_Of (The_Time : in Time) return Calendar.Time; function Time_Of (The_Time : in Calendar.Time) return Time; function Time_Image_Of (The_Time : in Time; Time_Form : in Time_Format := Full) return String; function Date_Image_Of (The_Time : in Time; Date_Form : in Date_Format := Full) return String; function Value_Of (The_Date : in String; The_Time : in String; Date_Form : in Date_Format := Full; Time_Form : in Time_Format := Full) return Time; function Duration_Of (The_Interval : in Interval) return Duration; function Interval_Of (The_Duration : in Duration) return Interval; function Image_Of (The_Interval : in Interval) return String; function Value_Of (The_Interval : in String) return Interval; Lexical_Error : exception; end Booch.Calendar_Utilities; -- Original Booch Components (Ada 95 elaboration version) -- -- Copyright (C) 2000 Grady Booch -- -- This is free software; you can redistribute it and/or modify it under -- terms of the GNU General Public License as published by the Free Software -- Foundation; either version 2, or (at your option) any later version. -- This software is distributed in the hope that it will be useful, but -- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- for more details. Free Software Foundation, 59 Temple Place - Suite -- 330, Boston, MA 02111-1307, USA. -- -- As a special exception, if other files instantiate generics from this -- unit, or you link this unit with other files to produce an executable, -- this unit does not by itself cause the resulting executable to be -- covered by the GNU General Public License. This exception does not -- however invalidate any other reasons why the executable file might be -- covered by the GNU General Public License. -- -- The book _SOFTWARE_COMPONENTS_WITH_Ada__Structures,_Tools,_and_Subsystems_ -- ISBN 0-8053-0609-9 by Grady Booch, fully describes the design and usage -- of this software. -- -- The Ada 83 version of the components is the exact version described in -- the book mentioned above. The Ada 95 elaboration version differs only in -- that each component unit is a child of a root package named "Booch" and -- each package declaration includes the most appropriate elaboration control -- pragma. In addition, the Ada 95 child iteration version eliminates the -- distinct iterator and noniterator forms for components that had them and -- instead makes the associated "Iterate" procedures available as children of -- those components. More enhanced versions may be produced in the future. -- -- The Original Booch Components are actively maintained and enhanced -- by Vincent Marciante and Samuel T. Harris and may be found at the -- AdaPower web site (http://www.adapower.com) provided by David Botton.