# Package for Date/Time Interval boolean operators?

**URL:** <https://discourse.julialang.org/t/package-for-date-time-interval-boolean-operators/26053>\
**Category:** General Usage\
**Tags:** question\
**Created:** [July 5, 2019, 7:28pm UTC](https://discourse.julialang.org/t/package-for-date-time-interval-boolean-operators/26053 "2019-07-05T19:28:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cce](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cce/32/460_2.png) [@cce](https://discourse.julialang.org/u/cce)\
**Post date:** [July 5, 2019, 7:28pm UTC](https://discourse.julialang.org/t/package-for-date-time-interval-boolean-operators/26053/1 "2019-07-05T19:28:51Z")

</div>

Hello. I’m curious if anyone is working on interval operators, particularly regarding dates, and especially ones that match interval operators of the [Clinical Quality Language](https://cql.hl7.org/09-b-cqlreference.html#interval-operators-3). These operators include `during` (or `included in`), `overlaps`, `before`, `after` and many other expressions that yield a boolean result given two intervals, or a timepoint and an interval. I see [Intervals.jl](https://github.com/invenia/Intervals.jl) and [IntervalSets.jl](https://github.com/JuliaMath/IntervalSets.jl). Anyone working on something more specific to date/time intervals that perhaps specializes one of these libraries?

---

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [July 6, 2019, 2:52pm UTC](https://discourse.julialang.org/t/package-for-date-time-interval-boolean-operators/26053/2 "2019-07-06T14:52:56Z")

</div>

I’d be interested in that as well, but I assumed that Intervals.jl could be used for that or for pirating to that end.

---

<div class="post-metadata">

**Author:** ![lbenet](https://avatars.discourse-cdn.com/v4/letter/l/35a633/32.png) [@lbenet](https://discourse.julialang.org/u/lbenet)\
**Post date:** [July 6, 2019, 4:17pm UTC](https://discourse.julialang.org/t/package-for-date-time-interval-boolean-operators/26053/3 "2019-07-06T16:17:01Z")

</div>

I am not sure if that helps, but in [IntervalArithmetic.jl](https://github.com/JuliaIntervals/IntervalArithmetic.jl) we have things like `>`, `<`, which somehow mimic the functions you are looking for. For instance, `after` may correspond to `>`: `1..2 > -1 .. 0` returns `true`.
