Package: Ada.Calendar.Time_Zones |
pragma License (Unrestricted);
!summary
This proposal adds a number of useful operations on Calendar.Time.
!problem
Calendar.Time is missing a number of operations commonly needed by applications.
First, there is no day-of-the-week function. It is often necessary to do a task on a particular day of the week (maintenance tasks in servers often are executed on Sundays when the load in minimal). Determining the day of the week for an Ada.Calendar.Time value is complex.
Second, determining the Hour:Minutes:Seconds representation of a time value is not trivial. This representation is needed for most output of time values. Similarly, values often need to be converted from Hours:Minutes:Seconds to time values.
Third, determining elapsed time is difficult if more than Duration'Last seconds have elapsed. This makes it more likely that Ada programs and libraries will fail if they run longer than anticipated. We've had profilers, loggers, and other components fail due to this shortcoming.
Fourth, displaying a time value is complex. This is needed not only in carefully formatted output, but also in logs and debugging code.
Finally, determining the UTC time is not possible. This is needed in many applications, such as internet communication. Since Ada does not define whether the time value represents UTC time, local time, or some other time, it isn't possible to use Calendar.Time in such applications.
Header | |||||||||||||
| |||||||||||||
| |||||||||||||
| |||||||||||||
| Generated on 2004-05-17 at 23:21:43 by AdaBrowse 4.0.1 using configuration file ab.cfg. |