Date.prototype.toISOString() used to return seconds in the milliseconds part if the latter were zero, and even a double if milliseconds were multiple of 10 or 100. Fixed it. Also removed the excessive date variable.
The second commit is a workaround for IE's < 11 dates without leading zeros (e.g. 'Fri, 7 Mar 2014 08:32:15 UTC').
Date.prototype.toISOString() used to return seconds in the milliseconds part if the latter were zero, and even a double if milliseconds were multiple of 10 or 100. Fixed it. Also removed the excessive
date
variable. The second commit is a workaround for IE's < 11 dates without leading zeros (e.g.'Fri, 7 Mar 2014 08:32:15 UTC'
).