Author:halw

Date:2008-11-20T21:45:06.000000Z


git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@108 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
halw
2008-11-20 21:45:06 +00:00
parent cfec89b0dc
commit 0414656325
2 changed files with 33 additions and 4 deletions

View File

@@ -104,12 +104,11 @@ It is possible to change reference of <eiffel>time</eiffel> and <eiffel>date</ei
====Operations====
Addition of hours, minutes and seconds are available directly in the class.It can be important to use the versions from <eiffel>DATE_TIME</eiffel>, because adding time to a <eiffel>DATE_TIME</eiffel> may have a consequence on the date.
Add hours, minutes, and seconds with features <eiffel>hour_add</eiffel>, <eiffel>minute_add</eiffel>, and <eiffel>second_add</eiffel>.
{{caution|Using the addition features from <eiffel>TIME</eiffel> on the <eiffel>time</eiffel> attribute is also possible but the date will not be modified in the case <eiffel>time</eiffel> makes a cycle. So, for example use:<eiffel> my_date_time.hour_add (more_hours)</eiffel> instead of: <eiffel>my_date_time.time.hour_add (more_hours)</eiffel> }}
{{caution|Using the addition features from <eiffel>TIME</eiffel> on the <eiffel>time</eiffel> attribute is also possible but the date will not be modified in the case <eiffel>time</eiffel> makes a cycle. }}
<eiffel>day_add</eiffel> is also available directly since it is frequently used within the class.
<eiffel>day_add</eiffel> is available on instances of <eiffel>DATE_TIME</eiffel> to add days.
Feature <eiffel>add</eiffel> (or <eiffel>+</eiffel>) takes an instance of <eiffel>DATE_TIME_DURATION</eiffel> as an argument. Internally, <eiffel>add</eiffel> first adds the the date duration, and then the time duration.