toJSON
1.5.1

toJSON() -> String

Converts the date into a JSON string (following the ISO format used by JSON).

Example


new Date(1969, 11, 31, 19).toJSON();
//-> '"1969-12-31T19:00:00"'