mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-06 14:52:03 +01:00
Author:halw
Date:2008-11-17T22:58:16.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@105 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -1,8 +1,17 @@
|
||||
[[Property:title|EiffelTime Tutorial]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|2c1bfedd-d515-cd6b-bd22-b06326fc98d8]]
|
||||
The library EiffelTime is built on three notions of time. The absolute notion (for example, what time is it? 3:45 p.m.) is used for events. It may be useful also to deal with an interval between two events (the meeting is between 3:45 p.m. and 6:00 p.m.). Finally EiffelTime has the notion of duration, which is the length of an interval (the meeting will take 2:15). The notion of absolute is linked with duration by the use of an origin.
|
||||
The library EiffelTime is designed to provide software components for the effective modeling and manipulation of ''dates and times''. EiffelTime is built on three notions of time.
|
||||
|
||||
* ''Absolutes'' are used to denote specific times. For example, an absolute time would be used to denote a particular event, like the starting time for a meeting, say 3:45 p.m.
|
||||
|
||||
* ''Intervals'' denote the interval between events. So, an interval could express the fact that the meeting will run from 3:45 p.m. until 6:00 p.m.
|
||||
|
||||
* ''Durations'' are used to represent the length of an interval. So, a duration can express the fact that the meeting lasts for 2 hours and 15 minutes.
|
||||
|
||||
As you read this documentation you will notice other concepts that are used in various classes. Here are some examples:
|
||||
* There is a concept of ''origin'' which allows absolute instances to have an anchor in time. The origin for an absolute time is 00:00:00, the earliest time of day. The origin for dates is January 1, 1600. The notion of origin is also used with certain date durations.
|
||||
* Durations can be in ''canonical'' or ''non-canonical'' form. Canonical form means that the values for components of the duration fall into the expected range for each component. So, for example a time duration with a value for minutes that is larger than 59 would be in non-canonical form.
|
||||
* Date durations can be ''relative'' or ''definite''. Definite date durations consist only of a number of days. Relative date durations can have values for a number of years and months. As you will see, comparison and arithmetic are affected by whether date durations are relative or definite.
|
||||
You will read more about these and other EiffelTime concepts in the detailed pages that follow.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user