@staticmethod<EOL><INDENT>def _intersect(start1, end1, start2, end2):<DEDENT>
start = max(start1, start2)<EOL>end = min(end1, end2)<EOL>if start > end:<EOL><INDENT>return None, None<EOL><DEDENT>return start, end<EOL>
Returns the intersection of two intervals. Returns (None,None) if the intersection is empty.

:param int start1: The start date of the first interval.
:param int end1: The end date of the first interval.
:param int start2: The start date of the second interval.
:param int end2: The end date of the second interval.

:rtype: tuple[int|None,int|None]