Type Summary
|
Other Items:
|
|
function Day_of_Week (Date : in Time) return Day_Name;
|
|
Returns the day of the week for Time. This is based on the Year, Month,
and Day values of Time.
|
|
|
|
|
|
|
|
|
|
|
|
|
function Time_Of (Year : in Year_Number;
Month : in Month_Number;
Day : in Day_Number;
Hour : in Hour_Number;
Minute : in Minute_Number;
Second : in Second_Number;
Sub_Second : in Second_Duration := 0.0;
Leap_Second : in Boolean := False;
Time_Offset : in Time_Zones.Time_Offset := 0)
return Time;
|
Returns a Time built from the date and time values, relative to the
specified timezone. Time_Error is raised if Leap_Second
is True, and Hour, Minute, and Second are not appropriate for a
Leap_Second.
AARM Note:
A leap second always occurs as midnight UTC, and is 23:59:60 UTC in ISO
notation. So, if the time zone is UTC, if any of Hour /= 23, Minute /=
59, or Second /= 59, then Time_Error should be raised.
However, we do not say that, because other time zones will have
different values for them.
|
|
function Time_Of (Year : in Year_Number;
Month : in Month_Number;
Day : in Day_Number;
Seconds : in Day_Duration;
Leap_Second : in Boolean := False;
Time_Offset : in Time_Zones.Time_Offset := 0)
return Time;
|
|
Returns a Time built from the date and time values, relative to the
specified time zone offset. Time_Error is raised if
Leap_Second is True, and Seconds is not appropriate for a Leap_Second.
|
|
|
|
function Image (Date : Time;
Include_Time_Fraction : Boolean := False) return String;
|
Returns a string form of the Date. 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', if needed. Year is a 4
digit value. If Include_Time_Fraction is True, and Sub_Seconds*100 is
suffixed to the string as a 2 digit value following a '.'.
AARM Note:
The Image provides a string in ISO 8601 format, the international
standard time format. Alternative representations allowed in ISO 8601
are not supported here.
ISO 8601 allows 24:00:00 for midnight; and a seconds value of 60 for
leap seconds. These are not allowed here (the routines mentioned above
cannot produce those results).
|
|
function Value (Date : String) return Time;
|
|
Returns a Time value for the image given as Date.
Constraint_Error is raised if the string is not
formatted as described for Image, or the function cannot interpret the
given string as a Time value.
|
|
function Image (Elapsed_Time : Duration;
Include_Time_Fraction : Boolean := False) return String;
|
Returns a string form of the The format is "Hours: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 '.'.
AARM Note:
This cannot be implemented (directly) by calling
Ada.Calendar.Formatting.Split, since it may be out of the range of
Day_Duration, and thus the number of hours may be out of the range of
Hour_Number.
|
|
function Value (Elapsed_Time : String) return Duration;
|
|
Returns a Duration value for the image given as Elapsed_Time.
Constraint_Error is raised if the string is not
formatted as described for Image, or the function cannot interpret the
given string as a Duration value.
|
|