So, I'm far from being a good developer, but find below an attempt for a function that parses the date in ISO8601 (such as your WS return example).
[code]
function parseISO8601(strISO8601Date) {
var dateRegExp = /^([0-9]{4})-([0-9]{2})-([0-9]{2})(T([0-9]{2})
[0-9]{2})
[0-9]{2})\.([0-9]{3})(Z|[-+][0-9]{2}:?[0-9]{2}))?$/i;
var match = dateRegExp.exec(strISO8601Date);
var year = parseInt(match[1]);
var month = parseInt(match[2]);
var day = parseInt(match[3]);
var hasTime = match[4];
var hour;
var minute;
var second;
var mils;
var tz;
var mydate;
if (hasTime && (typeof hasTime != 'undefined')) {
hour = parseInt(match[5]);
minute = parseInt(match[6]);
second = parseInt(match[7]);
mils = parseInt(match[8]);
tz = match[9];
mydate = new Date(year, month-1, day, hour, minute, second, mils);
if ("Z" === tz.toUpperCase()) {
mydate.setTime(mydate.getTime() - mydate.getTimezoneOffset() * 60000);
} else {
tz = tz.replace(":","");
var tzhour = parseInt(tz.substr(1,2));
var tzmin = parseInt(tz.substr(3,2));
var tzOffset = (tz.substr(0,1) === "+") ? ((tzhour * 3600000) + (tzmin * 60000)) : -((tzhour * 3600000) + (tzmin * 60000));
var diff = -tzOffset - (mydate.getTimezoneOffset() * 60000);
mydate.setTime(mydate.getTime() + diff);
}
} else {
mydate = new Date(year, month-1, day);
}
return mydate;
}
[/code]
If you can try it out on MCP and post results that would be great as I don't have a lab ready for this kind of testing (although I have tested against FireFox without problems).