GO-V.ORG
As seen in

Search e01

One query across the encyclopedia, books, dictionary, papers, Wikidata and the developer library. Every hit carries its source.

6 results across 6 corpora for Date.prototype.toISOString().

Developer library 6

Date

in the date time string format as input. Furthermore, implementations are allowed to support other date formats when the input fails to match this format. The toISOString() method returns a string representation of the date in the date time string format, with the time zone offset always set to `Z` (UTC). > [!NOTE] > You are encouraged to make sure your input conforms to the date time string format above for maximu

Date.prototype.toJSON()

The **`toJSON()`** method of Date instances returns a string representing this date in the same ISO format as toISOString(). JavaScript Demo: Date.prototype.toJSON() ```js interactive-example const event = new Date("August 19, 1975 23:15:30 UTC"); const jsonDate = event.toJSON(); console.log(jsonDate); // Expected output: "1975-08-19T23:15:30.000Z" console.log(new Date(jsonDate).toUTCString()); // Expected outpu

Date.prototype.toISOString()

The **`toISOString()`** method of Date instances returns a string representing this date in the [date time string format](/docs/Web/JavaScript/Reference/Global_Objects/Date#date_time_string_format), a _simplified_ format based on [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), which is always 24 or 27 characters long (`YYYY-MM-DDTHH:mm:ss.sssZ` or `±YYYYYY-MM-DDTHH:mm:ss.sssZ`, respectively). The timezone is alwa

Date.prototype.toUTCString()

00:00:00 GMT' ``` ## Specifications ## Browser compatibility ## See also - Date.prototype.toLocaleString() - Date.prototype.toString() - Date.prototype.toISOString()

JSON.stringify()

string (the same as calling `toString()`). Thus, they will be serialized as strings. Similarly, Date objects implement `toJSON()`, which returns the same as [`toISOString()`](/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString). - Only [enumerable own properties](/docs/Web/JavaScript/Guide/Enumerability_and_ownership_of_properties) are visited. This means Map, Set, etc. will become `"{}"`. You can use

RangeError: invalid date

nverting an [invalid date](/docs/Web/JavaScript/Reference/Global_Objects/Date#the_epoch_timestamps_and_invalid_date) value to an ISO date string by calling the toISOString() method. An _invalid date_ is produced when you attempt to parse an invalid date string, or set the timestamp to an out-of-bounds value. Invalid dates usually cause all date methods to return NaN or other special values. However, such dates do no

JSON results · Services directory