FEEL range functions
14 built-in functions · DMN 1.6
The range functions answer one question each about two intervals, or a point and an interval: does one come before the other, do they overlap, does one include the other. They follow Allen's interval algebra, take numbers, strings, dates, times and durations, and always return a boolean. Whether an endpoint is included ([) or excluded (() changes the answer.
Each result below was computed by the engine that runs the playground. Ranges themselves, and the in test that decision table cells use, are covered in the guide to unary tests and ranges.
All FEEL range functions at a glance
| Function | Signature | Returns |
|---|---|---|
| before | before(a, b) | Returns true if a lies entirely before b with no overlap |
| after | after(a, b) | Returns true if a lies entirely after b with no overlap |
| meets | meets(range1, range2) | Returns true if range1 ends exactly where range2 begins, with both endpoints included |
| met by | met by(range1, range2) | Returns true if range1 begins exactly where range2 ends, the mirror of meets |
| overlaps | overlaps(range1, range2) | Returns true if the ranges share at least one point, in either order |
| overlaps before | overlaps before(range1, range2) | Returns true if range1 starts before range2 and they overlap without either containing the other |
| overlaps after | overlaps after(range1, range2) | Returns true if range1 ends after range2 and they overlap without either containing the other, the mirror of overlaps before |
| finishes | finishes(a, range) | Returns true if a ends exactly where range ends and lies within it |
| finished by | finished by(range, a) | Returns true if range ends exactly where a ends and contains it, the mirror of finishes |
| includes | includes(range, a) | Returns true if range fully contains a, endpoints included |
| during | during(a, range) | Returns true if a lies fully inside range, the mirror of includes |
| starts | starts(a, range) | Returns true if a begins exactly where range begins and lies within it |
| started by | started by(range, a) | Returns true if range begins exactly where a begins and contains it, the mirror of starts |
| coincides | coincides(a, b) | Returns true if two points are equal or two ranges have identical endpoints and closures |
Function reference
Each function with its parameters, examples and edge cases.
before(a, b)
Returns true if a lies entirely before b with no overlap.
| Parameter | Type | Description |
|---|---|---|
| a | point or range | the earlier candidate |
| b | point or range | the later candidate |
before(1, 10)
before([1..5], [6..10])
before(10, [1..5])
after(a, b)
Returns true if a lies entirely after b with no overlap.
| Parameter | Type | Description |
|---|---|---|
| a | point or range | the later candidate |
| b | point or range | the earlier candidate |
after(12, [1..10])
after([11..12], [1..10])
meets(range1, range2)
Returns true if range1 ends exactly where range2 begins, with both endpoints included.
| Parameter | Type | Description |
|---|---|---|
| range1 | range | the earlier range |
| range2 | range | the later range |
meets([1..5], [5..10])
meets([1..4], [6..10])
met by(range1, range2)
Returns true if range1 begins exactly where range2 ends, the mirror of meets.
| Parameter | Type | Description |
|---|---|---|
| range1 | range | the later range |
| range2 | range | the earlier range |
met by([5..10], [1..5])
overlaps(range1, range2)
Returns true if the ranges share at least one point, in either order.
| Parameter | Type | Description |
|---|---|---|
| range1 | range | first range |
| range2 | range | second range |
overlaps([1..5], [3..8])
overlaps([1..5], [6..8])
Related: overlaps before · overlaps after · includes
overlaps before(range1, range2)
Returns true if range1 starts before range2 and they overlap without either containing the other.
| Parameter | Type | Description |
|---|---|---|
| range1 | range | the range that starts first |
| range2 | range | the range it overlaps into |
overlaps before([1..5], [3..8])
overlaps before([3..8], [1..5])
Related: overlaps · overlaps after
overlaps after(range1, range2)
Returns true if range1 ends after range2 and they overlap without either containing the other, the mirror of overlaps before.
| Parameter | Type | Description |
|---|---|---|
| range1 | range | the range that ends last |
| range2 | range | the range it overlaps out of |
overlaps after([3..8], [1..5])
Related: overlaps · overlaps before
finishes(a, range)
Returns true if a ends exactly where range ends and lies within it.
| Parameter | Type | Description |
|---|---|---|
| a | point or range | the candidate ending together with range |
| range | range | the enclosing range |
finishes(10, [1..10])
finishes([5..10], [1..10])
Related: finished by · starts
finished by(range, a)
Returns true if range ends exactly where a ends and contains it, the mirror of finishes.
| Parameter | Type | Description |
|---|---|---|
| range | range | the enclosing range |
| a | point or range | the candidate ending together with range |
finished by([1..10], [5..10])
includes(range, a)
Returns true if range fully contains a, endpoints included.
| Parameter | Type | Description |
|---|---|---|
| range | range | the enclosing range |
| a | point or range | the contained candidate |
includes([1..10], 5)
includes([1..10], [4..6])
during(a, range)
Returns true if a lies fully inside range, the mirror of includes.
| Parameter | Type | Description |
|---|---|---|
| a | point or range | the contained candidate |
| range | range | the enclosing range |
during(5, [1..10])
during([4..6], [1..10])
Related: includes · starts · finishes
starts(a, range)
Returns true if a begins exactly where range begins and lies within it.
| Parameter | Type | Description |
|---|---|---|
| a | point or range | the candidate starting together with range |
| range | range | the enclosing range |
starts(1, [1..10])
starts([1..5], [1..10])
Related: started by · finishes
started by(range, a)
Returns true if range begins exactly where a begins and contains it, the mirror of starts.
| Parameter | Type | Description |
|---|---|---|
| range | range | the enclosing range |
| a | point or range | the candidate starting together with range |
started by([1..10], [1..5])
coincides(a, b)
Returns true if two points are equal or two ranges have identical endpoints and closures.
| Parameter | Type | Description |
|---|---|---|
| a | point or range | first value |
| b | point or range | second value |
coincides(5, 5)
coincides([1..5], [1..5])
How B-FEEL differs
In standard FEEL an invalid argument makes the result null. The business-friendly
B-FEEL dialect returns a type default instead. Both columns were evaluated by the same engine:
| Expression | FEEL | B-FEEL |
|---|---|---|
| before(null, 5) | null | false |
| includes([1..10], null) | null | false |
| overlaps(null, [1..5]) | null | false |
Related guides
Every result on this page was computed by the Impulse FEEL engine 0.9.1, the interpreter that runs the playground. Last updated .
Defined by the OMG DMN 1.6 specification, chapter 10.3.4 (built-in functions).