Returns the absolute value of a given interval.
Arguments
Returns
The absolute value of a given Interval object.
Example
year2k as Time year2k = '2000-01-01 00:00:00' interval = year2k - 'now' display interval display abs(interval)
Adds a specified number of days to an Interval object.
Arguments
Returns
An Interval object resulting from adding the specified number of days to the given Interval object.
Example
holidays as Interval holidays = '15d20h00m' updatedHolidays as Interval updatedHolidays = addDays(holidays, i : 10) display "original holidays: " + holidays + "\n\n updated holidays: " + updatedHolidays
Adds a specified number of hours to an Interval object.
Arguments
Returns
An Interval object resulting from adding the specified number of hours to the given Interval object.
Example
deliveryTime as Interval newDeliveryTime as Interval deliveryTime = '1d00h00m' newDeliveryTime = addHours(deliveryTime, i : 12) display "original deliveryTime: " + deliveryTime + "\n\n new deliveryTime: " + newDeliveryTime
Adds a specified number of microseconds to an Interval object.
Arguments
Returns
An Interval object resulting from adding the specified number of microseconds to the given Interval object.
Example
retry as Interval retry = '1m30.600s' largerRetry as Interval largerRetry = addMicroSeconds(retry, i : 222) display "old retry: " + retry + "\n\nnew retry: " + largerRetry
Adds a specified number of minutes to an Interval object.
Arguments
Returns
An Interval object resulting from adding the specified number of minutes to the given Interval object.
Example
breakTime as Interval breakTime = '1h20m00s' newBreakTime as Interval newBreakTime = addMinutes(breakTime, i : 25) display "old break-time: " +breakTime + "\n\n new break-time: "+ newBreakTime
Adds a specified number of months to an Interval object.
Arguments
Returns
An Interval object resulting from adding the specified number of months to the given Interval object.
Example
fishingSeason as Interval fishingSeason = '1M20d' newFishingSeason as Interval newFishingSeason = addMonths(fishingSeason, i : 1) display "original fishingSeason: " + fishingSeason + "\n\nnew fishingSeason: " + newFishingSeason
Adds a specified number of years to an Interval object.
Arguments
Returns
The Interval object resulting from adding the specified number of years to the given Interval.
Example
licensePeriod as Interval licensePeriod = '1Y6M' newLicensePeriod as Interval newLicensePeriod = addYears(licensePeriod, i : 1) display "original license period: "+ licensePeriod + "\n\nnew license period: " + newLicensePeriod
Returns a String representation of the given interval. This String representation is based on the current locale.
Arguments
Returns
A String representation of the given Interval based on the current locale.
Example
interval as Interval interval = '2Y6M15d12h30m30s' display format(interval)
Returns the Int value of an Interval objects. This value represents the number of seconds in the interval.
Arguments
Returns
An Int representing the number of seconds in the given interval.
Example
display intValue('1h30m20s')
Returns the greater of two Interval objects.
Arguments
Returns
The greater of the two Interval objects.
Example
display max('1h20m', b : '1h35m')
Returns the smaller of two Interval objects.
Arguments
Returns
The smaller of the two Interval objects.
Example
display min('1h20m', b : '1h35m')
Causes the current BP-method to sleep for the specified number of time. Note that you cannot sleep past the current timeout. While the method is sleeping the timeout period is still running, therefore the sleep is applicable for the defined interval or until timeout, whatever happens first.
Arguments
Interval - Time to wait
Example
sleep('5s')