Date.toISOString()
Returns the date as a string, using the ISO standard
Last updated
Returns the date as a string, using the ISO standard
Last updated
The toISOString() method returns a string in simplified extended ISO format (ISO 8601), which is always 24 or 27 characters long (YYYY-MM-DDTHH:mm:ss.sssZ or ±YYYYYY-MM-DDTHH:mm:ss.sssZ, respectively)
Return value
A string representing the given date in the format according to universal time.
toISOString()
The above example uses parsing of a non–standard string value that may not be correctly parsed in non–Mozilla browsers.
This method was standardized in ECMA-262 5th edition. Engines which have not been updated to support this method can work around the absence of this method using the following shim:
Uros Durdevic