def fix_census_date(x):
    """Utitlity function fixing the last census date in file with country info

    Parameters
    ----------
    x : str
        Year or Year with adnotations

    Returns
    -------
    str
        Year as string 
    """
    x = str(x)
    if x == "Guernsey: 2009; Jersey: 2011.":
        return "2009"
    elif len(x)>4:
        return x[:4]
    else:
        return x