This function returns "true" if two intervals have a non-empty intersection, "false" if not.
The supported types are String/Number/Date/Time/Date-time.
An interval is a sequence of two values of the same type: the first value represents the lower bound and the second the upper bound. The two intervals must be of the same type.
When the bound type of both intervals is "String", the comparison mode is lexicographic. The "opts" parameter can be used to define a comparison using a collation enabling two character strings to be compared according to a given language.
Parameters
String/Number/Date/Time/Date-time sequence |
Interval1 |
Interval to test |
Mandatory |
String/Number/Date/Time/Date-time sequence |
Interval2 |
Interval to test |
Mandatory |
Hash |
opts |
Definition of intersection options. This object can have the following attributes:
|
Optional. |
For example
<#assign planningTask1 = ["2018-05-10"?date.xs, "2018-06-10"?date.xs] /> <#assign planningTask2 = ["2018-05-30"?date.xs, "2018-06-20"?date.xs] /> <#if hardisCore.intervalIntersects (planningTask1, planningTask2)> Check if we have enough resources </#if>