def ipea_filter_by_date(start=None, end=None):
    """
    Filter an IPEA time series by date.

    Parameters
    ----------
    start : str
        Start date string.

    End : str
        End date string.

    Returns
    -------
    str
        A string to filter by dates.

    Examples
    --------
    >>> url.ipea_filter_by_date("2019-01-01T00:00:00-00:00", "2019-02-01T00:00:00-00:00")
    'VALDATA ge 2019-01-01T00:00:00-00:00 and VALDATA le 2019-02-01T00:00:00-00:00'
    """

    def filter_by_start_date(start):
        return f"VALDATA ge {start}"

    def filter_by_end_date(start):
        return f"VALDATA le {start}"

    if start and end:
        return filter_by_start_date(start) + " and " + filter_by_end_date(end)
    elif start:
        return filter_by_start_date(start)
    elif end:
        return filter_by_end_date(end)

    return ""