def normalise_two_digit_year(y):
    """
    Given a year string, which could be 2 digits, try and get a 4 digit year
    out of it as a string
    """
    if y[0] == "'":
        y = y[1:]
    if int(y) < 39:
        return '%04d' % (int(y) + 2000)
    elif int(y) < 100:
        return '%04d' % (int(y) + 1900)
    else:
        return '%04d' % int(y[:4])