This appendix, adapted from the Ada 95 Reference
Manual, Section 9.6, gives the
specifications for the package Ada.Calendar
.
PACKAGE Ada.Calendar IS TYPE Time IS PRIVATE; SUBTYPE Year_Number IS Integer RANGE 1901..2099; SUBTYPE Month_Number IS Integer RANGE 1..12; SUBTYPE Day_Number IS Integer RANGE 1..31; SUBTYPE Day_Duration IS Duration RANGE 0.0..86_400; FUNCTION Time_Of ( Year : Year_Number; Month : Month_Number; Day : Day_Number; Seconds : Day_Duration:=0.0) RETURN Time; FUNCTION Year ( Date : Time) RETURN Year_Number; FUNCTION Month ( Date : Time) RETURN Month_Number; FUNCTION Day ( Date : Time) RETURN Day_Number; FUNCTION Seconds ( Date : Time) RETURN Day_Duration; PROCEDURE Split ( Date : IN Time; Year : OUT Year_Number; Month : OUT Month_Number; Day : OUT Day_Number; Seconds : OUT Day_Duration); FUNCTION Clock RETURN Time; FUNCTION "<" ( Left, Right : Time) RETURN Boolean; FUNCTION "<=" ( Left, Right : Time) RETURN Boolean; FUNCTION ">" ( Left, Right : Time) RETURN Boolean; FUNCTION ">=" ( Left, Right : Time) RETURN Boolean; FUNCTION "+" ( Left : Time; Right : Duration) RETURN Time; FUNCTION "+" ( Left : Duration; Right : Time) RETURN Time; FUNCTION "-" ( Left : Time; Right : Duration) RETURN Time; FUNCTION "-" ( Left : Time; Right : Time) RETURN Duration; Time_Error : EXCEPTION; PRIVATE -- not specified by the language END Ada.Calendar;
Copyright © 1996 by Addison-Wesley Publishing Company, Inc.