def format_date(value, iso=False):
    """
    Try to get a suitable date out of the value.
    """
    if len(value) == 4 and value.isnumeric():
        if iso:
            return '{}-01-01T00:00:00Z'.format(value)
        else:
            return '{}-01-01'.format(value)
    raise ValueError('could not handle: %s', value)
