i'm needing my json.stringify method to return me something like this:
//The code below is the same as JSON.stringify(new Date());
console.log(new Date().toJSON());
This returns me the following:
"/Date(1373046760480-0300)/"
which is fine, but it happens in certain scenarios that the same operation returns me this:
"2013-07-05T17:52:55.434Z"
which is not the expected result, and then i have to create string to have the expected result.
Does anybody know why this happens?
toJSONshould calltoISOString(es5.github.io/#x15.9.5.44).