def overlap(t1start, t1end, t2start, t2end):
    """
    Find if two date ranges overlap.

    Parameters
    ----------
    datastart, dataend : datetime, float
        Observation start and end datetimes.
    modelstart, modelend : datetime, float
        Observation start and end datetimes.

    Returns
    -------
    overlap : bool
        True if the two periods overlap at all, False otherwise.

    References
    ----------
    Shamelessly copied from http://stackoverflow.com/questions/3721249

    """
    return t1start <= t2start <= t1end or t2start <= t1start <= t2end
