XML DateTime to Javascript Date Object
问题 So I am writing an application using ajax getting from a xml based api. The api returns dates in the following format: 2011-11-12T13:00:00-07:00 I need to get this as a standard JavaScript date object var myDate = new Date('2011-11-12T13:00:00-07:00'); which works great in every browser BUT ie8 and ie7. I just don't understand why and can't seem to find any documentation on how to format this specifically for ie7-8. I know there has to be a smart way to do this. Please help. Thanks. 回答1: The