def iso8601_date(d):
if d == values.unset:<EOL><INDENT>return d<EOL><DEDENT>elif isinstance(d, datetime.datetime):<EOL><INDENT>return str(d.date())<EOL><DEDENT>elif isinstance(d, datetime.date):<EOL><INDENT>return str(d)<EOL><DEDENT>elif isinstance(d, str):<EOL><INDENT>return d<EOL><DEDENT>
Return a string representation of a date that the Twilio API understands
Format is YYYY-MM-DD. Returns None if d is not a string, datetime, or date