def calendar(self, start_time=None, end_time=None, freq='day', future=False):
    (_calendar, _calendar_index) = self._get_calendar(freq, future)
    if (start_time == 'None'):
        start_time = None
    if (end_time == 'None'):
        end_time = None
    if start_time:
        start_time = pd.Timestamp(start_time)
        if (start_time > _calendar[(- 1)]):
            return np.array([])
    else:
        start_time = _calendar[0]
    if end_time:
        end_time = pd.Timestamp(end_time)
        if (end_time < _calendar[0]):
            return np.array([])
    else:
        end_time = _calendar[(- 1)]
    (_, _, si, ei) = self.locate_index(start_time, end_time, freq, future)
    return _calendar[si:(ei + 1)]
def calendar(self, start_time=None, end_time=None, freq='day', future=False):
    (_calendar, _calendar_index) = self._get_calendar(freq, future)
    if (start_time == 'None'):
        start_time = None
    if (end_time == 'None'):
        end_time = None
    if start_time:
        start_time = pd.Timestamp(start_time)
        if (start_time > _calendar[(- 1)]):
            return np.array([])
    else:
        start_time = _calendar[0]
    if end_time:
        end_time = pd.Timestamp(end_time)
        if (end_time < _calendar[0]):
            return np.array([])
    else:
        end_time = _calendar[(- 1)]
    (_, _, si, ei) = self.locate_index(start_time, end_time, freq, future)
    return _calendar[si:(ei + 1)]