OVERLAPS operator is another very useful but rarely used PostgreSQL feature. It checks if two time periods overlap. For example, this query returns
SELECT (DATE '2016-01-10', DATE '2016-02-01') OVERLAPS (DATE '2016-01-20', DATE '2016-02-10');
The endpoints of time periods can be specified as either dates (times or timestamps) like in the previous example, or as date and interval like in the next example.
SELECT (DATE '2016-01-10', INTERVAL '1 month') OVERLAPS (DATE '2016-01-20', INTERVAL '7 days');
Please note that if the end of the first time period is equal to the beginning of the second time period then the operator returns