--- ais/ai-00351.txt 2005/02/08 07:12:37 1.13 +++ ais/ai-00351.txt 2005/06/16 23:47:33 1.14 @@ -1,4 +1,4 @@ -!standard 9.06(11) 04-12-05 AI95-00351/07 +!standard 9.06(11) 05-06-06 AI95-00351/08 !standard 9.06(24) !standard 9.06.01(01) !standard 1.2(5) @@ -100,11 +100,8 @@ Leap_Seconds : out Leap_Seconds_Count); function "+" (Left : Time; Right : Day_Count) return Time; - function "+" (Left : Day_Count; Right : Time) return Time; - function "-" (Left : Time; Right : Day_Count) return Time; - function "-" (Left, Right : Time) return Day_Count; end Ada.Calendar.Arithmetic; @@ -319,7 +316,8 @@ Second : Second_Number := 0; Sub_Second : Second_Duration := 0.0) return Day_Duration; - Returns a Day_Duration value for the Hour:Minute:Second.Sub_Second. + Returns a Day_Duration value for the combination of the given + Hour, Minute, Second, and Sub_Second. This value can be used in Calendar.Time_Of as well as the argument to Calendar."+" and Calendar."-". @@ -328,7 +326,8 @@ Minute : out Minute_Number; Second : out Second_Number; Sub_Second : out Second_Duration); - Splits Seconds into Hour:Minute:Second.Sub_Second. + Splits Seconds into Hour, Minute, Second and Sub_Second in such a way that + the resulting values all belong to their respective subtypes. procedure Split (Date : in Time; Time_Zone : in Time_Zones.Time_Offset := 0; @@ -404,10 +403,10 @@ Returns a string form of the Date relative to the given Time_Zone. The format is "Year-Month-Day Hour:Minute:Second", where each value other than Year is a 2-digit form of the value of the functions - defined in Calendar and Calendar.Formatting, including a leading '0', + defined in Calendar and Calendar.Formatting, including a leading zero, if needed. Year is a 4-digit value. - If Include_Time_Fraction is True, Sub_Seconds*100 is suffixed to the - string as a 2-digit value following a '.'. + If Include_Time_Fraction is True, the integer part of Sub_Seconds*100 is + suffixed to the string as a 2-digit value following a point. AARM Note: The Image provides a string in ISO 8601 format, the international standard time format. Alternative representations allowed @@ -428,12 +427,12 @@ Include_Time_Fraction : Boolean := False) return String; Returns a string form of the Elapsed_Time. The format is "Hour:Minute:Second", where each value - is a 2-digit form of the value, including a leading '0', if needed. - If Include_Time_Fraction is True, Sub_Seconds*100 is suffixed to the - string as a 2-digit value following a '.'. + is a 2-digit form of the value, including a leading zero, if needed. + If Include_Time_Fraction is True, the integer part of Sub_Seconds*100 is + suffixed to the string as a 2-digit value following a point. If Elapsed_Time < 0.0, the result is Image (abs Elapsed_Time, - Include_Time_Fraction) prefixed with "-". If Abs Elapsed_Time represents - 100 hours or more, the result is implementation-defined. + Include_Time_Fraction) prefixed with a minus sign. If Abs Elapsed_Time + represents 100 hours or more, the result is implementation-defined. AARM Notes: This cannot be implemented (directly) by calling Ada.Calendar.Formatting.Split, since it may be out of the range of @@ -569,11 +568,11 @@ !corrigendum 1.2(5) @dinsa -ISO/IEC 6429:1992, @i<Information technology - Control functions for coded +ISO/IEC 6429:1992, @i<Information technology @emdash Control functions for coded graphic character sets.> @dinst -ISO 8601:2004, @i<Data elements and interchange formats - Information -interchange - Representation of dates and times>. +ISO 8601:2004, @i<Data elements and interchange formats @emdash Information +interchange @emdash Representation of dates and times>. !corrigendum 9.06(11) @@ -603,7 +602,7 @@ a given value of the type Time, as appropriate to an implementation-defined time zone; the procedure Split returns all four corresponding values. Conversely, the function Time_Of combines a year number, a month number, a day -number, and a duration, into a value of type Time. The operators "+" and "-" +number, and a duration, into a value of type Time. The operators "+" and "@endash" for addition and subtraction of times and durations, and the relational operators for times, have the conventional meaning. @@ -645,11 +644,8 @@ Leap_Seconds : @b<out> Leap_Seconds_Count); @b<function> "+" (Left : Time; Right : Day_Count) @b<return> Time; - @b<function> "+" (Left : Day_Count; Right : Time) @b<return> Time; - @b<function> "-" (Left : Time; Right : Day_Count) @b<return> Time; - @b<function> "-" (Left, Right : Time) @b<return> Day_Count; @b<end> Ada.Calendar.Arithmetic; @@ -780,7 +776,7 @@ remainder seconds of difference, and Leap_Seconds is the number of leap seconds. If Left < Right, then Seconds <= 0.0, Days <= 0, and Leap_Seconds <= 0. Otherwise, all values are non-negative. For the returned values, if Days = -0, then Seconds + Duration(Leap_Seconds) = Calendar."-" (Left, Right).> +0, then Seconds + Duration(Leap_Seconds) = Calendar."@endash" (Left, Right).> @xcode<@b<function> "+" (Left : Time; Right : Day_Count) @b<return> Time; @b<function> "+" (Left : Day_Count; Right : Time) @b<return> Time;> @@ -828,16 +824,18 @@ Second : Second_Number := 0; Sub_Second : Second_Duration := 0.0) @b<return> Day_Duration;> -@xindent<Returns a Day_Duration value for the Hour:Minute:Second.Sub_Second. +@xindent<Returns a Day_Duration value for the combination of the given +Hour, Minute, Second, and Sub_Second. This value can be used in Calendar.Time_Of as well as the argument to -Calendar."+" and Calendar."-".> +Calendar."+" and Calendar."@endash".> @xcode<@b<procedure> Split (Seconds : @b<in> Day_Duration; Hour : @b<out> Hour_Number; Minute : @b<out> Minute_Number; Second : @b<out> Second_Number; Sub_Second : @b<out> Second_Duration);> -@xindent<Splits Seconds into Hour:Minute:Second.Sub_Second.> +@xindent<Splits Seconds into Hour, Minute, Second and Sub_Second in such a way +that the resulting values all belong to their respective subtypes.> @xcode<@b<procedure> Split (Date : @b<in> Time; Time_Zone : @b<in> Time_Zones.Time_Offset := 0; @@ -907,12 +905,12 @@ @xindent<Returns a string form of the Date relative to the given Time_Zone. The format is "Year-Month-Day Hour:Minute:Second", where each value other than Year is a 2-digit form of the value of the functions -defined in Calendar and Calendar.Formatting, including a leading '0', +defined in Calendar and Calendar.Formatting, including a leading zero, if needed. Year is a 4-digit value. -If Include_Time_Fraction is True, Sub_Seconds*100 is suffixed to the -string as a 2-digit value following a '.'.> +If Include_Time_Fraction is True, the integer part of Sub_Seconds*100 is +suffixed to the string as a 2-digit value following a point.> -@xcode<@b<function> Value (Date : String) +@xcode<@b<function> Value (Date : String; Time_Zone : Time_Zones.Time_Offset := 0) @b<return> Time;> @xindent<Returns a Time value for the image given as Date, relative to the given time zone. Constraint_Error is raised if the string is not formatted as @@ -923,12 +921,12 @@ Include_Time_Fraction : Boolean := False) @b<return> String;> @xindent<Returns a string form of the Elapsed_Time. The format is "Hour:Minute:Second", where each value -is a 2-digit form of the value, including a leading '0', if needed. -If Include_Time_Fraction is True, Sub_Seconds*100 is suffixed to the -string as a 2-digit value following a '.'. +is a 2-digit form of the value, including a leading zero, if needed. +If Include_Time_Fraction is True, the integer part of Sub_Seconds*100 is +suffixed to the string as a 2-digit value following a point. If Elapsed_Time < 0.0, the result is Image (@b<abs> Elapsed_Time, -Include_Time_Fraction) prefixed with "-". If @b<abs> Elapsed_Time represents -100 hours or more, the result is implementation-defined.> +Include_Time_Fraction) prefixed with a minus sign. If @b<abs> Elapsed_Time +represents 100 hours or more, the result is implementation-defined.> @xcode<@b<function> Value (Elapsed_Time : String) @b<return> Duration;> @xindent<Returns a Duration value for the image given as Elapsed_Time. @@ -945,16 +943,13 @@ @xindent<@s9<NOTES@hr -36 The time in the time zone known as Greenwich Mean Time (GMT) -is generally equivalent to UTC time.>> - -@xindent<@s9<37 The implementation-defined time zone of package Calendar +36 The implementation-defined time zone of package Calendar may, but need not, be the local time zone. UTC_Time_Offset always returns the difference relative to the implementation-defined time zone of package Calendar. If UTC_Time_Offset does not raise Unknown_Zone_Error, UTC time can be safely calculated (within the accuracy of the underlying time-base).>> -@xindent<@s9<38 Calling Split on the results of subtracting Duration(UTC_Time_Offset*60) +@xindent<@s9<37 Calling Split on the results of subtracting Duration(UTC_Time_Offset*60) from Clock provides the components (hours, minutes, and so on) of the UTC time. In the United States, for example, UTC_Time_Offset will generally be negative.>>

Questions? Ask the ACAA Technical Agent