'Create an interval with two Periods as the endpoints.'

@classmethod
def from_periods(cls, start, end):

    end_date = (end.open_right_endpoint() if (end is not None) else None)
    start_date = (start.date if (start is not None) else None)
    return cls(start_date, end_date)
