Thursday, 31 March 2016

js Date format

-----Data toString will give you this:

Thu Feb 25 2016 16:13:47 GMT+0000 (GMT)

----toISOString will give you:


The Date.toISOString() method converts the date into a string in the ISO 8601 format. Note that the returned date in your example ends by a Z2013-11-12T17:14:46.000Z. As per the Mozilla documentation and Wikipedia:
If the time is in UTC, add a Z directly after the time without a space. Z is the zone designator for the zero UTC offset

No comments:

Post a comment