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

FunctionSignatureReturns
beforebefore(a, b)Returns true if a lies entirely before b with no overlap
afterafter(a, b)Returns true if a lies entirely after b with no overlap
meetsmeets(range1, range2)Returns true if range1 ends exactly where range2 begins, with both endpoints included
met bymet by(range1, range2)Returns true if range1 begins exactly where range2 ends, the mirror of meets
overlapsoverlaps(range1, range2)Returns true if the ranges share at least one point, in either order
overlaps beforeoverlaps before(range1, range2)Returns true if range1 starts before range2 and they overlap without either containing the other
overlaps afteroverlaps after(range1, range2)Returns true if range1 ends after range2 and they overlap without either containing the other, the mirror of overlaps before
finishesfinishes(a, range)Returns true if a ends exactly where range ends and lies within it
finished byfinished by(range, a)Returns true if range ends exactly where a ends and contains it, the mirror of finishes
includesincludes(range, a)Returns true if range fully contains a, endpoints included
duringduring(a, range)Returns true if a lies fully inside range, the mirror of includes
startsstarts(a, range)Returns true if a begins exactly where range begins and lies within it
started bystarted by(range, a)Returns true if range begins exactly where a begins and contains it, the mirror of starts
coincidescoincides(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.

ParameterTypeDescription
apoint or rangethe earlier candidate
bpoint or rangethe later candidate
before(1, 10)
returns true Try it ↑
before([1..5], [6..10])
returns true Try it ↑
before(10, [1..5])
returns false Try it ↑

Related: after · meets

after(a, b)

Returns true if a lies entirely after b with no overlap.

ParameterTypeDescription
apoint or rangethe later candidate
bpoint or rangethe earlier candidate
after(12, [1..10])
returns true Try it ↑
after([11..12], [1..10])
returns true Try it ↑

Related: before · met by

meets(range1, range2)

Returns true if range1 ends exactly where range2 begins, with both endpoints included.

ParameterTypeDescription
range1rangethe earlier range
range2rangethe later range
meets([1..5], [5..10])
returns true Try it ↑
meets([1..4], [6..10])
returns false Try it ↑

Related: met by · overlaps

met by(range1, range2)

Returns true if range1 begins exactly where range2 ends, the mirror of meets.

ParameterTypeDescription
range1rangethe later range
range2rangethe earlier range
met by([5..10], [1..5])
returns true Try it ↑

Related: meets · overlaps

overlaps(range1, range2)

Returns true if the ranges share at least one point, in either order.

ParameterTypeDescription
range1rangefirst range
range2rangesecond range
overlaps([1..5], [3..8])
returns true Try it ↑
overlaps([1..5], [6..8])
returns false Try it ↑

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.

ParameterTypeDescription
range1rangethe range that starts first
range2rangethe range it overlaps into
overlaps before([1..5], [3..8])
returns true Try it ↑
overlaps before([3..8], [1..5])
returns false Try it ↑

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.

ParameterTypeDescription
range1rangethe range that ends last
range2rangethe range it overlaps out of
overlaps after([3..8], [1..5])
returns true Try it ↑

Related: overlaps · overlaps before

finishes(a, range)

Returns true if a ends exactly where range ends and lies within it.

ParameterTypeDescription
apoint or rangethe candidate ending together with range
rangerangethe enclosing range
finishes(10, [1..10])
returns true Try it ↑
finishes([5..10], [1..10])
returns true Try it ↑

Related: finished by · starts

finished by(range, a)

Returns true if range ends exactly where a ends and contains it, the mirror of finishes.

ParameterTypeDescription
rangerangethe enclosing range
apoint or rangethe candidate ending together with range
finished by([1..10], [5..10])
returns true Try it ↑

Related: finishes · includes

includes(range, a)

Returns true if range fully contains a, endpoints included.

ParameterTypeDescription
rangerangethe enclosing range
apoint or rangethe contained candidate
includes([1..10], 5)
returns true Try it ↑
includes([1..10], [4..6])
returns true Try it ↑

Related: during · overlaps

during(a, range)

Returns true if a lies fully inside range, the mirror of includes.

ParameterTypeDescription
apoint or rangethe contained candidate
rangerangethe enclosing range
during(5, [1..10])
returns true Try it ↑
during([4..6], [1..10])
returns true Try it ↑

Related: includes · starts · finishes

starts(a, range)

Returns true if a begins exactly where range begins and lies within it.

ParameterTypeDescription
apoint or rangethe candidate starting together with range
rangerangethe enclosing range
starts(1, [1..10])
returns true Try it ↑
starts([1..5], [1..10])
returns true Try it ↑

Related: started by · finishes

started by(range, a)

Returns true if range begins exactly where a begins and contains it, the mirror of starts.

ParameterTypeDescription
rangerangethe enclosing range
apoint or rangethe candidate starting together with range
started by([1..10], [1..5])
returns true Try it ↑

Related: starts · includes

coincides(a, b)

Returns true if two points are equal or two ranges have identical endpoints and closures.

ParameterTypeDescription
apoint or rangefirst value
bpoint or rangesecond value
coincides(5, 5)
returns true Try it ↑
coincides([1..5], [1..5])
returns true Try it ↑

Related: includes · overlaps

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:

ExpressionFEELB-FEEL
before(null, 5)nullfalse
includes([1..10], null)nullfalse
overlaps(null, [1..5])nullfalse

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).