English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
toISOString() Convert a date to a format that conforms to ISO 8601 Extended format string.
The time zone is always zero UTC offset, as shown by the suffix 'Z'.
date.toISOString()
var d = new Date(); var str = d.toISOString(); document.getElementById('result').innerHTML = str;Test to see‹/›
The numbers in the table specify the first browser version that fully supports the toISOString() method:
Method | |||||
toISOString() | 1 | 1 | Yes | Yes | 9 |
Return value: | According to universal time in ISO 8601Format string representing a given date |
---|---|
JavaScript Version: | ECMAScript 1 |