ABSTRACT
This paper discusses a temporal (time) model which extends an object-oriented application environment. The model, which originates from the relational database field, consists of three data types: Absolute, which represents specific fixed points in time; Duration, which represents lengths of time that are independent of any fixed point; and Interval, which represents lengths of time between two fixed points. The types have been embodied as a set of temporal classes in the Eiffel language. These classes allow absolute times, durations and intervals to be represented at various levels of granularity from seconds to years, and encapsulate various operations between the types. The operations take account of certain anomalies arising from, for example, leap years and the irregular lengths of months in the year. The paper begins with a discussion of the concept of time and the origins of the model. The temporal types and various anomalies are discussed, then the classes and their operations are described. Details of anomaly handling are given. Finally the usefulness and limitations of the classes are discussed and future enhancements identified.
|