Date Range Overlap with Nullable Dates

前端 未结 4 1699
被撕碎了的回忆
被撕碎了的回忆 2021-02-10 03:23

I\'m looking for an extended answer to the question asked here:

Determine Whether Two Date Ranges Overlap

where any of the dates in either date range can be null

4条回答
  •  没有蜡笔的小新
    2021-02-10 03:51

    That is probably as 'simple' as you can get it, although I haven't actually proven it.

    It probably isn't worth it to simplify further, since that block ends up being about 8 operations in the worst case (4 on average thanks to short-circuit evaluation).

提交回复
热议问题