I have a map.I am converting the Map into a JSON Object.I am reading the JSON object and want to convert it into a Javascript date.
The Date object I send is read as 2012-12-19T06:00:00.000+0000 in js and I do not understand what is the T in this String.Anyone can throw light on this
It is a string representation of a date as per the ISO 8601 specification. Here T stands for the beginning of the time portion of the datetime representation.
You can convert this representation to javascript date object using new Date('2012-12-19T06:00:00.000+0000').
You can use a regex to get only the date portion. The regex /\d{4}-\d{2}-\d{2}/.exec('2012-12-19T06:00:00.000+0000')[0] will give you the date portion alone.
Refer ISO 8601
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With