I have found out that the JSON standard for date is in this format: ‘yyyy-MM-ddTHH:mm:ssZ’. This format is the preferred way to handle dates inside a JSON object.
For example, 21st March 2016 at 17:04:33, would be, 2016-03-21T17:04:33.000Z.
There is no real functional difference between these functions, in fact, toJSON() will call toISOString(). The main difference is that toJSON() is included in JS 1.8.5, while toISOString() is included in JS 1.8. This makes toJSON() preferable for converting Date to JSON’s standard date format.
This JSON date format can be parsed into milliseconds using the usual Date.parse() function.