use toISODateString instead
Get the ISO string version of a date in the format YYYY-MM-DD. It doesn't say anything about the timezone.
YYYY-MM-DD
Deprecated
use toISODateString instead