Page last modified 12:16, 29 May 2018 by villes

.minusHours() / .minusMinutes() / .minusSeconds()

    Table of contents

    Description of the method


    Description: .minus{Hours|Minutes|Seconds}() method reduces 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



    Context: HeaderType1 
    OCL: self.TimeStamp.minusHours(2) = self.Dt
    Description: The example rule compares the date & time of <TimeStamp> minus 2 hours to the date & time of <Dt>. If the date & time of <TimeStamp> after the reduced 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.


    The other snippet below however would not pass this check.