.plusHours() / .plusMinutes() / .plusSeconds()
Table of contents
- 1. Description of the method
- 2.
- 3. Example
Description of the method
Description: | .plus{Hours|Minutes|Seconds}() method adds as many of hours or minutes or seconds as the integer in the parameter indicates. |
Available for: | ISO Date Time |
Parameters: | integer |
Return type: | ISO Date Time |
Example
Context: | HeaderType1 |
OCL: | self.TimeStamp.plusHours(2) = self.Dt |
Description: | The example rule compares the date & time of <TimeStamp> plus 2 hours to the date & time of <Dt>. If the date & time of <TimeStamp> after the additional hours equals the date & time of <Dt>, true will be returned. This works in the same way with minutes and seconds. |
The XML snippet below would pass this check.
<Header> |
The other snippet below however would not pass this check.
<Header> |