SYNOPSIS
str = tostring(date)
DESCRIPTION
A date in string context returns the date formatted as per ISO 8601 extended format.
RETURN VALUE
A string formatted as "YYYY-MM-DD".
If date is not valid, returns the string "????-??-??".
ERRORS
Raises an error if date is not a date instance.
EXAMPLE
>
>
d = clock.currentDate()
print (d)
2009-08-06