def random_date(start_year=2000, end_year=2020):
    """
    Generates a random "sensible" date for use in things like issue dates and maturities
    """
    return date(random.randint(start_year, end_year), random.randint(1, 12), random.randint(1, 28))
def random_date ( start_year = 2000 , end_year = 2020 ) : return date ( random . randint ( start_year , end_year ) , random . randint ( 1 , 12 ) , random . randint ( 1 , 28 ) )
Generates a random "sensible" date for use in things like issue dates and maturities