DateOverlapsQ

DateOverlapsQ[date1,date2]

returns True if the calendar dates date1 and date2 overlap, and False otherwise.

Details

  • In DateOverlapsQ[date1,date2], both date1 and date2 should be specified as DateObject expressions of any calendar granularity.
  • DateOverlapsQ accepts lists of dates in both arguments, effectively calling Outer on the input lists.
  • DateOverlapsQ returns True if there is any intersection in the time period represented by date1 and date2.

Examples

open allclose all

Basic Examples  (2)

Now and Today are overlapping:

In[1]:=
Click for copyable input
Out[1]=

But Now and Yesterday are not:

In[2]:=
Click for copyable input
Out[2]=

Test whether the current week overlaps with January 2017:

In[1]:=
Click for copyable input
Out[1]=

Scope  (3)

Properties & Relations  (3)

See Also

DateWithinQ  DateObject  DateObjectQ  CurrentDate  DateValue

Introduced in 2017
(11.1)