HTTP/2 200
server: GitHub.com
date: Sun, 12 Oct 2025 08:15:18 GMT
content-type: text/html; charset=utf-8
last-modified: Fri, 28 May 2021 21:42:09 GMT
vary: Accept-Encoding
access-control-allow-origin: *
etag: W/"60b163b1-3157"
expires: Sun, 12 Oct 2025 08:25:18 GMT
cache-control: max-age=600
content-encoding: gzip
x-proxy-cache: MISS
x-github-request-id: E694:33E1CE:2033412:23D7794:68EB6396
Prototype v1.7.3 API documentation | Date#toJSON
instance method Date#toJSON
View source on GitHub →
Date#toJSON() → String
Internally calls Date#toISOString
.
Example
var d = new Date(1969, 11, 31, 19);
d.getTimezoneOffset();
//-> -180 (time offest is given in minutes.)
d.toJSON();
//-> '1969-12-31T16:00:00Z'